pawn Код:
if(!strcmp(cmd,"/cuff",true))
{
cmd=strtok(cmdtext,idx);
giveplayerid=ReturnUser(cmd);
if(gTeam[playerid] == TEAM_POLICE)
{
if(!strlen(cmd)) return SendClientMessage(playerid,GREY,"USAGE: /cuff [playerid]");
if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid,RED,"ERROR: Invalid player id!");
TogglePlayerControllable(giveplayerid,0);
GameTextForPlayer(giveplayerid, "~y~ Cuffed!",2500,3);
new str[128];
GetPlayerName(playerid, str, sizeof(str));
GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
format(str, sizeof(str), " * %s takes out his cuffs and places it on %s hands. ", str, giveplayername);
ProxDetector(50.0, playerid, str,0x6699FFAA,0x6699FFAA,0x6699FFAA,0x6699FFAA,0x6699FFAA);
return 1;
}
else
{
SendClientMessage(playerid, RED, "ERROR: You're not a police officer!");
}
return true;
}