Raised This Month: $51 Target: $400
 12% 

.....


Post New Thread Reply   
 
Thread Tools Display Modes
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 11-22-2022 , 09:10   Re: .....
Reply With Quote #21

I found this somewhere, maybe it is the solution to this problem
PHP Code:
public client_death(g_attackerg_victimwpnindexhitplaceTK)
{
    if (
is_user_alive(g_victim) || !is_user_connected(g_victim) || !is_user_connected(g_attacker) || g_victim == 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;
}

public 
Respawn_Player(id)
{
    
id-=TASK_RESPAWN
    
    
if (!g_isConnected[id] || g_isAlive[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_Player",id+TASK_RESPAWN)
    }
    return 
PLUGIN_HANDLED

__________________
amirwolf is offline
Reply



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 10:43.


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