Raised This Month: $ Target: $400
 0% 

Sometimes server crash after killing. [solved]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
elchrissr
BANNED
Join Date: Sep 2011
Old 09-27-2011 , 19:16   Sometimes server crash after killing. [solved]
Reply With Quote #1

what is wrong?

PHP Code:
public fw_PlayerKilled(victimattackershouldgib)
{
    
// Last Zombie Check
    
set_task(0.1"fnCheckLastZombie")
    
    
// Enable dead players nightvision
    
set_task(0.2"spec_nvision"victim)
    
    
remove_task(victim+TASK_BLOOD)
    
// Get nightvision give setting
    
static nvggive
    nvggive 
get_pcvar_num(cvar_nvggive)
    
    
// Disable nightvision when killed (bugfix)
    
if (nvggive == && g_nvision[victim])
    {
        if (
g_nvisionenabled[victim] && !get_pcvar_num(cvar_cnvg)) set_user_gnvision(victim0)
        
g_nvision[victim] = false
        g_nvisionenabled
[victim] = false
    
}
    
    
// Turn off nightvision when killed (bugfix)
    
if (nvggive == && g_nvision[victim] && g_nvisionenabled[victim])
    {
        if (!
get_pcvar_num(cvar_cnvg)) set_user_gnvision(victim0)
        
g_nvisionenabled[victim] = false
    
}
    
    
// Nemesis explodes!
    
if (g_nemesis[victim])
        
SetHamParamInteger(32)
    
    if (
get_user_frags(attacker) > 100)
        
set_pev(attackerpev_frags0)
    
    if (
get_user_deaths(victim) > 100)
        
fm_set_user_deaths(victim0)
    
    
// Get deathmatch mode status and whether the player killed himself
    
static deathmatchselfkill
    deathmatch 
get_pcvar_num(cvar_deathmatch)
    
selfkill = (victim == attacker || !is_user_connected(attacker)) ? true false
    
    
// Respawn if deathmatch is enabled
    
if (deathmatch)
    {
        
// Respawn on suicide?
        
if (selfkill && !get_pcvar_num(cvar_respawnonsuicide))
            return;
        
        
// Respawn if only the last human is left?
        
if (!get_pcvar_num(cvar_respawnafterlast) && fnGetHumans() == 1)
            return;
        
        
// Respawn as zombie?
        
if (deathmatch == || (deathmatch == && random_num(01)) || (deathmatch == && fnGetZombies() < fnGetAlive()/2))
            
g_respawn_as_zombie[victim] = true
        
        
// Set the respawn task
        
set_task(5.0"respawn_player"victim+TASK_SPAWN)
    }
    
    
// Killed by a non-player entity or self killed
    
if (selfkill) return;
    
    if (
g_nemesis[victim])
    {
        if (
ganancia 0g_puntos[attacker][0] += g_admin[attacker]
        
client_print(attackerprint_center"Ganaste %d punto%s humano%s"g_admin[attacker], (g_admin[attacker] > 1) ? "s" "", (g_admin[attacker] > 1) ? "s" "")
        
registro_sound(attackerBOTON_GOOD)
    }
    else if (
g_survivor[victim])
    {
        if (
ganancia 0g_puntos[attacker][1] += g_admin[attacker]
        
client_print(attackerprint_center"Ganaste %d punto%s zombie%s"g_admin[attacker], (g_admin[attacker] > 1) ? "s" "", (g_admin[attacker] > 1) ? "s" "")
        
registro_sound(attackerBOTON_GOOD)
    }
    else if (
g_ninja[victim])
    {
        if (
ganancia 0g_puntos[attacker][1] += g_admin[attacker]
        
client_print(attackerprint_center"Ganaste %d punto%s zombie%s"g_admin[attacker], (g_admin[attacker] > 1) ? "s" "", (g_admin[attacker] > 1) ? "s" "")
        
registro_sound(attackerBOTON_GOOD)
    }
    else if (
g_zombie[victim] && g_ninjaround && g_ninja[attacker])
    {
        
check_player_level(attacker15001)
        
client_print(attackerprint_center"+150 POR ZOMBIE MATADO")
    }
    
    
    
// Zombie/nemesis killed human, reward ammo packs
    
if (g_zombie[attacker] && (!g_nemesis[attacker] || !get_pcvar_num(cvar_nemignoreammo)))
        
check_player_level(attacker15001)
    
    
// Human killed zombie, add up the extra frags for kill
    
UpdateFrags(attackervictim100)


Last edited by elchrissr; 10-18-2011 at 00:07.
elchrissr is offline
 


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 19:40.


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