30.09.2014, 08:06
pawn Код:
CMD:arrest(playerid,params[])
{
new targetid, str[512];
if(IsPlayerPolice[playerid] < 1) return SendClientMessage(playerid,-1,"{ff0000}This command only for cops");
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1,"USAGE: /arrest [Part of Name/Player ID]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xFFFFFFF,"ERROR: This player is not connected!");
if(playerid == 0) return SendClientMessage(playerid, 0xFFFFFFF, "ERROR: You can't arrest yo self lmao");
new target[MAX_PLAYER_NAME];
GetPlayerName(targetid, target, sizeof(target));
format(str, sizeof(str), "{ff0000}You have arrested %s",target);
SendClientMessage(playerid, 0xE01B1B, str);
GameTextForPlayer(playerid, "ARRESTED",5000,2);
SendClientMessageToAll(-1, "%s Has been sent to jail");
SetPlayerInterior(playerid, 6);
ResetPlayerWeapons(playerid);
SetTimerEx("UnjailTimer",1000,0,"i",targetid);
return 1;
}