SA-MP Forums Archive
issue with sendmessagetoadmins - 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: issue with sendmessagetoadmins (/showthread.php?tid=651002)



issue with sendmessagetoadmins - wallen - 11.03.2018

PHP код:
stock SendMessageToAdmins(text[])
{
    for(new 
0MAX_PLAYERSi++)
    {
        if(
pInfo[i][Admin] < 1)
        {
            
SendClientMessage(i, -1text);
        }
    }

What's wrong ?

My enum regarding admin:

PHP код:
enum ENUM_PLAYER_DATA
{
    
Admin
};
new 
pInfo[MAX_PLAYERS][ENUM_PLAYER_DATA]; 
It doesn't show some messages i wanted to show to admins.


Re: issue with sendmessagetoadmins - Lokii - 11.03.2018

you check if the admin is less than level 1 you need to check if he is higher

PHP код:
SendMessageToAdmins(text[]) 

    for(new 
0MAX_PLAYERSi++) 
    { 
        if(
pInfo[i][Admin] > 1
        { 
            
SendClientMessage(i, -1text); 
        } 
    } 




Re: issue with sendmessagetoadmins - wallen - 11.03.2018

oh thanks