Raised This Month: $ Target: $400
 0% 

Changing Teams Help!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 04-14-2013 , 20:18   Re: not important, don't open me
Reply With Quote #7

i dont know if this is correct but i tested with bots and when you kill someone what ever team they were on they switch next round... and you also switch on next round....

and if you didnt kill anyone then you dont switch...

this what you want?

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

#define PLUGIN "New Plug-In" 
#define VERSION "1.0" 
#define AUTHOR "oxygen" 

new NRTS[33] = false;

public 
plugin_init()  

    
register_plugin(PLUGINVERSIONAUTHOR
    
register_event("DeathMsg""Event_DeathMsg""a"
    
register_logevent("logevent_round_end"2"1=Round_End")  

public 
Event_DeathMsg() 

    new 
iKiller read_data(1
    new 
iVictim read_data(2
    
    
NRTS[iKiller] = true;
    
NRTS[iVictim] = true;
    
set_task(1.0"Change_Teams"iVictim)


public 
logevent_round_end() 

    new 
players[32], pnumtempid 
    get_players
(playerspnum"ac""CT");  
    for( new 
0i<pnumi++ )  
    {  
        
tempid players[i]; 
        
        
set_task(1.0"Change_Teams"tempid)
    } 
}  

public 
Change_Teams(id)
{
    if(
NRTS[id])
    {
        switch(
cs_get_user_team(id))
        {
            case 
CS_TEAM_CTcs_set_user_team(idCS_TEAM_T);
            case 
CS_TEAM_Tcs_set_user_team(idCS_TEAM_CT);
        }
    }

__________________
Blizzard_87 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 10:54.


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