. It is /cuff and /uncuff tutorial. I'll try to find arrest!
Use ******...
pawn Код:
CMD:arrest(playerid, params[])
{
new
pName[MAX_PLAYER_NAME],
tName[MAX_PLAYER_NAME],
targetid,
string[128]
;
if(sscanf(params, "u", targetid)) SendClientMessage(playerid, COLOR_WHITE, "USAGE: /arrest playerid");
else
{
GetPlayerName(playerid, pName, sizeof(pName));
GetPlayerName(targetid, tName, sizeof(tName));
if(IsPlayerConnected(targetid))
{
if(GetPlayerWantedLevel(targetid) >= 0)
{
format(string, sizeof(string), "You have been arrested by %s (%d).", pName, playerid);
SendClientMessage(targetid, red, string);
format(string, sizeof(string), "~r~Arrested by %s (%d)", pName, playerid);
GameTextForPlayer(targetid, string, 4000, 5);
format(strng, sizeof(string), "You have arrested %s (%d) and recieved $5000 as a bonus!", tName, targetid);
SendClientMessage(playerid, red, string);
format(string, sizeof(string), "Suspect %s (%d) has been arrested by %s (%d).", tName, targetid, pName, playerid);
SendClientMessageToAll(red, string);
format(string, sizeof(string), "~b~%s (%d) arrested, Well Done! You have recieved $5000 as a bonus.", tName, targetid);
GameTextForPlayer(playerid, string, 4000, 5);
GivePlayerMoney(playerid, 5000);
SetPlayerScore(playerid, GetPlayerScore(playerid)+1);
SetPlayerSpecialAction(targetid, SPECIAL_ACTION_HANDSUP);
ResetPlayerWeapons(targetid);
}
else return SendClientMessage(playerid, -1, "ERROR: Player does not have wanted level 4+");
}
else return SendClientMessage(playerid, -1, "ERROR: Invalid playerid.");
}
return 1;
}