Report Command
#2

Код:
COMMAND:report(playerid, params[])
{
    new id, reason[50], string[128];
    if(sscanf(params, "is[50]", id, reason))
		return SendClientMessage(playerid, -1, "Usage: /report [id] [reason]");
		
    if(id == INVALID_PLAYER_ID)
		return SendClientMessage(playerid, COLOR_RED, "ERROR: Player is not connected!");
		
	if (reason > 49)
	    return SendClientMessage(playerid, COLOR_RED, "error");
		
    new sender[24], reported[24];
    GetPlayerName(playerid, sender, sizeof(sender));
    GetPlayerName(id, reported, sizeof(reported));
    
    format(string, sizeof(string), "ADMIN CONSOLE - Player %s(%d) has reported player %s(%d)", sender, playerid, reported, id);
    SendMessageToAdmins(string);
    
    format(string, sizeof(string), "ADMIN CONSOLE - Reason: %s", reason);
    SendMessageToAdmins(string);
    
    format(string, sizeof(string), "ADMIN CONSOLE - Use '/approve %d' to approve this player's report", playerid);
    SendMessageToAdmins(string);
    
    SendClientMessage(playerid, COLOR_RED, "Your report has been recieved, Wait for it's approval");
    reportid[playerid] = 1;
    return 1;
}
Reply


Messages In This Thread
Report Command - by Ebisu - 07.07.2017, 05:27
Re: Report Command - by Freedom. - 07.07.2017, 08:21
Re: Report Command - by JasonRiggs - 07.07.2017, 15:39
Re: Report Command - by Freedom. - 07.07.2017, 16:24
Re: Report Command - by DTV - 07.07.2017, 16:47
Re: Report Command - by Freedom. - 07.07.2017, 16:57
Re: Report Command - by DTV - 07.07.2017, 17:09
Re: Report Command - by MrAjusshi - 08.07.2017, 01:17
Re: Report Command - by Dignity - 08.07.2017, 01:36

Forum Jump:


Users browsing this thread: 1 Guest(s)