09.05.2012, 18:03
This should work as a command i think
pawn Код:
CMD:cuff(playerid,params[])
{
new id;
if(sscanf(params,"u",id))
{
SendClientMessage(playerid,0xFFFFFFFF,"Usage: /cuff <id>");
}
}
else if(id == INVALID_PLAYER_ID)
{
SendClientMessage(playerid,0xFFFFFFFF,"that player is not online");
}
else
{
new name[MAX_PLAYER_NAME],string[MAX_PLAYER_NAME],name2[MAX_PLAYER_NAME],string2[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"You have been cuffed by %s.",name);
SendClientMessage(id,0xFFFFFFFF,string);
GetPlayerName(id,name2,sizeof(name2));
format(string2,sizeof(string2),"You cuffed %s.",name2);
SendClientMessage(playerid,0xFFFFFFFF,string2);
SetPlayerSpecialAction(id,SPECIAL_ACTION_CUFFED);
}
return 1;
}