SA-MP Forums Archive
sending messages to admins - 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: sending messages to admins (/showthread.php?tid=358065)



sending messages to admins - thefatshizms - 09.07.2012

how would i do that? send messages to admins


Re: sending messages to admins - JaKe Elite - 09.07.2012

pawn Код:
stock SendMessageToAdmins(color, const str[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][pAdmin] > 1) //change this line
        SendClientMessage(i, color, str);
    }
    return 1;
}



Re: sending messages to admins - clarencecuzz - 09.07.2012

pawn Код:
stock SendMessageToAdmins(color, const string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerAdmin(i)) //Currently set for RCON Admins. Change to whatever variable you are using, AccInfo[playerid][Level] > 0 etc. NOTE: The above post is incorrect!! It should be > 0 not > 1.
        {
            SendClientMessage(i, color, string);
            }
        }    
            return 1;
}