How to get the ammount of players alive?
#4

Im not 100% sure how it would go but

for in OnPlayerSpawn put "Alive[playerid] = 1;" and under it have a count for example "AliveCount++;" you will need to define the count thou.
And in OnPlayerDeath put "Alive[playerid] = 0;" and "AliveCount--;"

Now if you want it in a command to see how many are alive, this might help. I think.

format(string, sizeof(string), "~r~Players Alive ~n~~y~ $%d",AliveCount);
GameTextForPlayer(playerid, string, 5000, 1);

You will need to have a "new string;" at the top of your onplayercommandtext callback. As well as "AliveCount;"

Now that possibly might work. Dont quote me on it as its untested.
Reply


Messages In This Thread
How to get the ammount of players alive? - by Jokerstyle - 14.05.2010, 17:08
Re: How to get the ammount of players alive? - by Faith - 14.05.2010, 17:10
Re: How to get the ammount of players alive? - by Jokerstyle - 14.05.2010, 17:14
Re: How to get the ammount of players alive? - by chaosnz - 14.05.2010, 17:35
Re: How to get the ammount of players alive? - by Calgon - 14.05.2010, 17:40
Re: How to get the ammount of players alive? - by Jokerstyle - 14.05.2010, 17:46
Re: How to get the ammount of players alive? - by Killa_ - 14.05.2010, 17:47
Re: How to get the ammount of players alive? - by [03]Garsino - 14.05.2010, 17:48
Re: How to get the ammount of players alive? - by Jokerstyle - 14.05.2010, 17:51
Re: How to get the ammount of players alive? - by Killa_ - 14.05.2010, 17:53

Forum Jump:


Users browsing this thread: 1 Guest(s)