SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 29/03/2020, 02:29 AM   #1
Nahuel0707
Little Clucker
 
Join Date: Dec 2019
Location: Argentina
Posts: 21
Reputation: 0
Default Hel pDuty Faccion

hello everyone I have a problem this is a part of my gm that gives you the skin of the police for the faction how can I do to create another one just like that but give me another skin only for a faction, whether it be ballas or the bums


if(PlayerInfo[playerid][jMiembro] != 1) return 1;
if(!PlayerToPoint(2.0, playerid, 254.0884,73.6973,1003.6406)) return SendClientMessage(playerid, COLOR_WHITE, "No estás en el lugar adecuado");
if(PlayerInfo[playerid][pDuty] == 0)
{

switch(PlayerInfo[playerid][jSexo])
{

case 1:
{

Skin[playerid] = GetPlayerSkin(playerid);
SendClientMessage(playerid, COLOR_WHITE, "Te pusiste el uniforme de policía");
PlayerInfo[playerid][pDuty] = 1;
SetPlayerSkin(playerid, PlayerInfo[playerid][pModelo]);
SetPlayerColor(playerid,COLOR_POLICIA); }
case 2:
{

SendClientMessage(playerid, COLOR_WHITE, "Te pusiste el uniforme de policía");
//SetPlayerAttachedObject(playerid,9,19142,1,0.09999 9,0.071999,-0.004000,2.600000,-1.300000,-2.099998,1.000000,1.000000,1.000000);
//SetPlayerAttachedObject(playerid,2,18636,2,0.15299 8,0.038000,-0.002000,86.399993,91.299995,2.299995,1.000000,1.0 00000,1.000000);
PlayerInfo[playerid][pModelo] = 211;
PlayerInfo[playerid][pDuty] = 1;
SetPlayerSkin(playerid, PlayerInfo[playerid][pModelo]);
SetPlayerColor(playerid,COLOR_POLICIA); }
}
}
else
{

SetPlayerColor(playerid,COLOR_WHITE);
if(PlayerInfo[playerid][jSexo] == 2) {
RemovePlayerAttachedObject(playerid,2);
RemovePlayerAttachedObject(playerid,2); }
SendClientMessage(playerid, COLOR_WHITE, "Te sacaste el uniforme de policía.");
SetPlayerSkin(playerid, PlayerInfo[playerid][jRopa]);

PlayerInfo[playerid][pDuty] = 0;
if(PlayerInfo[playerid][pWP1] == 3)
{

QuitarArma(playerid, 3);
QuitarArma(playerid, 25);
}
if(IsPlayerAttachedObjectSlotUsed(playerid,9))
{

RemovePlayerAttachedObject(playerid,2);
}
ResetPlayerWeapons(playerid);
DarArmas(playerid);
}
return 1;
}


script facction

CMD:darfaccion(playerid, params[])
{
new string[126];
new ID,FACCION;
if(PlayerInfo[playerid][jAdminNvl] < 5) return 0;
if(sscanf(params, "rd", ID,FACCION) )return SendClientMessage(playerid,COLOR_GRAD2,"Uso /darfaccion [id] [numero]");
//if(!IsPlayerConnected(ID)) return SendClientMessage(playerid,COLOR_GRAD2,"Jugador desconectado o id incorrecta");
if(FACCION == 0)
{

PlayerInfo[ID][pDuty] = 0;
PlayerInfo[ID][jMiembro] = 0;
PlayerInfo[ID][pRango] = 0;
return 1;
}
if(FACCION == 1)
{

format(string, sizeof(string), "¡Felicitaciones! %s te ha hecho a lider de la faccion S.A.P.D", NombreJugador(playerid));
SCM(ID,0x2AFF0000, string);
format(string, sizeof(string), "%s: Has hecho lider de la faccion S.A.P.D a %s", NombreJugador(playerid), NombreJugador(ID));
SCM(playerid,0x2AFF0000, string);
PlayerInfo[ID][jMiembro] = FACCION;
PlayerInfo[ID][pRango] = 7;
return 1;
}
if(FACCION == 3)
{

new pNam[32],query[200];
GetPlayerName(ID,pNam,32);
PlayerInfo[ID][jMiembro] = FACCION;
PlayerInfo[ID][pRango] = 6;
format(query, 200, "UPDATE `facciones` SET `Lider`='%s',`Integrantes`='1' WHERE `id`='%d'",pNam,FACCION);
mysql_function_query(Conecction, query, true, "OnQueryFinish", "ii", 0, playerid);
SCM(playerid,-1,"Has hecho al usuario lider de la faccion");
SCM(ID,-1,"Ahora eres el lider de una faccion");
}
return 1;
}
Nahuel0707 is offline   Reply With Quote
Old 29/03/2020, 02:09 PM   #2
Nuginity
Big Clucker
 
Nuginity's Avatar
 
Join Date: Feb 2020
Location: Indonesia (Jakarta)
Posts: 61
Reputation: 2
Default Re: Hel pDuty Faccion

please if you want to ask smoething, use [HTML] or [PHP]
Nuginity is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Faccion DarkChildren Help Archive 4 07/02/2010 08:08 PM


All times are GMT. The time now is 12:14 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.