16.03.2013, 14:51
The easiest way, you'll need Command Processor by ******, it's the fastest CP (ZCMD by Zeex is fast too)
pawn Код:
YCMD:report(playerid, params[], help)
{
#pragma unused help
new player, playername[MAX_PLAYER_NAME], myname[MAX_PLAYER_NAME], reason[128], string[128];
if(sscanf(params, "us[128]", player, reason)) return SendClientMessage(playerid, 0xFFFFFFAA, "USAGE: /report [playerid] [reason]");
else if(player == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFFFFFFAA, "ERROR: That player is not connected!");
GetPlayerName(playerid, myname, sizeof(myname));
GetPlayerName(player, playername, sizeof(playername));
format(string, sizeof(string), "SUCCESS: You have reported %s for %s", playername, reason);
SendClientMessage(playerid, 0xFFFFFFAA, string);
format(string, sizeof(string), "REPORT: %s has been reported for %s by %s!", playername, myname, reason);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerAdmin(i)) { SendClientMessage(i, 0xFFFFFFAA, string); }
return true;
}
return 1;
}