04.06.2014, 19:41
Hello, i have this report command:
What i want to know is, if a player has reported someone and if an admin spec the reported player, it will send the message to the reporter saying "An Admin is checking your report"
I tried to make this and couldn't figure out how to. Can someone suggest me?
pawn Код:
CMD:report(playerid, params[])
{
new target, Name[24], ReporterName[24], Reason[128], Msg[128];
if (pInfo[playerid][LoggedIn] == true)
{
if (sscanf(params, "us[128]", target, Reason)) return SendClientMessage(playerid, RED, "USAGE: /report [ID] [Reason]");
if(target == playerid) return SendClientMessage(playerid, RED, "You cannot report yourself!");
if (pInfo[target][LoggedIn] == true)
{
GetPlayerName(target, Name, sizeof(Name));
SendAdminText(playerid, "/REPORT", params);
GetPlayerName(playerid, ReporterName, sizeof(ReporterName));
format(Msg, 128, "*** Player %s (ID: %d) has reported player %s (ID:%d). (Reason: %s )", ReporterName, playerid, Name, target, Reason);
MessageToAdmins(RED, Msg);
SendClientMessage(playerid, YELLOW, "Report sent to online Admins/Operators. Thanks for reporting!");
}
else SendClientMessage(playerid, RED, "Player isn't connected!");
}
else return 0;
return 1;
}
I tried to make this and couldn't figure out how to. Can someone suggest me?