14.01.2011, 16:15
if(Spieler[i][AdminLevel] >= 1)
This will also be called when you are a lvl 9999 admin, so there will be 2 messages
change it to
if(Spieler[i][AdminLevel] == 1)
like for the other levels.
Another more clean variant would be not to handle every level itself, but to make it dynamic.
Just check if the admin level is >= 1 and then use
To insert the level, so you dont have to use the same code again and again.
Edit: Too slow, first method already posted
This will also be called when you are a lvl 9999 admin, so there will be 2 messages
change it to
if(Spieler[i][AdminLevel] == 1)
like for the other levels.
Another more clean variant would be not to handle every level itself, but to make it dynamic.
Just check if the admin level is >= 1 and then use
pawn Код:
format(string, sizeof(string), "Level: %d Admin[ID: %d]: %s ",Spieler[i][AdminLevel],i,name);
Edit: Too slow, first method already posted