14.08.2010, 03:33
Hey im new to scripting And i want to make a /report cmd but how do i make it so when players use /report it only sends it to online admins
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