14.08.2010, 06:16
Use a for loop.
Loop through all the admins currently on and send the report to all that are on.
Example:
Hope this helps
Loop through all the admins currently on and send the report to all that are on.
Example:
Код:
COMMAND:report(playerid, params[]) { new string[128], id, reason[128]; if (!sscanf(params, "is", id, reason)) { for (new i = 0; i < MAX_PLAYERS; i++) { if (GetPVarInt(i, "Admin") >= 1) { format(string, sizeof(string), "REPORT: Player %s(%d) Has Reported %s(%d), [Reason: %s ]", Name(playerid),playerid, Name(id),id, reason); SendClientMessage(i, COLOR_WHITE, string); } } SendClientMessage(playerid, COLOR_WHITE, "Your report has been sent successfully :)"); } return 1; } //Not tested. Example
![Smiley](images/smilies/smile.png)