[HELP] /admins command
#6

You haven't added anything to detect if there's no admins online, you just detect if there's a player with a level of 0 it seems.
Add a variable that increases for each admin that's online, then check if that counter equals 0, and display the message.
pawn Код:
new online;
for(new i = 0; i < MAX_PLAYERS; i++)
{
    if(IsPlayerConnected(i) && PlayerInfo[i][Level] > 0)
    {
        online++;
        if(online == 0) format(string,sizeof(string), "No admin online in the list");
If you do not know what indentation is, look here: https://sampforum.blast.hk/showthread.php?tid=256961
Reply


Messages In This Thread
[HELP] /admins command - by XYZero - 08.02.2015, 04:38
Re: [HELP] /admins command - by 1fret - 08.02.2015, 05:24
Re: [HELP] /admins command - by Tamy - 08.02.2015, 05:29
Re: [HELP] /admins command - by XYZero - 08.02.2015, 05:32
Re: [HELP] /admins command - by XYZero - 08.02.2015, 06:22
Re: [HELP] /admins command - by CalvinC - 08.02.2015, 06:58
Re: [HELP] /admins command - by XYZero - 08.02.2015, 07:22
Re: [HELP] /admins command - by Threshold - 08.02.2015, 07:44
Re: [HELP] /admins command - by XYZero - 08.02.2015, 08:00
Re: [HELP] /admins command - by Filbert - 04.06.2016, 05:12

Forum Jump:


Users browsing this thread: 1 Guest(s)