Raised This Month: $ Target: $400
 0% 

Server Shutdown....


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 07-27-2013 , 21:14   Server Shutdown....
Reply With Quote #1

Well idk why but server shutdown when read this:
PHP Code:
public Check_Rings(id)
{
    
strip_user_weapons(id)
    
set_user_rendering(idkRenderFxGlowShell2552550kRenderNormal25)
        
    new 
rings_for_ss get_pcvar_num(Rings_Amount)
    
Rings[id] -= rings_for_ss

EDIT:
I did debug, nothing comes up...
__________________

Last edited by Jhob94; 07-27-2013 at 21:26.
Jhob94 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-27-2013 , 21:45   Re: Server Shutdown....
Reply With Quote #2

What does it show in console when it crashes?

Also, you need to make sure that the client is connected and/or alive before calling certain player functions.
__________________
fysiks is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 07-27-2013 , 22:36   Re: Server Shutdown....
Reply With Quote #3

Option 1: First comment out lines one by one to check which one creates the problem. Then you search for that function to double check you used it correctly. Then you start adding your debug messages checking the parameters you send to that function.
If these steps don't give you results, you create a thread.

Option 2: Share source.

This is from another thread:
Quote:
Originally Posted by ConnorMcLeod View Post
You should open all plugins sources you use, and find those that are using strip_user_weapon() native.

When this native is used, you should add this line after the native :

set_pdata_int(id, 116, 0)

for example :

PHP Code:
    strip_user_weapons(id
->

PHP Code:
    strip_user_weapons(id)
    
set_pdata_int(id1160
I don't know why set_pdata_in() is needed, but it seems important.
__________________

Last edited by Black Rose; 07-27-2013 at 22:40.
Black Rose is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-28-2013 , 02:19   Re: Server Shutdown....
Reply With Quote #4

It has nothing to do with your crashes problem.

When you have a primary weapon, that pdata is set to 1, so armoury_entity entities are ignored when contain primary weapons.
cs strip system is missing the reset of that pdata, so when you strip player weapons he can't pickup map weapons on aim maps, that's all.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 07-28-2013 , 08:25   Re: Server Shutdown....
Reply With Quote #5

On console logs found this:
Code:
L 07/28/2013 - 14:19:00: [META] ini: Begin re-reading plugins list: /ftp/czero/addons/metamod/plugins.ini
L 07/28/2013 - 14:19:00: [META] ini: Read plugin config for: AMX Mod X
L 07/28/2013 - 14:19:00: [META] ini: Finished reading plugins list: /ftp/czero/addons/metamod/plugins.ini; Found 1 plugins
L 07/28/2013 - 14:19:00: [META] dll: Updating plugins...
L 07/28/2013 - 14:19:00: [META] dll: Finished updating 8 plugins; kept 1, loaded 0, unloaded 0, reloaded 0, delayed 0
L 07/28/2013 - 14:19:00: "[F]amily_B| Jhob94 > [D]ark_G <<-1><><TERRORIST>" disconnected
L 07/28/2013 - 14:19:00: "[F]amily_B| Piro14 > [D]ark_G <<-1><><CT>" disconnected
L 07/28/2013 - 14:19:00: World triggered "Round_Draw" (CT "0") (T "2")
L 07/28/2013 - 14:19:00: World triggered "Round_End"
L 07/28/2013 - 14:19:00: Server shutdown
L 07/28/2013 - 14:19:00: Log file closed
__________________
Jhob94 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-28-2013 , 09:56   Re: Server Shutdown....
Reply With Quote #6

Disable all 3rd party plugins.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 07-28-2013 , 10:38   Re: Server Shutdown....
Reply With Quote #7

Well the problem is really related to this plugin. I removed all 3rd party plugins and still same problem.
It has more few things in code but i dont think they are the problem.
Here is what was missing:
PHP Code:
public Check_Rings(id)
{
    new 
rings_for_ss get_pcvar_num(Rings_Amount)
    
    if(
Rings[id] < rings_for_ss)
        
// Client Print
    
    
else
    {
        
Sonic[id] = false
        Shadow
[id] = false
        Silver
[id] = false
        Knuckles
[id] = false
        Tails
[id] = false
        Rose
[id] = false
        Eggman
[id] = false
        SuperSonic
[id] = true
        
        strip_user_weapons
(id)
        
character_stuff(id)
        
set_user_rendering(idkRenderFxGlowShell2552550kRenderNormal25)
        
        
Rings[id] -= rings_for_ss
    
}
}

public 
character_stuff(id)
{
    if(
is_user_alive(id))
    {
        if(
Sonic[id] == true)
        {
            
set_user_health(idget_pcvar_num(HP_Sonic))
            
set_user_gravity(idget_pcvar_float(Gravity_Sonic)/800.0)
        }
    
        else if(
Shadow[id] == true)
        {
            
set_user_health(idget_pcvar_num(HP_Shadow))
            
set_user_gravity(idget_pcvar_float(Gravity_Shadow)/800.0)
        }
        
        else if(
Silver[id] == true)
        {
            
set_user_health(idget_pcvar_num(HP_Silver))
            
set_user_gravity(idget_pcvar_float(Gravity_Silver)/800.0)
        }
    
        else if(
Knuckles[id] == true)
        {
            
set_user_health(idget_pcvar_num(HP_Knuckles))
            
set_user_gravity(idget_pcvar_float(Gravity_Knuckles)/800.0)
        }
    
        else if(
Tails[id] == true)
        {
            
set_user_health(idget_pcvar_num(HP_Tails))
            
set_user_gravity(idget_pcvar_float(Gravity_Tails)/800.0)
        }
    
        else if(
Rose[id] == true)
        {
            
set_user_health(idget_pcvar_num(HP_Rose))
            
set_user_gravity(idget_pcvar_float(Gravity_Rose)/800.0)
        }
    
        else if(
Eggman[id] == true)
        {
            
set_user_health(idget_pcvar_num(HP_Eggman))
            
set_user_gravity(idget_pcvar_float(Gravity_Eggman)/800.0)
        }
        
        else if(
SuperSonic[id] == true)
        {
            
set_user_health(idget_pcvar_num(HP_SSonic))
            
set_user_gravity(idget_pcvar_float(Gravity_SSonic)/800.0)
        }
    }

PS: On spawn i do:
PHP Code:
public Player_Spawn_Post(id)
{
    if(
is_user_alive(id))
    {
        
strip_user_weapons(id)
        
        if(
SuperSonic[id] == true)
            
character_stuff(id)
        
        else
        {
            
Sonic[id] = false
            Shadow
[id] = false
            Silver
[id] = false
            Knuckles
[id] = false
            Tails
[id] = false
            Rose
[id] = false
            Eggman
[id] = false
            set_user_rendering
(idkRenderFxNone000kRenderNormal0)
        }
    }

__________________
Jhob94 is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 07-28-2013 , 12:22   Re: Server Shutdown....
Reply With Quote #8

Quote:
Originally Posted by Jhob94 View Post
Well the problem is really related to this plugin. I removed all 3rd party plugins and still same problem.
It has more few things in code but i dont think they are the problem.
Here is what was missing:
PHP Code:
public Check_Rings(id)
{
    new 
rings_for_ss get_pcvar_num(Rings_Amount)
    
    if(
Rings[id] < rings_for_ss)
        
// Client Print
    
    
else
    {
        
Sonic[id] = false
        Shadow
[id] = false
        Silver
[id] = false
        Knuckles
[id] = false
        Tails
[id] = false
        Rose
[id] = false
        Eggman
[id] = false
        SuperSonic
[id] = true
        
        strip_user_weapons
(id)
        
character_stuff(id)
        
set_user_rendering(idkRenderFxGlowShell2552550kRenderNormal25)
        
        
Rings[id] -= rings_for_ss
    
}
}

public 
character_stuff(id)
{
    if(
is_user_alive(id))
    {
        if(
Sonic[id] == true)
        {
            
set_user_health(idget_pcvar_num(HP_Sonic))
            
set_user_gravity(idget_pcvar_float(Gravity_Sonic)/800.0)
        }
    
        else if(
Shadow[id] == true)
        {
            
set_user_health(idget_pcvar_num(HP_Shadow))
            
set_user_gravity(idget_pcvar_float(Gravity_Shadow)/800.0)
        }
        
        else if(
Silver[id] == true)
        {
            
set_user_health(idget_pcvar_num(HP_Silver))
            
set_user_gravity(idget_pcvar_float(Gravity_Silver)/800.0)
        }
    
        else if(
Knuckles[id] == true)
        {
            
set_user_health(idget_pcvar_num(HP_Knuckles))
            
set_user_gravity(idget_pcvar_float(Gravity_Knuckles)/800.0)
        }
    
        else if(
Tails[id] == true)
        {
            
set_user_health(idget_pcvar_num(HP_Tails))
            
set_user_gravity(idget_pcvar_float(Gravity_Tails)/800.0)
        }
    
        else if(
Rose[id] == true)
        {
            
set_user_health(idget_pcvar_num(HP_Rose))
            
set_user_gravity(idget_pcvar_float(Gravity_Rose)/800.0)
        }
    
        else if(
Eggman[id] == true)
        {
            
set_user_health(idget_pcvar_num(HP_Eggman))
            
set_user_gravity(idget_pcvar_float(Gravity_Eggman)/800.0)
        }
        
        else if(
SuperSonic[id] == true)
        {
            
set_user_health(idget_pcvar_num(HP_SSonic))
            
set_user_gravity(idget_pcvar_float(Gravity_SSonic)/800.0)
        }
    }

PS: On spawn i do:
PHP Code:
public Player_Spawn_Post(id)
{
    if(
is_user_alive(id))
    {
        
strip_user_weapons(id)
        
        if(
SuperSonic[id] == true)
            
character_stuff(id)
        
        else
        {
            
Sonic[id] = false
            Shadow
[id] = false
            Silver
[id] = false
            Knuckles
[id] = false
            Tails
[id] = false
            Rose
[id] = false
            Eggman
[id] = false
            set_user_rendering
(idkRenderFxNone000kRenderNormal0)
        }
    }

Are you sure that you need that many global variables?
Basically what you can do is:
1.
PHP Code:
new var[33]
new const { 
sonic 0shadowsilverknucklestailsroseeggman }
// and if you want that your var is holding example rose then
var[id] = rose 
or if player can have more than just 1 from those new const values
you can use bits:
PHP Code:
new var[33]
#define sonic (1<<0)
#define shadow (1<<1)
#define silver (1<<2)
#define knukles (1<<3)
#define tails (1<<4)
#define rose (1<<5)
#define eggman (1<<0)

// example you want that var have sonic, silver and tails
var[id] |= sonic
var[id] |= silver
var[id] |= tails

// example you want to check if player have sonic and tails
if( var[id] & sonic && var[id] & tails )

// now for example you want to remove sonic from var
var[id] &= ~sonic 
you can make 0 - 31 costom stuff in one variable.
.Dare Devil. is offline
Old 07-28-2013, 10:57
akcaliberg
This message has been deleted by akcaliberg. Reason: not important
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 07-28-2013 , 11:00   Re: Server Shutdown....
Reply With Quote #10

400.0
__________________
Jhob94 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 15:54.


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