11.10.2014, 08:20
I got arrest command and cuff anyways
when i do /cuff it says USAGE bla bla..
same as arrest if i do /arrest 0 [me] says u cannot arrest another police officer if i do /arrest 2 [not me] says unknown command same as cuff i will not post all the code i will post what is needed so people won't copy it.
CUFF
ARREST
when i do /cuff it says USAGE bla bla..
same as arrest if i do /arrest 0 [me] says u cannot arrest another police officer if i do /arrest 2 [not me] says unknown command same as cuff i will not post all the code i will post what is needed so people won't copy it.
CUFF
PHP код:
CMD:cuff(playerid,params[])
{
new targetid;
if(IsPlayerPolice[playerid] < 1)
return SendClientMessage(playerid, -1, "{ff0000}This command only for cops");
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "USAGE: /cuff [Part of Name/Player ID]");
if(IsPlayerPolice[targetid] >= 1) return SendClientMessage(playerid, -2, "{ff0000}You cant arrest another police officer!");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xFFFFFFF,"{ff0000}[ERROR]: This player is not connected!");
if(playerid == targetid) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can't cuff yourself");
PHP код:
CMD:ar(playerid,params[]) return cmd_arrest(playerid, params);
CMD:arrest(playerid,params[])
{
new targetid, str[512];
if(IsPlayerPolice[playerid] < 1) return SendClientMessage(playerid,-1,"{ff0000}[ERROR]: You are not cop.");
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1,"USAGE: /arrest [Part of Name/Player ID]");
if(IsPlayerPolice[targetid] >= 1) return SendClientMessage(playerid, -2, "{ff0000}You cant arrest another police officer!");
if(!SetPlayerAttachedObject(targetid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977,-81.700035, 0.891999, 1.000000, 1.168000)) return SendClientMessage(playerid,-1,"[ERROR] This player is not cuffed!");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xFFFFFFF,"ERROR: This player is not connected!");
if(playerid == targetid) return SendClientMessage(playerid, 0xFFFFFFF, "{ff0000}ERROR: You can't arrest yourself");