RHODEDOG / thc-rpg

Automatically exported from code.google.com/p/thc-rpg
0 stars 0 forks source link

Server crash when plugin loaded #39

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When I load in the thc_rpg plugin on my server it works great for 1-30 mins but 
then my server crahes. I know it's this plugin that crashes the server because 
withouit it loaded my server never crash. 

I've made some changes in the rpgmenu.inc while looping through the modules 
I've added this line to the loop:

else if(moduleindex==4 || moduleindex==15){}

to remove modules 4 and 15  cause of the issue: 
http://code.google.com/p/thc-rpg/issues/detail?id=37 and
http://code.google.com/p/thc-rpg/issues/detail?id=38

I've also in same loop commended out these lines:

 if(ModuleMgr_IsDisabled(upgrade))
        {
            //Format(display,128,"%s [DISABLED]",name);
            //AddMenuItem(menu_upgrades,upgradeid,display,ITEMDRAW_DISABLED);
        }

because I want a skill not to show at all in the menu when it's disabled. 

What could now cause this weird problem?

Original issue reported on code.google.com by michcio9...@gmail.com on 2 Jan 2011 at 9:01

GoogleCodeExporter commented 8 years ago
crashing caused by Regen Armor skill
Plugin author made mistake in function that sets armor.

public Action:regen_armor_Loop(Handle:timer,any:client)
incorrect: SetEntData(client, newarmor, 4, true);
there is no armor offset

Original comment by pov...@gmail.com on 5 Jan 2011 at 12:40

GoogleCodeExporter commented 8 years ago
Ah is there any way of solving this problem so regen armor will work correctly? 
Or will only disabeling regen armor solve my problem?

Original comment by michcio9...@gmail.com on 5 Jan 2011 at 1:42

GoogleCodeExporter commented 8 years ago
this should work:

comment out SetEntData(client,newarmor,4,true);

and insert

new g_iArmorOffset = FindSendPropOffs("CCSPlayer", "m_ArmorValue");
SetEntData(client, g_iArmorOffset, newarmor);

Original comment by h4ckb...@gmail.com on 7 Jan 2011 at 5:36

GoogleCodeExporter commented 8 years ago
i've forgot to look at the helpers.inc, there is already a offset asigned for 
armor.
so the actual fix would be this:

in thc_rpg/upgrades/regen_armor.inc

change the line

SetEntData(client,newarmor,4,true);

to

SetEntData(client,ArmorOffset,newarmor,4,true);

Original comment by h4ckb...@gmail.com on 7 Jan 2011 at 4:59

GoogleCodeExporter commented 8 years ago
ah yes it works just fine thanks for your help :)

Original comment by michcio9...@gmail.com on 10 Jan 2011 at 4:30

GoogleCodeExporter commented 8 years ago

Original comment by andreaspachler on 10 Jan 2011 at 7:56