Closed GoogleCodeExporter closed 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
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
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
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
ah yes it works just fine thanks for your help :)
Original comment by michcio9...@gmail.com
on 10 Jan 2011 at 4:30
Original comment by andreaspachler
on 10 Jan 2011 at 7:56
Original issue reported on code.google.com by
michcio9...@gmail.com
on 2 Jan 2011 at 9:01