SA-MP Forums Archive
How to make /ar and /tr commands for my report system? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to make /ar and /tr commands for my report system? (/showthread.php?tid=401477)



How to make /ar and /tr commands for my report system? - Michael_Cuellar - 23.12.2012

this is my report command
pawn Код:
CMD:report(playerid, params[])
{
    new string[128];
    if(!isnull(params))
    {
        SendClientMessage(playerid, COLOR_YELLOW, "Your report was sent to the Admin Teams:");
        format(string, sizeof(string), "%s", params); // Proof to the reporter, that the command worked.
        SendClientMessage(playerid, COLOR_YELLOW, string);
        for(new i=0; i<MAX_PLAYERS; i++)
        {
            if(PlayerInfo[playerid][pAdmin] >= 1)
            {
                format(string, sizeof(string), "Report from %s[%d]: %s", RPName(playerid), playerid, params);
                SendClientMessage(i, COLOR_ORANGE, string); // Send's the format to the online Rcon'ly Logged in Admins.
            }
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_WHITE, "USAGE: /Report [Text]"); // Show's the player the Usage.
    }
    return 1;
}