View Single Post
Electr000999
Senior Member
Join Date: Aug 2011
Old 08-22-2015 , 10:51   Re: [l4d2] Save Weapon (Co-op)
Reply With Quote #7

why you clear health? and not restored to old values after map changed:
Code:
TyFakeCHEAT(client, "give", "health");
SetEntProp(client, Prop_Send, "m_currentReviveCount", 0);
SetEntProp(client, Prop_Send, "m_isGoingToDie", 0);
SetEntProp(client, Prop_Send, "m_iHealth", 71);
and why you don't save ammo count.

i am put fixed source:
  • Added ammo saving
  • Fixed syntax errors with using transitional syntax.
  • Optimised melee saving. now without comparing the model name.
  • Included beta fix from Maks (Long connect fix)
  • Added saving health if player incaped and used plugin logic.

edit1:
  • deleted set clip info after give default info, because after give command we have ammo by default.
  • I corrected the black hole in the logic ammo saving.
edit2:
  • disabled event spawn hook.
  • now the data about the weapons stored in the one array, instead of the four variables.
edit3:
  • now the data about the weapons classes stored in the one string array, instead of the four string variables.
edit4:
  • this is stable version without lost weapons.
  • now spectators not lose their weapons
  • add forwards pre save / after load client weapons
  • changed 2nd detection melee code.
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_ty_saveweapon.sp - 1644 views - 21.6 KB)

Last edited by Electr000999; 09-06-2015 at 15:52.
Electr000999 is offline
Send a message via Skype™ to Electr000999