How to check online players
#4

Let's say the variable which saves player's faction is PlayerFaction and you want to check for faction ID 8. You gotta create a command as you wish and use that format;
pawn Код:
new count, string[128];
for(new id = 0; id < MAX_PLAYERS; id++)
{
     if(PlayerFaction[id] == 8)
     {
          count++;
     }
}
format(string, sizeof(string), "%d members are online from faction 8.", count);
SendClientMessage(playerid, -1, string);
I hope you understood it.
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)