SA-MP Forums Archive
need help with admin 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: need help with admin system (/showthread.php?tid=520950)



need help with admin system - 1fret - 21.06.2014

Is it possible to have a code that if a player or another admin uses a command it sends it to admins online. If its possible can someone show me an example of it please


Re : need help with admin system - Chipardeur - 21.06.2014

Something like that ?
pawn Код:
CMD:test(playerid, params[])
{
    new pname[25], string[128];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), "%s use /test.", pname);
    SendAdminMessage(-1, string);
    return 1;
}

stock SendAdminMessage(color, string)
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][pAdmin] > 0)
        {
            SendClientMessage(i, color, string)
        }
    }
    return 1;
}