21.05.2011, 00:33
pawn Код:
//Hai
#include <a_samp>
#define COLOR_YELLOW 0xFFFF00AA
#define FILTERSCRIPT
#include sscanf2
#include zcmd
#define RED 0xFF0000AA
CMD:report(playerid, params[])
{
new aName[MAX_PLAYER_NAME], str[128], reason, iD;
if (sscanf(params, "dz", iD, reason)) return SCM(playerid, RED, "* Usage : /report [PlayerID/Name] [Reason]");
if (iD == INVALID_PLAYER_ID) return SendClientMessage(playerid, RED, "ERROR : Invaild PlayerID");
if (playerid == iD) return SendClientMessage(playerid, RED, "ERROR : You cannot report yourself");
GetPlayerName(iD, aName, sizeof(aName));
format(str, sizeof(str), "%s(%d) has reported %s(%d) for : %s", pName(playerid), playerid, aName, iD, reason);
SendClientMessageToAdmins(COLOR_YELLOW, str); //change this to yours!
return true;
}
stock SendClientMessageToAdmins(color, text[])
{
for(new a, g = GetMaxPlayers(); a < g; a++)
if(IsPlayerConnected(a) && IsPlayerAdmin(a))
SendClientMessage(a, color, text);
}