[SOLVED]Team Limit?
Hey...I am kinda new to scripting,all I need to know is how can I limit the number of members of a Team...Let's say I want that the CT team has a maximum of 5 persons,that will be randomly chosen when a new round starts...Can you please help me?
I tried with cs_get_user_team and cs_set_user_team but nothing good happened... Regards,Brreaker. |
Re: Team Limit?
A fast way is moving everyone to terrorist at the end of the round and then picking random 5 people to be the CTs. You can use functions register_logevent and get_players, just search the forums on those.
Edit: The use of cs_set_user_team is still essential here. |
Re: Team Limit?
|
Re: Team Limit?
xBatista...I tried to search,but I found nothing that could help...Vitorrd...Can you help me a little bit?What should I do...Do like if the team of the user is CT he should be automaticaly transfered to T?
|
Re: Team Limit?
The algorithm is simple, and should happen at the end of the round:
1 - Move everyone to T. 2 - Get the players online (simply use get_players with no flags). 3 - Move 5 random players to CT. As simple as that. |
Re: Team Limit?
Solved!Thx vitorrd!+ karma!Topic Lock Please!
|
| All times are GMT -4. The time now is 22:35. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.