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

[L4D1 & L4D2] Weapon Amount Modifier (v1.4)[31-May-2021]


Post New Thread Reply   
 
Thread Tools Display Modes
Earendil
Senior Member
Join Date: Jan 2020
Location: Spain
Old 01-13-2020 , 15:59   Re: [L4D1+2] Weapon Amount Modifier
Reply With Quote #11

I updated the plugin, thanks to shadowysn for helping me with the new syntax.

New version 1.1

Added new CVars and modified the previous ones, if you are updating the plugin delete the old config file.
Attached Files
File Type: sp Get Plugin or Get Source (l4d_wam.sp - 347 views - 5.9 KB)

Last edited by Earendil; 01-13-2020 at 16:08.
Earendil is offline
Earendil
Senior Member
Join Date: Jan 2020
Location: Spain
Old 04-25-2021 , 14:05   Re: [L4D1+2] Weapon Amount Modifier (v1.1)[13-Jan-2020]
Reply With Quote #12

v1.2 update:
- Counter Strike weapons included.
- Cleaned code.
- Plugin now only hooks "round_start", event is unhooked when "l4d_wam_enabled" "0".
Attached Files
File Type: sp Get Plugin or Get Source (l4d_wam.sp - 167 views - 5.9 KB)
Earendil is offline
Earendil
Senior Member
Join Date: Jan 2020
Location: Spain
Old 05-25-2021 , 17:46   Re: [L4D1 & L4D2] Weapon Amount Modifier (v1.2)[25-Apr-2021]
Reply With Quote #13

Updated to 1.3, now weapon modifications are done when entities are created or when first player joins game, with this new method the plugin seems to work the 100% of the time.

Code:
* v1.3
- Fixed any potential fail modifying weapon amounts.
- Plugin now can modify any weapon_spawn created anytime in the game (controlled by CVar).
- New ConVar: l4d_wam_roundstart_only
Attached Files
File Type: sp Get Plugin or Get Source (l4d_wam.sp - 172 views - 9.1 KB)
Earendil is offline
TrueDarkness
Junior Member
Join Date: May 2021
Old 05-26-2021 , 02:10   Re: [L4D1 & L4D2] Weapon Amount Modifier (v1.2)[25-Apr-2021]
Reply With Quote #14

Quote:
Originally Posted by Earendil View Post
Updated to 1.3, now weapon modifications are done when entities are created or when first player joins game, with this new method the plugin seems to work the 100% of the time.

Code:
* v1.3
- Fixed any potential fail modifying weapon amounts.
- Plugin now can modify any weapon_spawn created anytime in the game (controlled by CVar).
- New ConVar: l4d_wam_roundstart_only
glad that you're back. I need one for my 8 survivors server
TrueDarkness is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 05-26-2021 , 02:58   Re: [L4D1 & L4D2] Weapon Amount Modifier (v1.3)[22-May-2021]
Reply With Quote #15

It would be more efficient to do this inside of "OnEntityCreated":
PHP Code:
if( strncmp(sTemp"weapon_"7) == -
instead of:
PHP Code:
if(StrContains(classname"weapon_"false) == -
Which searches the whole string for "weapon_".
__________________
Silvers is offline
TrueDarkness
Junior Member
Join Date: May 2021
Old 05-28-2021 , 01:51   Re: [L4D1 & L4D2] Weapon Amount Modifier (v1.3)[22-May-2021]
Reply With Quote #16

I found a bug that when you go from round 1 to round 2 of the campaign...

The medkit or weapons in the starting saferoom doesn't have the amount I set.. but it works in the first campaign with the starting saferoom and the ending saferoom. idk if any other of u have such problem.
TrueDarkness is offline
Earendil
Senior Member
Join Date: Jan 2020
Location: Spain
Old 05-31-2021 , 16:49   Re: [L4D1 & L4D2] Weapon Amount Modifier (v1.3)[22-May-2021]
Reply With Quote #17

Quote:
Originally Posted by TrueDarkness View Post
I found a bug that when you go from round 1 to round 2 of the campaign...

The medkit or weapons in the starting saferoom doesn't have the amount I set.. but it works in the first campaign with the starting saferoom and the ending saferoom. idk if any other of u have such problem.
I have updated the plugin to fix that error, try v1.4.
Earendil is offline
strikeraot
Senior Member
Join Date: Dec 2018
Location: Viet Nam
Old 02-04-2022 , 13:41   Re: [L4D1 & L4D2] Weapon Amount Modifier (v1.4)[31-May-2021]
Reply With Quote #18

useful plugin
strikeraot is offline
Iciaria
Member
Join Date: Aug 2022
Old 12-07-2022 , 11:36   Re: [L4D1 & L4D2] Weapon Amount Modifier (v1.4)[31-May-2021]
Reply With Quote #19

If the number of shotgun spawns is out of control, you can try this.(Only l4d2 test)
Even if set "l4d_wam_weapon_amount" vlue to 1,Shotguns in the gun cabinet are always infinite.
(It also seems to fix the issue of other weapons spawning infinitely in the gun safe, but I don't know why)

I'm just adding while the string about the shotgun.
Attached Files
File Type: sp Get Plugin or Get Source (l4d_wam.sp - 206 views - 11.8 KB)
__________________
Sorry,my english not good
Iciaria is offline
z282846139
Member
Join Date: Aug 2018
Old 01-18-2023 , 02:07   Re: [L4D1 & L4D2] Weapon Amount Modifier (v1.4)[31-May-2021]
Reply With Quote #20

Quote:
Originally Posted by Iciaria View Post
If the number of shotgun spawns is out of control, you can try this.(Only l4d2 test)
Even if set "l4d_wam_weapon_amount" vlue to 1,Shotguns in the gun cabinet are always infinite.
(It also seems to fix the issue of other weapons spawning infinitely in the gun safe, but I don't know why)

I'm just adding while the string about the shotgun.
Thanks for your update.I realy love your idea about Realism.

But here're some warnings:
Code:
Compiling l4d_wam.sp...
SourcePawn Compiler 1.11.0.6927
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2021 AlliedModders LLC

l4d_wam.sp(219) : warning 242: function "Event_Round_End" should return an explicit value
l4d_wam.sp(224) : warning 242: function "Event_Round_Start" should return an explicit value
l4d_wam.sp(253) : warning 242: function "FirstLoad_Timer" should return an explicit value
Code size:         10840 bytes
Data size:         5284 bytes
Stack/heap size:      16612 bytes
Total requirements:   32736 bytes

3 Warnings.
z282846139 is offline
Reply



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 18:08.


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