Raised This Month: $32 Target: $400
 8% 

l4d2 set grenade launcher clip to 3?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Austin
Senior Member
Join Date: Oct 2005
Old 04-22-2019 , 22:55   l4d2 set grenade launcher clip to 3?
Reply With Quote #1

I have this on pick up code working to set the clip size to 3 for the grenade launcher but when you reload it goes back to one.
How would I set this so it the clip size stays at 3?

This works fine and you can shoot 3 quick rounds.

public Action:OnPlayerUse(Handle:event, const String:name[], bool:dontBroadcast)
{

GetEdictClassname(w, pClass, sizeof(pClass));
if (StrEqual(pClass, "weapon_grenade_launcher", false))
{
SetEntProp(w, Prop_Send, "m_iClip1", clipinfo, 1);
SetEntProp(w, Prop_Data, "m_iClip1", clipinfo, 1);

Thanks

Last edited by Austin; 04-22-2019 at 22:56.
Austin is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 04-22-2019 , 23:49   Re: l4d2 set grenade launcher clip to 3?
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?p=2614626
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux is offline
Austin
Senior Member
Join Date: Oct 2005
Old 04-23-2019 , 09:53   Re: l4d2 set grenade launcher clip to 3?
Reply With Quote #3

Thanks for the info.
I was hoping for a few line solution I can put in a custom plugin like I have been doing for all mods I use.
That plugin looks great but I don't want to add a large plugin that affects or possibly can affect all sorts of things just to get this one simple feature for one weapon.
Austin is offline
farawayf
Senior Member
Join Date: Jan 2019
Old 04-23-2019 , 12:28   Re: l4d2 set grenade launcher clip to 3?
Reply With Quote #4

put SDKHooks_Reload. on callback get clip size. if clip size 3 set it to 2, if clip size 2 set it to 1.
farawayf is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 04-23-2019 , 15:11   Re: l4d2 set grenade launcher clip to 3?
Reply With Quote #5

Look for panxiaos...l4d2 Multi clip grenade launcher plugin for ideas...but im pretty sure he manually sets the clip on reload....
MasterMind420 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 20:02.


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