Raised This Month: $ Target: $400
 0% 

switch team


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
zombieplague
Veteran Member
Join Date: Apr 2009
Old 07-21-2010 , 04:41   Re: switch team
Reply With Quote #5

Quote:
Originally Posted by mottzi View Post
with this code the first CT who kill a T will switch to T and the killed T will switch to CT!

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

new bool:killed

public plugin_init() {
    
register_plugin("dontknowthenameofthisplugin""1.0""Mottzi")
    
register_event "DeathMsg" "e_DeathMsg" "a" );
    
register_logevent("round_start"2"1=Round_Start");
}

public 
e_DeathMsg()
{
    new 
killer read_data(1), victim read_data(2)
    if(
killed == false)
    {
        if(
cs_get_user_team(killer) == CS_TEAM_CT)
        {
            if(
killer <= 32 && killer >= && killer != 0)
            {
                if(
victim <= 32 && victim >= && victim != 0)
                {
                    
// set the killed t to CT
                    
cs_set_user_team(victimCS_TEAM_CT)
                    
                    
// set the CT (killer) to T
                    
cs_set_user_team(killerCS_TEAM_T)
                    
killed true;
                }
            }
        }
    }                
}

public 
round_start()
{
    
killed false;


Does this include when the CT can't kill all the T. The whole process repeat again. like going back to normal ?
zombieplague 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 07:08.


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