21.06.2013, 14:07
Hello!
I have one question and that is, How to make the /reports command. I have searched, but I didn't find anything
This command will show a DIALOG_STYLE_MSGBOX dialog and the last 3 reports from my command /report...
/report
Thanks for HELP
I have one question and that is, How to make the /reports command. I have searched, but I didn't find anything
This command will show a DIALOG_STYLE_MSGBOX dialog and the last 3 reports from my command /report...
/report
pawn Код:
CMD:report(playerid, params[])
{
new hacker; new reason[50]; new string[200]; new str[200];
if(sscanf(params, "us[50]", hacker, reason))return SendClientMessage(playerid, COLOR_GREY, "[USAGE]: /report {FF0000}[PlayerID] {FF0000}[Reason]");
if(!IsPlayerConnected(hacker))return SendClientMessage(playerid, COLOR_RED, "[ERROR]: {FFFFFF}This player is {FF0000}NOT {FFFFFF}connected!");
format(string, sizeof(string), "[REPORT]: {800080}%s(ID:%d) {FFFFFF}has Reported {800080}%s(ID:%d) {FFFFFF}|| Reason: {800080}%s", GetName(playerid), playerid, GetName(hacker), hacker, reason);
SendAdminMessage(COLOR_RED, string);
format(str, sizeof(str), "[SYSTEM]: {FFFFFF}You have Reported {800080}%s(ID:%d) {FFFFFF}|| Reason: {800080}%s", GetName(hacker), hacker, reason);
SendClientMessage(playerid, COLOR_GREEN, str);
SendAdminGameText("~w~New ~g~Report!");
return 1;
}