Raised This Month: $ Target: $400
 0% 

Need to know which factors blocks team joining


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 06-30-2012 , 17:46   Re: Need to know which factors blocks team joining
Reply With Quote #2

For team balance there's 2 offsets of CHalfLifeMultiplay object with total spawn points for each team.
That's calculated once at map load. Even if you change info_player_* classnames, you should modify this values.

There's no specific function for team join. There's a "think" call for CHalfLifeMultiplay and for the player then some checks are done regarding current m_iJoiningState (an offset of the player entity) and it last menu opened. Then the program put the player in the team selected.

Best way is to put players as spectators in the correct moment, avoiding them to select team (blocking some commands). Then at spectator make a control to check if it has selected (or joined) a team or not for first time.

You can check offsets at wiki for CBasePlayer. For CHalfLifeMultiplay you can check my CS/CZ Ida Suite at http://forums.alliedmods.net/showthread.php?t=185936


EDIT:

Maybe there's a simple way, not tested.

- At precache + KeyValue, rename classnames for CT spawnpoints to TT spawnpoints, then you will get that only TT can join.
- After precache, create CT spawnpoints
- During the game, move players from TT to CT as needed
- You have to check what happends with team balance. Maybe everyone will go to TT, not tested of course.
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.

Last edited by joropito; 06-30-2012 at 17:48.
joropito is offline
Send a message via MSN to joropito
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode