Get alive players
#1

Hello. I'm trying to get the amount of players alive, however, it is not working for me.
I've tried using a variable which would increase when a player spawned and decrease when a player died, however, for some reason it increased 2 times for 1 player.

I've also tried using a stock
Код:
stock IsPlayerAlive()
{
	for (new i = 0; i < MAX_PLAYERS; i ++)
	{
	    if(GetPlayerHealth(i) == 100.0) return true;
	}
	return false;
}
but when I checked the amount of player alive like this
Код:
if(IsPlayerAlive() == 1)
I've got a warning: number of arguments doesn't match definition and it didn't work.

How can I check it, please?
Reply


Messages In This Thread
Get alive players - by babecka - 25.07.2014, 09:07
Re: Get alive players - by Stinged - 25.07.2014, 09:15
Re: Get alive players - by Ihateyou - 25.07.2014, 09:16
Re: Get alive players - by babecka - 25.07.2014, 09:20
Re: Get alive players - by Konstantinos - 25.07.2014, 09:25
Re: Get alive players - by Ihateyou - 25.07.2014, 09:54
Re: Get alive players - by Ihateyou - 25.07.2014, 10:11
Re: Get alive players - by icra - 25.07.2014, 10:14
Re: Get alive players - by babecka - 25.07.2014, 15:14

Forum Jump:


Users browsing this thread: 1 Guest(s)