Split team
Hello all, I am trying to do the following:
I want to get the number of the players in the terrorist team, and then "split" them to two teams by setting bits. For example: PHP Code:
Thank you in advance :) |
Re: Split team
Divide the players by 2.
make 2 new variables and set 1 half as players1 and the other as players2. then make again 2 new variables: team1 and team2. set_bit(team1, players1) set_bit(team2, players2) Don't even know if that would work what you're doing but you could try. also, print a message to check if it works. |
Re: Split team
PHP Code:
|
Re: Split team
Allright, so, what I am trying to do is make half the terrorists glow red, and the another half of the terrorists glow blue.
I tried this: PHP Code:
|
Re: Split team
The only problem I see is that you are selecting all alive players, not just alive Terrorists.
Here's how to add team filter to get_players(): Code:
Other than that, your code is fine. |
Re: Split team
Still, it just won't work, and I just don't get why !
I am a CT and I have two Ts in front of me. I type the command. Then a message is printed to confirm the function was executed, but none of the Ts is glowing.. |
Re: Split team
Do you have semiclip or some other plugin running that changes their rendering?
|
Re: Split team
Well, in the same plugin sometimes another glow is added, but never at the same time I am executing this function. Also, all the other renderings added are resetted at the round start ..
edit: Allright, I fixed it after all. Thank you for the code :) |
Re: Split team
Sorry for double posting.
Even though I thought it was fixed, after trying it with two players, I noted that they both had the sae glow, so they actually where not split, but they just got both the same glow. Is there maybe another way of doing this ? Thank you for all the help :) |
Re: Split team
Show your code.
|
| All times are GMT -4. The time now is 06:19. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.