02.05.2018, 21:43
I've creating a command for break the cuffs! And I've do it only for Civilian BUT If someone go Cops he can use it too!! Why?
PHP Code:
CMD:breakcuff(playerid, params[])
{
if(!Civilian(GetPlayerSkin(playerid))) return SendClientMessage(playerid, -1, "{ff0000}Error: {Ffffff}Only Civilian can use this comamnd");
{
new targetid;
if(BeginArrested[targetid] == 1)
{
KillTimer(BeginArrestedTime[targetid]);
SendClientMessage(targetid, -1, "{FF7000}YOU HAVE BEEN ESCAPED FROM ARRESTED!!! RUN RUN !!!!");
SetPlayerWantedLevel(targetid, 3);
SetPlayerColor(targetid, YELLOW);
GameTextForPlayer(targetid, "~Y~ESCAPED FROM ~G~ARRESTED ~P~ RUN BABY!!!", 7000, 5);
SetPlayerSpecialAction(targetid,SPECIAL_ACTION_NONE);
BeginArrested[targetid] = 0;
}
else SendClientMessage(targetid, -1, "{FF0000}Error: {FFFFFF}You can use this command only while be cuffed or arrested.");
}
return 1;
}
PHP Code:
stock PoliceTeam(skinid)
{
switch(skinid)
{
case 280:return 1;
case 285:return 1;
case 165:return 1;
case 166:return 1;
case 286:return 1;
case 287:return 1;
default: return 0;
}
return 0;
}
stock Civilian(skinid)
{
switch(skinid)
{
case 1..300:return 1;
default: return 0;
}
return 0;
}