View Single Post
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 12-14-2017 , 15:10   Re: Base Builder Zombie Mod v6.5 [01/15/2011]
Reply With Quote #1126

If you're experiencing problems with BaseBuilder v6.5, this is the fix.

Change this
PHP Code:
public Respawn_Player(id)
{
    
id-=TASK_RESPAWN
    
    
if (!is_user_connected(id))
        return 
PLUGIN_HANDLED
    
    
if (((g_boolCanBuild || g_boolPrepTime) && cs_get_user_team(id) == CS_TEAM_CT) || cs_get_user_team(id) == CS_TEAM_T)
    {
        
ExecuteHamB(Ham_CS_RoundRespawnid)
        
        
//Loop the task until they have successfully spawned
        
if (!g_isAlive[id])
            
set_task(3.0,"Respawn_Human",id+TASK_RESPAWN)
    }
    return 
PLUGIN_HANDLED

To this
PHP Code:
public Respawn_Player(id)
{
    
id-=TASK_RESPAWN
    
    
if (!is_user_connected(id))
        return 
PLUGIN_HANDLED
    
    
if (((g_boolCanBuild || g_boolPrepTime) && cs_get_user_team(id) == CS_TEAM_CT) || cs_get_user_team(id) == CS_TEAM_T)
    {
        
ExecuteHamB(Ham_CS_RoundRespawnid)
    }
    return 
PLUGIN_HANDLED

This
PHP Code:
public client_death(g_attackerg_victimwpnindexhitplaceTK)
{
    if (
is_user_alive(g_victim))
        return 
PLUGIN_HANDLED;
    
    
remove_task(g_victim+TASK_IDLESOUND)
    
    
g_isAlive[g_victim] = false;
    
    if (
TK == && g_attacker != g_victim && g_isZombie[g_attacker])
    {
        
client_cmd(0"spk %s"INFECTION)
        new 
szPlayerName[32]
        
get_user_name(g_victimszPlayerName31)
        
set_hudmessage(255255255, -1.00.4501.05.00.10.21)
        
show_hudmessage(0"%L"LANG_SERVER"INFECT_ANNOUNCE"szPlayerName);
    }
    
    
set_hudmessage(255255255, -1.00.4501.010.00.10.21)
    if (
g_isZombie[g_victim])
    {
        
show_hudmessage(g_victim"%L"LANG_SERVER"DEATH_ZOMBIE"g_iZombieTime);
        
set_task(float(g_iZombieTime), "Respawn_Player"g_victim+TASK_RESPAWN)
    }
    else if (
g_iInfectTime)
    {
        
show_hudmessage(g_victim"%L"LANG_SERVER"DEATH_HUMAN"g_iInfectTime);
        
cs_set_user_team(g_victimCS_TEAM_T)
        
g_isZombie[g_victim] = true
        set_task
(float(g_iInfectTime), "Respawn_Player"g_victim+TASK_RESPAWN)
    }
    
    return 
PLUGIN_CONTINUE;

To this
PHP Code:
public client_death(g_attackerg_victimwpnindexhitplaceTK)
{
    if (
is_user_alive(g_victim) || ! is_user_connected(g_attacker))
        return 
PLUGIN_HANDLED;
    
    
remove_task(g_victim+TASK_IDLESOUND)
    
    
g_isAlive[g_victim] = false;
    
    if (
TK == && g_attacker != g_victim && g_isZombie[g_attacker])
    {
        
client_cmd(0"spk %s"INFECTION)
        new 
szPlayerName[32]
        
get_user_name(g_victimszPlayerName31)
        
set_hudmessage(255255255, -1.00.4501.05.00.10.21)
        
show_hudmessage(0"%L"LANG_SERVER"INFECT_ANNOUNCE"szPlayerName);
    }
    
    
set_hudmessage(255255255, -1.00.4501.010.00.10.21)
    if (
g_isZombie[g_victim])
    {
        
show_hudmessage(g_victim"%L"LANG_SERVER"DEATH_ZOMBIE"g_iZombieTime);
        
set_task(float(g_iZombieTime), "Respawn_Player"g_victim+TASK_RESPAWN)
    }
    else if (
g_iInfectTime)
    {
        
show_hudmessage(g_victim"%L"LANG_SERVER"DEATH_HUMAN"g_iInfectTime);
        
cs_set_user_team(g_victimCS_TEAM_T)
        
g_isZombie[g_victim] = true
        set_task
(float(g_iInfectTime), "Respawn_Player"g_victim+TASK_RESPAWN)
    }
    
    return 
PLUGIN_CONTINUE;

If you want lock to be free to use for everyone, change

This
PHP Code:
#define FLAGS_LOCK     ADMIN_LEVEL_A 
To this
PHP Code:
#define FLAGS_LOCK     ADMIN_ALL 
You're welcome!
__________________
edon1337 is offline