03.11.2015, 12:20
PHP код:
CMD:force(playerid, params[])
{
new targetid, sendername[MAX_PLAYER_NAME], receivername[MAX_PLAYER_NAME];
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, 0xAFAFAFAA, "USAGE: /force (playerid)");
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xAFAFAFAA, "ERROR : Only RCON Admins can use the command");
GetPlayerName(playerid, receivername, sizeof(receivername));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, SOS, "You have been forced into class selection by Admin %s", receivername);
SendClientMessage(targetid, green, string);
format(string, SOS, "You have forced %s into class selection", sendername);
SendClientMessage(playerid, green, string);
ForceClassSelection(playerid);
return 1;
}