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

[BIO] Respawn plugin crashes server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 09-05-2020 , 10:24   [BIO] Respawn plugin crashes server
Reply With Quote #1

Hi, i have no idea why this plugin crashes my server, like when countdown reaches 7 my hlds just restarts and it also doesnt show any crash logs etc, it just crashes thats all. Anyone can help me?
Attached Files
File Type: sma Get Plugin or Get Source (bio_respawn.sma - 95 views - 2.7 KB)

Last edited by HowToRuski; 09-05-2020 at 10:29.
HowToRuski is offline
ZaX
Senior Member
Join Date: Jan 2015
Old 09-05-2020 , 10:36   Re: [BIO] Respawn plugin crashes server
Reply With Quote #2

You sure that this plugin causing the issue? Did you try to disable it and see whether it still crashes or not?
ZaX is offline
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 09-05-2020 , 10:38   Re: [BIO] Respawn plugin crashes server
Reply With Quote #3

Quote:
Originally Posted by ZaX View Post
You sure that this plugin causing the issue? Did you try to disable it and see whether it still crashes or not?
This is why i made this post. Yes, exactly this plugin does crash.
HowToRuski is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 09-05-2020 , 11:06   Re: [BIO] Respawn plugin crashes server
Reply With Quote #4

Quote:
Originally Posted by HowToRuski View Post
This is why i made this post. Yes, exactly this plugin does crash.
There's somethings wrong in this plugin like:
1. in this faction
PHP Code:
public enfeksiyon_tipi(id)
{
    if(
is_user_connected(id))
    {
        switch(
get_pcvar_num(cvar_enf_sec))
        {
            case 
1insan(id)
            case 
2zombie(id)
            case 
3:
            {
                switch(
random_num(1,2))
                {
                    case 
1insan(id)
                    case 
2zombie(id)
                }
            }
        }
        
        if(
get_pcvar_num(cvar_godmode))
        {
            
fm_set_user_godmode(id1)
            
set_task(get_pcvar_float(cvar_godmode_timer), "stop_god"id)
        }
    }

This mod have zombie and human system so the problem in this plugin
PHP Code:
case 1insan(id)
                    case 
2zombie(id
The errors in those factions
Change those codes from:

PHP Code:
public zombie(id)
{
    if(!
is_user_zombie(id))
    {
        
infect_user(id0)
        
cs_set_user_team(idCS_TEAM_T)
    }
}

public 
insan(id)
{
    if(
is_user_zombie(id))
    {
        
cure_user(id)
        
cs_set_user_team(idCS_TEAM_CT)
    }
            
    
fm_give_item(id"weapon_m4a1")
    
fm_give_item(id"weapon_deagle")
    
fm_give_item(id"weapon_hegrenade")
    
fm_give_item(id"weapon_smokegrenade")
    
fm_give_item(id"weapon_flashbang")
    
cs_set_user_bpammo(idCSW_M4A1200)
    
cs_set_user_bpammo(idCSW_DEAGLE200)
    
cs_set_user_bpammo(idCSW_HEGRENADE1)
    
cs_set_user_bpammo(idCSW_SMOKEGRENADE1)
    
cs_set_user_bpammo(idCSW_FLASHBANG1)

To:

PHP Code:
public zombie(id)
{
    if(
is_user_zombie(id))
    {
        
infect_user(id0)
        
cs_set_user_team(idCS_TEAM_T)
    }
}

public 
insan(id)
{
    if(!
is_user_zombie(id))
    {
        
cure_user(id)
        
cs_set_user_team(idCS_TEAM_CT)
    }
            
    
fm_give_item(id"weapon_m4a1")
    
fm_give_item(id"weapon_deagle")
    
fm_give_item(id"weapon_hegrenade")
    
fm_give_item(id"weapon_smokegrenade")
    
fm_give_item(id"weapon_flashbang")
    
cs_set_user_bpammo(idCSW_M4A1200)
    
cs_set_user_bpammo(idCSW_DEAGLE200)
    
cs_set_user_bpammo(idCSW_HEGRENADE1)
    
cs_set_user_bpammo(idCSW_SMOKEGRENADE1)
    
cs_set_user_bpammo(idCSW_FLASHBANG1)

Supremache is offline
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 09-05-2020 , 11:09   Re: [BIO] Respawn plugin crashes server
Reply With Quote #5

Quote:
Originally Posted by Supremache View Post
There's somethings wrong in this plugin like:
1. in this faction
PHP Code:
public enfeksiyon_tipi(id)
{
    if(
is_user_connected(id))
    {
        switch(
get_pcvar_num(cvar_enf_sec))
        {
            case 
1insan(id)
            case 
2zombie(id)
            case 
3:
            {
                switch(
random_num(1,2))
                {
                    case 
1insan(id)
                    case 
2zombie(id)
                }
            }
        }
        
        if(
get_pcvar_num(cvar_godmode))
        {
            
fm_set_user_godmode(id1)
            
set_task(get_pcvar_float(cvar_godmode_timer), "stop_god"id)
        }
    }

This mod have zombie and human system so the problem in this plugin
PHP Code:
case 1insan(id)
                    case 
2zombie(id
The errors in those factions
Change those codes from:

PHP Code:
public zombie(id)
{
    if(!
is_user_zombie(id))
    {
        
infect_user(id0)
        
cs_set_user_team(idCS_TEAM_T)
    }
}

public 
insan(id)
{
    if(
is_user_zombie(id))
    {
        
cure_user(id)
        
cs_set_user_team(idCS_TEAM_CT)
    }
            
    
fm_give_item(id"weapon_m4a1")
    
fm_give_item(id"weapon_deagle")
    
fm_give_item(id"weapon_hegrenade")
    
fm_give_item(id"weapon_smokegrenade")
    
fm_give_item(id"weapon_flashbang")
    
cs_set_user_bpammo(idCSW_M4A1200)
    
cs_set_user_bpammo(idCSW_DEAGLE200)
    
cs_set_user_bpammo(idCSW_HEGRENADE1)
    
cs_set_user_bpammo(idCSW_SMOKEGRENADE1)
    
cs_set_user_bpammo(idCSW_FLASHBANG1)

To:

PHP Code:
public zombie(id)
{
    if(
is_user_zombie(id))
    {
        
infect_user(id0)
        
cs_set_user_team(idCS_TEAM_T)
    }
}

public 
insan(id)
{
    if(!
is_user_zombie(id))
    {
        
cure_user(id)
        
cs_set_user_team(idCS_TEAM_CT)
    }
            
    
fm_give_item(id"weapon_m4a1")
    
fm_give_item(id"weapon_deagle")
    
fm_give_item(id"weapon_hegrenade")
    
fm_give_item(id"weapon_smokegrenade")
    
fm_give_item(id"weapon_flashbang")
    
cs_set_user_bpammo(idCSW_M4A1200)
    
cs_set_user_bpammo(idCSW_DEAGLE200)
    
cs_set_user_bpammo(idCSW_HEGRENADE1)
    
cs_set_user_bpammo(idCSW_SMOKEGRENADE1)
    
cs_set_user_bpammo(idCSW_FLASHBANG1)

Well thanks for the help but looks like it didnt help me, still crashing :/
HowToRuski is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 09-05-2020 , 11:10   Re: [BIO] Respawn plugin crashes server
Reply With Quote #6

Quote:
Originally Posted by HowToRuski View Post
Well thanks for the help but looks like it didnt help me, still crashing :/
I didn't gave you the solve i told there's some wrongs in this plugin and i saw that problem

Edit: I saw another problem in this faction
PHP Code:
public respawn(o_id[]) 

    new 
id o_id[0
    if(
get_user_team(id) == || is_user_alive(id)) 
        return 
PLUGIN_CONTINUE 
    
    ExecuteHamB
(Ham_CS_RoundRespawnid)
    
    return 
PLUGIN_CONTINUE    

When plugin disable user alive in respawn faction so it mean this faction will never work.

so change those codes from:

PHP Code:
if(get_user_team(id) == || is_user_alive(id)) 
        return 
PLUGIN_CONTINUE 
To:

PHP Code:
if(get_user_team(id) == || !is_user_alive(id)) 
        return 
PLUGIN_CONTINUE 

Last edited by Supremache; 09-05-2020 at 11:16.
Supremache is offline
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 09-05-2020 , 11:25   Re: [BIO] Respawn plugin crashes server
Reply With Quote #7

Quote:
Originally Posted by Supremache View Post
I didn't gave you the solve i told there's some wrongs in this plugin and i saw that problem

Edit: I saw another problem in this faction
PHP Code:
public respawn(o_id[]) 

    new 
id o_id[0
    if(
get_user_team(id) == || is_user_alive(id)) 
        return 
PLUGIN_CONTINUE 
    
    ExecuteHamB
(Ham_CS_RoundRespawnid)
    
    return 
PLUGIN_CONTINUE    

When plugin disable user alive in respawn faction so it mean this faction will never work.

so change those codes from:

PHP Code:
if(get_user_team(id) == || is_user_alive(id)) 
        return 
PLUGIN_CONTINUE 
To:

PHP Code:
if(get_user_team(id) == || !is_user_alive(id)) 
        return 
PLUGIN_CONTINUE 
Changed that, now the server doesnt crash but players arent respawning...
HowToRuski is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 09-05-2020 , 11:39   Re: [BIO] Respawn plugin crashes server
Reply With Quote #8

Quote:
Originally Posted by HowToRuski View Post
Changed that, now the server doesnt crash but players arent respawning...
Edit those codes again
from:
PHP Code:
if(get_user_team(id) == || !is_user_alive(id)) 
        return 
PLUGIN_CONTINUE 
to:
PHP Code:
if(!is_user_alive(id)) 
        return 
PLUGIN_CONTINUE 
If your problem didn't solved then let me check if there's other problems in this plugin

Last edited by Supremache; 09-05-2020 at 11:48.
Supremache is offline
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 09-05-2020 , 11:47   Re: [BIO] Respawn plugin crashes server
Reply With Quote #9

Quote:
Originally Posted by Supremache View Post
Edit those codes again
from:
PHP Code:
if(get_user_team(id) == || !is_user_alive(id)) 
        return 
PLUGIN_CONTINUE 
to:
PHP Code:
if(!is_user_alive(id)) 
        return 
PLUGIN_CONTINUE 
If you problem didn't solved so let me check if there's other erorrs
Doesnt crash the server but still not respawning. The ! is making them not respawn too...

Last edited by HowToRuski; 09-05-2020 at 11:48.
HowToRuski is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 09-05-2020 , 11:57   Re: [BIO] Respawn plugin crashes server
Reply With Quote #10

Quote:
Originally Posted by HowToRuski View Post
Doesnt crash the server but still not respawning. The ! is making them not respawn too...
Oh i did something wrong try this now
PHP Code:
public respawn(o_id[]) 
{
    new 
id o_id[0
    
    if (!
is_user_connected(id))
        return 
PLUGIN_CONTINUE
        
    
if (!is_user_alive(id))
    {
        
ExecuteHamB(Ham_CS_RoundRespawnid)

    }
    return 
PLUGIN_CONTINUE  
    

Supremache 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 21:09.


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