28.07.2009, 00:40
pawn Код:
if (strcmp("/cuff", cmdtext, true, 15) == 0)
{
new tmp[128];
new idx;
new giveplayerid;
new giveplayer[MAX_PLAYER_NAME];
new sendername[MAX_PLAYER_NAME];
tmp = strtok(cmdtext,idx);
if(!strlen(tmp) return SendClientMessage(playerid,0xAA3333AA,"USAGE: /cuff playerid");
giveplayerid = strval(tmp);
if(gTeam[playerid] == TEAM_COP)
{
if(gTeam[giveplayerid] == TEAM_COP) return SendClientMessage(playerid,0xAA3333AA,"You cannot cuff cops !");
TogglePlayerControllable(giveplayerid,0);
format(tmp,sizeof(tmp),"You have cuffed %s",GetPlayerName(giveplayerid,giveplayer,sizeof(giveplayer));
SendClientMessage(playerid,0x33AA33AA,tmp);
format(tmp,sizeof(tmp),"You have been cuffed by %s",GetPlayerName(playerid,sendername,sizeof(sendername));
return 1;
}