Raised This Month: $ Target: $400
 0% 

Need to know which factors blocks team joining


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 06-30-2012 , 16:27   Need to know which factors blocks team joining
Reply With Quote #1

Well, with orpheu (editing Arkshine's Infinite Round plugin) I've done a way for blocking round ends, and made my own round end conditions, for Zombie Plague.

With this I was thinking on: filling the CT team on round starting, and move one CT to T (first zombie infection) without "triggering the Game Commencing event".

I'm using a custom joining menu, overriding the default's team choosing menues. For forcing a player to join to the team (by default it chooses a random team because on ZP we don't care about the joining team on round starting) which uses Jailbreak's joining method

PHP Code:
public team_join(idCsTeams:team)
{
    static 
restorevguimsgblock

    restore 
get_pdata_int(idm_iVGUI)
    
vgui restore & (1<<0)
    if(
vgui)
        
set_pdata_int(idm_iVGUIrestore & ~(1<<0))

    switch(
team)
    {
        case 
CS_TEAM_SPECTATOR:
        {
            
msgblock get_msg_block(g_MsgShowMenu)
            
set_msg_block(g_MsgShowMenuBLOCK_ONCE)
            
dllfunc(DLLFunc_ClientPutInServerid)
            
set_msg_block(g_MsgShowMenumsgblock)
            
set_pdata_int(idm_fGameHUDInitialized1)
            
engclient_cmd(id"jointeam""6")
        }
        case 
CS_TEAM_TCS_TEAM_CT:
        {
            
msgblock get_msg_block(g_MsgShowMenu)
            
set_msg_block(g_MsgShowMenuBLOCK_ONCE)
            
engclient_cmd(id"jointeam", (team == CS_TEAM_CT) ? "2" "1")
            
engclient_cmd(id"joinclass""1")
            
set_msg_block(g_MsgShowMenumsgblock)
            
g_PlayerSpect[id] = 0
        
}
    }
    
    if(
vgui)
        
set_pdata_int(idm_iVGUIrestore)

(my code it's not exactly as the previous code, it's a little bit edited, with many things, forget it)

That works fine, and it worked better with this fix: http://forums.alliedmods.net/showpos...00&postcount=4

There is another thing that maybe can disallow a player from joining to the CT team? It's a 32 slots server, and I don't know if everyone can join to the same team on every map, and I don't have the probided people for testing this... I was thinking on info_player_start entities if they are less of 32, or something, would be nice if someone provides some information, or better, decode the joining team function from the engine, anyway would be a good contribution
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
 



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