Raised This Month: $ Target: $400
 0% 

Sometimes server crash after killing. [solved]


Post New Thread Reply   
 
Thread Tools Display Modes
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
elchrissr
BANNED
Join Date: Sep 2011
Old 10-07-2011 , 14:46   Re: Sometimes server crash after killing.
Reply With Quote #2

BUMP
elchrissr is offline
Evaldas.Grigas
Senior Member
Join Date: Sep 2011
Location: Lithuania
Old 10-07-2011 , 14:49   Re: Sometimes server crash after killing. [1st bump]
Reply With Quote #3

So. You tell us what is wrong. What errors and so on?
Evaldas.Grigas is offline
Send a message via Skype™ to Evaldas.Grigas
elchrissr
BANNED
Join Date: Sep 2011
Old 10-07-2011 , 14:50   Re: Sometimes server crash after killing. [1st bump]
Reply With Quote #4

Sometimes, killing a lot of people, server crash..
elchrissr is offline
Evaldas.Grigas
Senior Member
Join Date: Sep 2011
Location: Lithuania
Old 10-07-2011 , 14:53   Re: Sometimes server crash after killing. [1st bump]
Reply With Quote #5

I don't know.
Evaldas.Grigas is offline
Send a message via Skype™ to Evaldas.Grigas
sake
Senior Member
Join Date: Jul 2011
Old 10-09-2011 , 17:11   Re: Sometimes server crash after killing. [1st bump]
Reply With Quote #6

Just a guess, but is this array 33slots long or 32?:

g_nvisionenabled[victim]
__________________
sake is offline
elchrissr
BANNED
Join Date: Sep 2011
Old 10-18-2011 , 00:06   Re: Sometimes server crash after killing. [1st bump]
Reply With Quote #7

Anything wrong here, solved, a lot of thanks.
elchrissr 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 19:40.


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