How to check online players
#5

pawn Код:
new faction = 0, online[128];

if(strcmp("/mon", cmdtext, true) == 0)
{
    if(PlayerInfo[playerid][playerteam]<1 || PlayerInfo[playerid][playerteam]==CIV || PlayerInfo[playerid][playerteam]==255) return SendClientError(playerid,"You cant use this Command");
    SendClientMessage(playerid,COLOR_LIGHTYELLOW,"------[MEMBERS ONLINE]------");
    for(new i; i != MAX_PLAYERS; i++)
    {
        if(PlayerInfo[playerid][playerteam] == PlayerInfo[playerid][playerteam])
        {
            faction++;
        }
    }
    format(online, sizeof(online), "%d online members!", faction);
    SendClientMessage(playerid, 0xFFFFFFFF, online);
    return 1;
 }
Put the new faction = 0 and online [128]; and the top of your script.
Reply


Messages In This Thread
How to check online players - by MadafakaPro - 11.03.2013, 14:02
Re: How to check online players - by Denying - 11.03.2013, 14:08
Re: How to check online players - by MadafakaPro - 11.03.2013, 14:12
Re: How to check online players - by Calabresi - 11.03.2013, 14:18
Re: How to check online players - by Denying - 11.03.2013, 14:18
Re: How to check online players - by MadafakaPro - 11.03.2013, 14:45
Re: How to check online players - by [HK]Ryder[AN] - 11.03.2013, 14:56
Re: How to check online players - by MadafakaPro - 11.03.2013, 15:06
Re: How to check online players - by iRage - 11.03.2013, 15:10
Re: How to check online players - by iggy1 - 11.03.2013, 15:31

Forum Jump:


Users browsing this thread: 1 Guest(s)