How to check players in teams?
I want to check if there is more than 5 player in each team (CT and T). Oh. And check that only at round start. Thanks.
|
Re: How to check players in teams?
Hook round start event.
make each variable for each team (CTvar, Tvar). Loop though all players and check their team, if they are CT then CTvar++ if T then Tvar++ After the loop check if(CTvar > 5 && Tvar > 5) problem ? |
Re: How to check players in teams?
Maybe. Like this? I use hamsandwich, so its the same if round start or player spawn.
PHP Code:
|
Re: How to check players in teams?
you should use cs_get_user_team if you are using CS_TEAM_T and CT values, or use get_user_team == 1 | 2
|
Re: How to check players in teams?
PHP Code:
|
Re: How to check players in teams?
How about this?:
PHP Code:
|
Re: How to check players in teams?
Quote:
|
Re: How to check players in teams?
You created a variable for every player what is not needed for that.
And you should reset the variable counts after counting. |
Re: How to check players in teams?
Done.
Quote:
|
Re: How to check players in teams?
Sorry for double post, but what teams are these?
PHP Code:
|
| All times are GMT -4. The time now is 14:18. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.