27.09.2012, 15:26
pawn Код:
CMD:report(playerid,params[])
{
new id, reason[35], string[128], sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
if(sscanf(params,"uz", id, reason)) return SendClientMessage(playerid, lb,"USAGE: /report [playerid/partofname] [reason]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, red,"Invalid player ID");
else
{
GetPlayerName(id, name,sizeof(name));
GetPlayerName(playerid, sendername, sizeof(sendername));
sendername[strfind(sendername,"_")] = ' ';
format(string, sizeof(string), "[ID:%d] %s has reported %s: %s.", playerid, sendername, name, reason);
ABroadCast(yel,string,1);
format(string, sizeof(string), "Use /markfalse [id] or /acceptreport [id]");
ABroadCast(yel,string,1);
format(string, sizeof(string), "Your report was just send to the online admins, please wait for a reply");
SendClientMessage(playerid,COLOR_ORANGE,string);
PlayerNeedsHelp[playerid] = 1;
return 1;
}
return 1;
}
EDIT: i guess i am late to post, the above poster wrote the correct code