Raised This Month: $ Target: $400
 0% 

[Help] Swap


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
LostSkill
Senior Member
Join Date: Jun 2008
Location: Monuhuelo Island
Old 12-19-2008 , 06:19   [Help] Swap
Reply With Quote #1

hi guy well i try do swap after 5 rounds, i dont get eny errors but in server it not works. so maybe u can look what wrong in it
PHP Code:
#include <amxmodx>
#include <cstrike>

#define PLUGIN "Auto Change Team"
#define VERSION "1.0"
#define AUTHOR "LostSkill"
#define START "sound/tmreverse.mp3"
#define END "sound/tmreversed.mp3"

new round 1
new g_iRoundCount 1


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_logevent("logevent_Round_Start"2"1=Round_Start")
    
register_logevent("eRoundEnd"2"1=Round_End")
}

public 
logevent_Round_Start() {
    
round++;
    
    new 
players[32], playerpnum;
    
get_players(playerspnum"a");
    for(new 
0pnumi++)
    {
        
player players[i];
        if(!
is_user_connected(player))
        {
            if(
round == 5
            {
                
client_cmd(0"mp3 play ^"%s^""START)
            }
            else if(
round == 6
            {
                
client_cmd(0"mp3 play ^"%s^""END)
            }
        }
    }
}

public 
eRoundEnd() 

    
g_iRoundCount++ 

    new 
players[32], playerpnum;
    
get_players(playerspnum"a");
    for(new 
0pnumi++)
    {
        
player players[i];
        if(!
is_user_connected(player))
        {
            if(
g_iRoundCount == 5
            {
                if(
cs_get_user_team(player) == CS_TEAM_T)
                
cs_set_user_team(playerCS_TEAM_CT);
                else if(
cs_get_user_team(player) == CS_TEAM_CT)
                
cs_set_user_team(playerCS_TEAM_T);
            }
        }
    }

}

public 
plugin_precache()
{
    
precache_generic(START)
    
precache_generic(END)

__________________
MY ENGLISH IS BAD.....
LostSkill is offline
Send a message via MSN to LostSkill
 


Thread Tools
Display Modes

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 09:07.


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