#include #define SendClientMessageToAdmins dcmd_report(playerid,params[]) { { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "REPORT A PLAYER: /report 'playerid' 'reason'"); return 1; } new reportid = strval(tmp); if(strlen(cmdtext) < idx) { SendClientMessage(playerid, COLOR_GRAD1, "REPORT A PLAYER: /report 'playerid' 'reason'"); return 1; } if (IsPlayerConnected(reportid)) { new player_name[MAX_PLAYER_NAME], str[67]; GetPlayerName(reportid, player_name, MAX_PLAYER_NAME); format(str, sizeof(str), "You have just got report from %s: %s", player_name, cmdtext[idx]); SendClientMessageToAdmins(COLOR_GREEN, str); } else { SendClientMessage(playerid,COLOR_RED, "You can't report someone who isn't online!"); } return 1; }