issue with sendmessagetoadmins
#1

PHP код:
stock SendMessageToAdmins(text[])
{
    for(new 
i = 0; i < MAX_PLAYERS; i++)
    {
        if(
pInfo[i][Admin] < 1)
        {
            
SendClientMessage(i, -1, text);
        }
    }
} 
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.
Reply
#2

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

PHP код:
SendMessageToAdmins(text[]) 
{ 
    for(new 
i = 0; i < MAX_PLAYERS; i++) 
    { 
        if(
pInfo[i][Admin] > 1) 
        { 
            
SendClientMessage(i, -1, text); 
        } 
    } 
} 
Reply
#3

oh thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)