14.07.2013, 20:08
I am making a report system and so far I have finished it. Just one little bug. You can accept the report over and over again. Here is the /ar command. Someone please help. Will post more Code on Request.
pawn Код:
CMD:ar(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
new id, string[126];
if(sscanf(params, "u", id))
return SendClientMessage(playerid, -1, "Syntax: /ar [player id]");
DeletePVar(id, "ReportPending");
DeletePVar(id, "ReportText");
DeletePVar(id, "ReportTime");
format(string, sizeof(string), "%s has accepted the report from %s (ID %d)", GetName(playerid), GetName(id), id);
SendToAdmins(0xFFA200FF, string);
format(string, sizeof(string), "%s has accepted your report. Please wait for the the admin to resolve the issue.", GetName(playerid));
SendClientMessage(id, COLOR_YELLOW, string);
}
return 1;
}