AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Server Shutdown.... (https://forums.alliedmods.net/showthread.php?t=221909)

Jhob94 07-27-2013 21:14

Server Shutdown....
 
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...

fysiks 07-27-2013 21:45

Re: Server Shutdown....
 
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.

Black Rose 07-27-2013 22:36

Re: Server Shutdown....
 
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 (Post 1999825)
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.

ConnorMcLeod 07-28-2013 02:19

Re: Server Shutdown....
 
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.

Jhob94 07-28-2013 08:25

Re: Server Shutdown....
 
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


ConnorMcLeod 07-28-2013 09:56

Re: Server Shutdown....
 
Disable all 3rd party plugins.

Jhob94 07-28-2013 10:38

Re: Server Shutdown....
 
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 07-28-2013 11:00

Re: Server Shutdown....
 
400.0

akcaliberg 07-28-2013 11:05

Re: Server Shutdown....
 
add some prints then you can find where is the problem

Jhob94 07-28-2013 11:07

Re: Server Shutdown....
 
It has one print after render, but doesnt shows...


All times are GMT -4. The time now is 15:54.

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