Optimized way of grouping players between the teams
For all honesty, I don't really enjoy my current approach of grouping players.
I want to group them so that terrorists will be always twice as much as the CTs. For instance we have 10 players. CTs would be 3, terrorists would be 7 (the additional one deducts to the terrorists team). My first idea was something like that: PHP Code:
_____________________________________________ _____________________________________________ _______________________________ Anyway, my current approach that works is terrifying. I am using the Ham_Spawn to hook earliest player spawn (including for bots) in order to apply cs_set_user_team The callback function looks like: PHP Code:
As you can see it clearly sucks. Not only the "create entity ham" seems not to be the appropriate one.. but also the intervention of get_players bothers me like a lot. Can anyone help me create/fix another/this approach by maybe applying a formula close to the one I got and the correct working hook? |
Re: Optimized way of grouping players between the teams
Look at Team Ratio even better just use it. It does what you want.
|
Re: Optimized way of grouping players between the teams
I feel awful.
|
| All times are GMT -4. The time now is 22:12. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.