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

Team switch after losing round


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CoCe16
Junior Member
Join Date: Dec 2013
Old 07-12-2014 , 16:30   Team switch after losing round
Reply With Quote #1

Hi, have any of you played Basebuilder Mod? i have been looking for this plugin but i cant find it anywhere.. when the round ends and your team survived, you will still continue as the team you are, but if your team have lost the round, the teams will switch. Please Help!
CoCe16 is offline
CryWolf
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 07-12-2014 , 18:35   Re: Team switch after losing round
Reply With Quote #2

PHP Code:
#include <  amxmodx  >
#include <  cstrike  >


#pragma semicolon 1


#define PLUGIN "Delayed Furien TeamSwap"
#define VERSION "1.2b"

#define        SWITCH_TASK        112233


public plugin_init ( )
{
    
register_plugin(  PLUGIN,  VERSION,  "Askhanar" );
    
register_event"SendAudio",  "ev_SendAudioCounterWin",  "a",  "1=0",  "2=%!MRAD_ctwin"  );
    
}

public 
ev_SendAudioCounterWin ( )
{
    
    new 
iPlayers[  32  ],  iNum;
    
get_players(  iPlayers,  iNum,  "ch" );
    
    if(  
iNum  
    {
        new  
id;
        
        for(  --
iNum;  iNum  >=  0;  iNum--  ) 
        {
            
id  =  iPlayers[  iNum  ];
            
BeginDelayedTeamChange(  id  );
            
        }
    }
}

public 
BeginDelayedTeamChange id )
{
    
    switch(  
id  
    { 
        
        case  
1..6:  set_task(  0.1"ChangeUserTeamWithDelay",  id  +  SWITCH_TASK  ); 
        case  
7..13:  set_task(  0.2"ChangeUserTeamWithDelay",  id  +  SWITCH_TASK  ); 
        case  
14..20:  set_task(  0.3"ChangeUserTeamWithDelay",  id  +  SWITCH_TASK  ); 
        case  
21..26:  set_task(  0.4"ChangeUserTeamWithDelay",  id  +  SWITCH_TASK  ); 
        case  
27..32:  set_task(  0.5"ChangeUserTeamWithDelay",  id  +  SWITCH_TASK  ); 
    } 
}

public 
ChangeUserTeamWithDelay id )
{
    
    
id  -=  SWITCH_TASK;
    if(  !
is_user_connected(  id  )  )  return 1;
    
    switch(  
cs_get_user_team(  id  )   ) 
    {
        
        case  
CS_TEAM_T:  cs_set_user_team(  id,  CS_TEAM_CT  );
        case  
CS_TEAM_CTcs_set_user_team(  id,  CS_TEAM_T  );
            
    }
    
    return 
0;

or my version
PHP Code:
        /*      Team Switch (c) 2013
                     by CryWolf
                        URL: http://www.extreamcs.com/forum/pluginuri-extream/furien-team-switch-1-2-t215609.html
               
                changelog:
               
                        v1.2:
                        - Prima versiune publica
                       
                        v1.3
                        - Verificare admini adminii spectatori nu vor fi transferati
                        - cod optimizat
                        - folosire static in loc de new (ofera stabilitate mai mare)
               
                Info:
                * Pluginul este facut special pentru Furien Mod cant echipa CT castiga echipele vor fi
                        schimbate adica cei de la CT vor trece la tero si invers.
                Cvars:
                - amx_swteams 0 / 1
                0: Echipele nu vor fi transferate
                1: Transferul va avea efect
               
                - amx_swspect 0 / 1
                0: Nu transfera si spectatorii
                1: Transfera si spectatorii
       
                Mai exista:
                Este adevarat mai exista astfel de pluginuri dar nu ca acesta.
               
                De ce este asa unic ?
                * Pentru ca foloseste modulul "CS Team Changer" pentru a efectua transferurile
                        este un modul foarte puternic si poate transfera fara erori si alte probleme
                        pana la 60 de jucatori pe secunda, fata de CSTRIKE care pica serverul.
               
                Multumiri:
                claudiuhks: pentru modulul respectiv ( http://forums.alliedmods.net/showthread.php?t=163555 )
                AMXX Dev Team: pentru AMX Mod X
        */
       
        #include < amxmodx >
        #tryinclude < cs_team_changer >
       
        #pragma semicolon 1
       
        //Plugin registration
        
new const
                
PLUGIN_NAME     [ ] = "Team Switch",
                
PLUGIN_VERSION  [ ] = "1.3",
                
PLUGIN_AUTHOR   [ ] = "CryWolf";
       
        new 
cvar_disablecvar_spectators;
       
public 
plugin_init ( )
{
        
register_plugin PLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR );
        
register_event  "SendAudio""CsWteams""a""2=%!MRAD_ctwin" );
       
        
// Cvars:
        
cvar_disable    register_cvar "amx_swteams""1" );
        
cvar_spectators register_cvar "amx_swspect""0" );
}
 
public 
CsWteams ( )
{
        if ( !
get_pcvar_num cvar_disable ) )
                return 
1;
               
        static 
iPlayers 32 ], iNumiiPlayer;
        
get_players iPlayersiNum );
       
        for ( 
0iNumi++ ) {
                
iPlayer iPlayers ];
                switch ( 
get_user_team iPlayer ) ) {
                        case 
CSTEAM_CTcs_set_team iPlayerCSTEAM_TERRORIST );
                        case 
CSTEAM_TERRORISTcs_set_team iPlayerCSTEAM_CT );
                        case 
CSTEAM_SPECTATOR: if ( get_pcvar_num cvar_spectators ) || ( cvar_disable ) )
                                                        if ( 
is_user_admin iPlayer ) )
                                                                return 
1;
                                                        else
                                                                
cs_set_team iPlayerCSTEAM_CT );
                }
        }
        return 
0;
}
 
stock is_user_admin id ) {
        new 
__flags=get_user_flags id );
        return ( 
__flags && !( __flags&ADMIN_USER ) );

But my version uses ClaudiuHKS Module CS_Team_Changer
__________________
I dont walk trough this world with fear in my heart.
www.dark-arena.com L4D, CS1.6, CZ Servers
CryWolf is offline
Send a message via MSN to CryWolf Send a message via Yahoo to CryWolf
CoCe16
Junior Member
Join Date: Dec 2013
Old 07-15-2014 , 14:29   Re: Team switch after losing round
Reply With Quote #3

thank you!
CoCe16 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 13:42.


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