Raised This Month: $2 Target: $400

[L4D] Hooking/Modifying Max Clip

Post New Thread Reply   
Thread Tools Display Modes
Author Message
Veteran Member
Join Date: Aug 2009
Location: Tampa, FL
Old 06-05-2020 , 14:16   [L4D] Hooking/Modifying Max Clip
Reply With Quote #1

IMAGES: https://imgur.com/a/Dvm4XuL

This has been asked before but I took the approach via Assembly so far, above is an image of the pointer address (level 2) which contains the SMG Max Clip size that is called and loaded from the memory into the weapon that is reloading on the last frame.

If you change this pointer's value at any time, the Bots will immediately reload, now the question is if I can somehow inject myself directly into the game on reload to modify it for that player. My guess Its going to be hard since this is a global value for the that weapon type.

Since changing it affects all players at that given moment.
Marcus101RR is offline
Send a message via AIM to Marcus101RR Send a message via Skype™ to Marcus101RR
AlliedModders Donor
Join Date: Aug 2010
Location: SpaceX
Old 06-05-2020 , 14:29   Re: [L4D] Hooking/Modifying Max Clip
Reply With Quote #2

Left4DHooks can retrieve and set max clip size, or Info Editor to modify weapons properties. You could try hooking reload, setting, and reverting in post. Or why not just hook reload and set m_iClip1 value to what you want for the individual? You would need to hook attempt to ammo equip and manually refill ammo because the ammo pile won't let you if game default clip size for rifle is 50 and you set a clients to 100 e.g.

Last edited by Silvers; 06-05-2020 at 14:33.
Silvers is offline

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 12:11.

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