Looping through all players and getting global variable
PHP Code:
It prints always : Preds Remaining : 2 or 1 (it's only victim) . I need to get all terrorist team g_Tickets, so why it won't? |
Re: Looping through all players and getting global variable
Code:
PHP Code:
|
Re: Looping through all players and getting global variable
Ahh yes thanks :]
|
Re: Looping through all players and getting global variable
Bug.
Imagine in the server are 11 players and get_pcvar_num(cvar_tickets) = 2 It will print always when kill : "Preds Remaining : 21,then in second kill 41, in third global kill 60 etc... I don't need to "+" :/ So how to fix :mrgreen: PHP Code:
PHP Code:
|
Re: Looping through all players and getting global variable
PHP Code:
|
Re: Looping through all players and getting global variable
Already tryied that trick Exo, when all players dead and have 0 tickets, it will print "Preds Remaining : 11"
So i've made this : PHP Code:
But I've check if g_Tickets[Players[i]] > 0 :/ |
Re: Looping through all players and getting global variable
PHP Code:
PHP Code:
|
Re: Looping through all players and getting global variable
Still buggy, when 7 terrors left and you will kill all ,it wil write " Preds Left: 1 "
God damn it Maybe someone can give a good code that will count all tickets from whole terrorist team |
Re: Looping through all players and getting global variable
Quote:
I see no logic in 21, 41, 60 as you said above. Loop through all alive terrorists and add up tickets? PHP Code:
|
Re: Looping through all players and getting global variable
Tickets - I mean how much times you can respawn.
You gave the same code :/ PHP Code:
Like exolents says you must then do PHP Code:
It will show then 11 players in teror team and not all tickets of players. God damn it, hard to explain |
| All times are GMT -4. The time now is 15:40. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.