25.07.2014, 09:07
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
but when I checked the amount of player alive like this
I've got a warning: number of arguments doesn't match definition and it didn't work.
How can I check it, please?
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; }
Код:
if(IsPlayerAlive() == 1)
How can I check it, please?