Raised This Month: $51 Target: $400
 12% 

CS_SwitchTeam doesn't spawn


Post New Thread Reply   
 
Thread Tools Display Modes
ShufflexDD
Senior Member
Join Date: Apr 2011
Location: :noitaɔo˩
Old 08-07-2013 , 00:19   Re: CS_SwitchTeam doesn't spawn
Reply With Quote #11

Quote:
Originally Posted by thetwistedpanda View Post
Then, hook "jointeam", assign your team there if they're new, set them a boolean flag that they need to have a class set, then when you're ready to spawn them (or at the end of a round), FakeClientCommand them to joinclass 1-4 (T) 5-6 (CT) and they're ready for either CS_RespawnPlayer or automatic spawning next round.
Quote:
Originally Posted by ShufflexDD View Post
Yes, I can make a variable, and spawn 'em next round automatically, but that doesn't sound well.
__________________

⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈
Check this website and find out how many functions
it has working with game server together.
ShufflexDD is offline
Send a message via ICQ to ShufflexDD Send a message via Skype™ to ShufflexDD
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 08-07-2013 , 06:47   Re: CS_SwitchTeam doesn't spawn
Reply With Quote #12

Also, you can't skip the joinclass menu if you don't do it in jointeam.
__________________
thetwistedpanda is offline
Smffy
Senior Member
Join Date: Sep 2012
Old 08-07-2013 , 18:42   Re: CS_SwitchTeam doesn't spawn
Reply With Quote #13

Can you not just use this:

https://forums.alliedmods.net/showth...ht=AutoRespawn

Set the delay to whatever you want and then your team move can be its own thing, or just add your code in to this... Also someone flagged it respawns spectators so probably add something to check the team is >=2 to the spawn bit:

PHP Code:
public Action:RespawnClientHandle:timerany:client )
{
    if( 
GetConVarBool(sm_ar_enable) )
    {
        if ( 
IsValidEntity(client) && IsClientInGame(client) && IsClientObserver(client) && !IsPlayerAlive(client) )
        {
            if ( 
GetConVarBool(ar_dissolve_ragdolls) )
            {
                  new 
ragdoll GetEntPropEnt(clientProp_Send"m_hRagdoll");
                  if ( 
ragdoll )
                {
                    new 
ent CreateEntityByName("env_entity_dissolver");
                    if ( 
ent )
                    {
                        new 
String:dissolvename[32];
                        
Format(dissolvenamesizeof(dissolvename), "dis_%d"client);
                        
DispatchKeyValue(ragdoll"targetname"dissolvename);
                        
DispatchKeyValue(ent"dissolvetype""0");
                        
DispatchKeyValue(ent"target"dissolvename);
                        
AcceptEntityInput(ent"Dissolve");
                        
AcceptEntityInput(ent"kill");
                    }
                }
            }
            
            
CS_RespawnPlayer(client);
        }
    }

Something like this:

PHP Code:
    new team GetClientTeam(client);
    {
        if(
team >= 2)
        { 
Withing the rest, i'm a beginner though so i'm sure the panda can tell me to shut up and stop being a dumb ass ;). Basically why code up something that already exists.
Smffy is offline
Reply



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 12:02.


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