Raised This Month: $12 Target: $400
 3% 

[l4d2] Save Weapon (Co-op)


Post New Thread Reply   
 
Thread Tools Display Modes
MasterMind420
BANNED
Join Date: Nov 2010
Old 03-08-2021 , 15:57   Re: [l4d2] Save Weapon (Co-op)
Reply With Quote #101

Quote:
Originally Posted by dr_lex View Post
A delay of 3 seconds is sufficient for issuing and saving via player_team.

But if you want you can post your own save option as an alternative
you are claiming that without actually testing what i said...I know for a fact it is not saving, a 3 second delay to load the weapons isn't necessary after these events, a 0.1 sec delay is sufficient. And no these events will not save the players slots because when these event notifications are called the players weapon slots are already empty. A simple print to chat during the event and getting the weapon slot will tell you this. Or just remove all weapons on the player just before loading the weapons and they will not load because nothing was saved. I'm just trying to help you out with some knowledge, accept it...don't...I don't care. But people will know your plugin modification to save afk does not actually work. I'm just trying to help.
MasterMind420 is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 03-17-2021 , 15:09   Re: [l4d2] Save Weapon (Co-op)
Reply With Quote #102

Quote:
Originally Posted by dr_lex View Post
A delay of 3 seconds is sufficient for issuing and saving via player_team.

But if you want you can post your own save option as an alternative
In order to properly save afk...use player_bot_replace event...save the bots weapons to the arrays, not the players, then transfer the bots weapon arrays over to the players weapon arrays immediately after saving the bots. The reason why is because these events are only notifications, the player no longer has weapons because the event already happened before the notification. Their team has already changed, but the bots weapons do exist...I have worked extensively on this issue with my own private plugin, it works doing it like this. Use bot_player_replace event to restore them to the player. If u need help fixing it i am willing to help.

Last edited by MasterMind420; 03-17-2021 at 15:11.
MasterMind420 is offline
Shadowysn
Senior Member
Join Date: Sep 2015
Location: Location:
Old 06-09-2021 , 12:14   Re: [l4d2] Save Weapon (Co-op)
Reply With Quote #103

Edited version of maks' version 4.12 (The OP) made to use an alternate method of spawning items.

This is mainly for users of this cheat-enabler, which will block the give command even if it is fired from a plugin like this.
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_ty_saveweapon_4.sp - 323 views - 19.3 KB)

Last edited by Shadowysn; 06-09-2021 at 13:11.
Shadowysn is offline
moschinovac
Member
Join Date: Mar 2019
Location: Vietnam
Old 06-09-2021 , 12:41   Re: [l4d2] Save Weapon (Co-op)
Reply With Quote #104

Quote:
Originally Posted by Shadowysn View Post
Edited version of maks' version 4.12 (The OP) made to use an alternate method of spawning items.

This is mainly for users of this cheat-enabler, which will block the give command even if it is fired from a plugin like this.
Wow.. Saved reserve ammo in gun. Thats good because my server removed Ammo Piles. So players will not recover ammo after go inside saferoom . Ty so much

Last edited by moschinovac; 06-09-2021 at 12:41.
moschinovac is offline
swiftswing1
Member
Join Date: Oct 2020
Old 08-07-2021 , 22:20   Re: [l4d2] Save Weapon (Co-op)
Reply With Quote #105

hey. so im wondering if it's possible to make this plugin compatible with Silvers' [L4D2] Switch Upgrade Ammo Types? the issue is basically the upgraded ammo doesnt save properly after map change.
after hours of testing, ive narrowed it down to this plugin and i hope im right - Silvers' plugin seems to work completely fine by itself and without this plugin present.

i have some notes:
  • only one upgrade ammo type is ever saved after map change;
  • for the ammo type to save, it has to be in the gun magazine before saferoom door closes; and
  • if normal ammo was being used before map change, none of the ammo upgrades are saved.
any help is appreciated. can help out with testing also. thanks!



EDIT: it seems reloading the plugin when you load/spawn into your game fixes this issue. more info here
EDIT#2: using HarryPotter's Save Weapon with (starting from) ver. 1.8 of Silvers' plugin works great. big thanks to them for fixing!

Last edited by swiftswing1; 09-12-2021 at 20:58.
swiftswing1 is offline
yabi
Senior Member
Join Date: Jun 2021
Location: Taiwan
Old 09-02-2021 , 18:21   Re: [l4d2] Save Weapon (Co-op)
Reply With Quote #106

Can I not restore my health?
Can you cancel the recovery?
thank you boss
yabi is offline
sbrblz
Member
Join Date: Jun 2021
Old 09-02-2021 , 21:20   Re: [l4d2] Save Weapon (Co-op)
Reply With Quote #107

Quote:
Originally Posted by yabi View Post
Can I not restore my health?
Can you cancel the recovery?
thank you boss
Add
PHP Code:
sm_cvar l4d2_hx_health "0" 
to your server.cfg/listenserver.cfg file. See my guide for more tips.

Quote:
Originally Posted by swiftswing1 View Post
EDIT: it seems reloading the plugin when you load/spawn into your game fixes this issue. more info here
There seems to be several plugins that need reloading to fix bugs for some reason.
__________________

Last edited by sbrblz; 09-02-2021 at 21:46.
sbrblz is offline
swiftswing1
Member
Join Date: Oct 2020
Old 09-03-2021 , 04:07   Re: [l4d2] Save Weapon (Co-op)
Reply With Quote #108

alternatively, you can generate your own .cfg file if you download the source code and put this in the line just after the last CreateConVar command: AutoExecConfig(true, "insert_filename_here");

for example:
Code:
	hg_health = CreateConVar("l4d2_hx_health", "1", "", FCVAR_NONE, true, 0.0, true, 1.0);
        AutoExecConfig(true, "l4d2_ty_saveweapon_4");
Quote:
Originally Posted by sbrblz View Post
There seems to be several plugins that need reloading to fix bugs for some reason.
curious, what other plugins do you experience this in?

Last edited by swiftswing1; 09-03-2021 at 05:34.
swiftswing1 is offline
yabi
Senior Member
Join Date: Jun 2021
Location: Taiwan
Old 09-03-2021 , 08:41   Re: [l4d2] Save Weapon (Co-op)
Reply With Quote #109

Quote:
Originally Posted by sbrblz View Post
Add
PHP Code:
sm_cvar l4d2_hx_health "0" 
to your server.cfg/listenserver.cfg file. See my guide for more tips.



There seems to be several plugins that need reloading to fix bugs for some reason.
I am a local server><
Is there a way?
yabi is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 09-03-2021 , 08:54   Re: [l4d2] Save Weapon (Co-op)
Reply With Quote #110

Quote:
Originally Posted by yabi View Post
I am a local server><
Is there a way?
to your cfg/listenserver.cfg file (If file doesn't exist, create it)
__________________
HarryPotter is offline
Reply


Thread Tools
Display Modes

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 07:15.


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