Raised This Month: $ Target: $400
 0% 

Wierd respawn


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 01-05-2011 , 11:52   Re: Wierd respawn
Reply With Quote #3

PHP Code:
/* Plugin generated by AMXX-Studio */
 
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
 
#define PLUGIN "Fair Teams"
#define VERSION "1.0"
#define AUTHOR "Len"
 
 
public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("jointeam""block_jointeam")
}
 
public 
block_jointeam(id) {
    new 
team[2]
    
read_argv(1team1)
    if (
access(idADMIN_IMMUNITY)) {
        if (
team[0] == '1'cs_set_user_team(idCS_TEAM_T)
        if (
team[0] == '2'cs_set_user_team(idCS_TEAM_CT)
        
SPAWN_PLAYER(id);
    }
 
    if (
CS_TEAM_UNASSIGNED cs_get_user_team(id) < CS_TEAM_SPECTATOR) return PLUGIN_HANDLED
 
    
if (team[0] == '3') {
        
cs_set_user_team(id,CS_TEAM_SPECTATOR)
        return 
PLUGIN_HANDLED
    
}
 
    new 
iteam_balance[3], max_players
    team_balance
[team[0]] = 1
    max_players 
get_maxplayers()
 
    for (
1<= max_playersi++) {
        if (
cs_get_user_team(id) == CS_TEAM_Tteam_balance[0]++
        else if (
cs_get_user_team(id) == CS_TEAM_Tteam_balance[1]++
    }
 
    
team_balance[2] = team_balance[0] - team_balance[1]
 
    if ((
team_balance[2] < -1) || (team_balance[2] > 1)) {
        if (
team_balance[1] > team_balance[1]) cs_set_user_team(idCS_TEAM_T)
        else if (
team_balance[0] > team_balance[1]) cs_set_user_team(idCS_TEAM_CT)
    }
 
    if ((
team[0] == '1') && (cs_get_user_team(id) != CS_TEAM_T)) cs_set_user_team(idCS_TEAM_T)
    else if ((
team[0] == '2') && (cs_get_user_team(id) != CS_TEAM_CT)) cs_set_user_team(idCS_TEAM_CT)
 
    return 
PLUGIN_HANDLED
}  

SPAWN_PLAYER(id)
    
ExecuteHamB(Ham_CS_RoundRespawnid); 
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
 



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


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