22.06.2015, 18:21
Код:
CMD:report(playerid, params[]) { new sstring[256], giveplayerid, reason[128], playername[25], giveplayer[25], string[128]; if (sscanf(params, "us[128]", giveplayerid, reason)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /report [playerid] [reason]"); if (!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_RED, "Error: Inactive player id!"); GetPlayerName(playerid, playername, MAX_PLAYER_NAME); GetPlayerName(giveplayerid, giveplayer, MAX_PLAYER_NAME); format(sstring, sizeof(sstring), "%s reported player %s(%d) for %s.\r\n", playername, giveplayer, giveplayerid, reason); SendMessageToAdmins(COLOR_ORANGE, sstring); format(string, 128, "Your report regarding %s(%d) has been sent to server admins.", giveplayer, giveplayerid); SendClientMessage(playerid, COLOR_YELLOW, string); return 1; }