PDA

View Full Version : issue with sendmessagetoadmins


wallen
11/03/2018, 02:09 PM
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:

enum ENUM_PLAYER_DATA
{
Admin

};
new pInfo[MAX_PLAYERS][ENUM_PLAYER_DATA];

It doesn't show some messages i wanted to show to admins.

Lokii
11/03/2018, 02:22 PM
you check if the admin is less than level 1 you need to check if he is higher


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

wallen
11/03/2018, 02:38 PM
oh thanks