Raised This Month: $ Target: $400
 0% 

Wierd respawn


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Len
Senior Member
Join Date: Dec 2007
Old 01-03-2011 , 17:50   Wierd respawn
Reply With Quote #1

No armor or health showing, I tried with spawn(id) it does the same, think im missing something with ham respawn, help please

edit:
tried cs_set_user_armor and set_user_health after ExecuteHamB(Ham_CS_RoundRespawn, id) and putting a model for cs_set_user_team still the same problem, someone tell me how I sort this out :/..


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)
        goto 
SPAWN_PLAYER
    
}
 
    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)
        goto 
SPAWN_PLAYER
    
}
 
    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)
 
    
SPAWN_PLAYER:
 
    
ExecuteHamB(Ham_CS_RoundRespawnid)
    return 
PLUGIN_HANDLED


Last edited by Len; 01-03-2011 at 19:47.
Len 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 02:09.


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