[L4D/L4D2] Reserve (Ammo) Control [20-Jan-2021]
1 Attachment(s)
Made possible with Psykotikism's Library of L4Ds Signatures!
Description Individually control weapon reserve independent of "ammo_*" cvars. Primary intent is to let weapon modders set reserve ammo counts without fighting with ammo types :bee: (CSS Snipers, L4D1 Shotguns) Customization Go to the "/addons/sourcemod/data/l4d_reservecontrol.cfg" file after the plugin has been installed, and edit it.
Data File
Commands
Spoiler
Changelog
Spoiler
Requirements
WARNING
Installing Extract the .zip file's folders into /addons/sourcemod. |
Re: [L4D/L4D2] Reserve Control [12-Sep-2021]
I don't think a detour is required. SDKHook clients SDKHook_WeaponEquip and SDKHook_WeaponDrop and modify the reserve ammo with the following code.
You could track the entity each time someone equips or drops a weapon and set the ammo value accordingly. For example have g_iAmmo[2048][2] where g_iAmmo[weapon][0] is the EntIndexToEntRef() of the weapon to verify itself is the same weapon, and [1] would be the ammo you read/set when picked up/dropped. That would work for all weapons without issue from what I can think. PHP Code:
|
Re: [L4D/L4D2] Reserve Control [12-Sep-2021]
Quote:
It just ain't pretty and a big mess, and I don't even know if that's the full list of the issues, there could be more but I rather not find out. Its currently more maintainable than its state with no use of detours, and I find it uneasy to be going back now. |
Re: [L4D/L4D2] Reserve Control [12-Sep-2021]
Ahh that makes sense. Good job :up: :bacon!:
|
Re: [L4D/L4D2] Reserve Control [12-Sep-2021]
It only works when I pick up weapon, but not when I refill from Ammo stash
E.g: AK 200 reserve when picked up, but goes back to 360 when refill from ammo stash |
Re: [L4D/L4D2] Reserve Control [12-Sep-2021]
Quote:
Additionally, is this on a dedicated or local server? |
Re: [L4D/L4D2] Reserve Control [12-Sep-2021]
1 Attachment(s)
Quote:
here is the list of plugin I use |
Re: [L4D/L4D2] Reserve Control [12-Sep-2021]
Nevermind I found my problem. It is the l4d2_upgradesreloaded.smx which caused the issue. Inside that plugin there is upgrade that enables extended ammo reserve for primary weapon. It is sad that If I love both your plugin and this one. Guess I have to choose. Just a reminder: Any reserve ammo related plugin like l4d2_guncontrol also conflicts with your plugin.
P.S: I wish you could update the feature of looting residual ammo of the same gun like guncontrol plugin. Anyway, nice plugin |
Re: [L4D/L4D2] Reserve Control [12-Sep-2021]
Suggestion: Change title to "Reserve Ammo Control" to make it clearer, when I opened the thread I didn't know what it meant.
|
Re: [L4D/L4D2] Reserve Control [12-Sep-2021]
Quote:
Quote:
Spoiler
Gotta first make it clear that no promises its made within reasonable time expectations (Valve Time), but when it happens, the suggestion could be a separate plugin that uses this plugin's if-scenario natives. Would be in the same thread as this to let others post their plugins. Quote:
|
All times are GMT -4. The time now is 14:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.