16.03.2013, 13:51
pawn Код:
#include <a_samp>
#include <sscanf2>
#include <zcmd>
CMD:report(playerid,params[])
{
new ID,reason[64],string[124],n[2][24];
if(sscanf(params,"us[64]",ID,reason)) return SendClientMessage(playerid,-1,"/report [id] [reason]");
if(!IsPlayerConnected(ID)) return SendClientMessage(playerid,-1,"Idiot no connecto");
GetPlayerName(playerid,n[1],24);
GetPlayerName(ID,n[0],24);
format(string,sizeof(string),"%s reported %s. Reason %s",n[1],n[0],reason);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerAdmin(i))
{
SendClientMessage(i,-1,string);
}
}
}
print(string);
return 1;
}