26.09.2013, 04:14
Here, this is awesome!
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, COLOR_GREY,"[True:RP]: /report [playerid/partofname] [reason]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GREY,"Invalid player ID");
else
{
GetPlayerName(id, name,sizeof(name));
GetPlayerName(playerid, sendername, sizeof(sendername));
new hour, minute, second, year, month, day;
gettime(hour, minute, second);
getdate(year, month, day);
format(string, sizeof(string), "[ID:%d] %s has reported %s: %s. [Date:%d/%d/%d][Time: %d:%d:%d]", playerid, sendername, name, reason, month, day, year, hour, minute, second);
ABroadCast(COLOR_LIGHTRED,string,1);
format(string, sizeof(string), "Use /markfalse [id] or /acceptreport [id]");
ABroadCast(COLOR_LIGHTBLUE,string,1);
format(string, sizeof(string), "Your report was just sent to the online admins use (/reply) to reply, please wait for a reply");
SendClientMessage(playerid,COLOR_LIGHTRED,string);
PlayerNeedsHelp[playerid] = 1;
format(string, sizeof(string), "[ID:%d] %s has reported %s: %s. [Date:%d/%d/%d][Time: %d:%d:%d]", playerid, sendername, name, reason, month, day, year, hour, minute, second);
WriteReportsLog(string);
return 1;
}
}