Skip to content

Conversation

@blackfirefly000
Copy link
Contributor

@blackfirefly000 blackfirefly000 commented Jun 24, 2025

Add the ability to save and spawn addon weapons with load outs. Fix for #449

This also fixed the issue where saving a loadout while Unlimited Ammo was turned on caused it to spawn with no ammo. There was an issue with Unlimited Ammo that meant it didn't work if a loadout spawned with 0 ammo. Saving a loadout with Unlimited Ammo turned on will now cause it to save with max ammo

This code has not been reviewed or optimized. I recommend that both occur to ensure that the most efficient solution occurs. I am bad at both of these.

@blackfirefly000
Copy link
Contributor Author

blackfirefly000 commented Jun 24, 2025

I found some issues upon logging into the server or changing peds. Working on a fix. Issue is almost certainly with SpawnWeaponLoadoutAsync or SaveWeaponLoadout in CommonFunctions.cs

@blackfirefly000 blackfirefly000 marked this pull request as draft June 25, 2025 09:07
@blackfirefly000
Copy link
Contributor Author

Given how many issues I'm running into, marking as a draft until I get them all fixed.

P.S. Codefactor is really mad about stuff I didn't edit and don't know how to fix.

@blackfirefly000
Copy link
Contributor Author

All features are working as intended!! For some reason, it is absolutely necessary that all instances of "...weapons_loadout..." are changed to "...weapon_loadout...". I have no idea why. I tried it both ways and it only worked without the S.

All existing loadouts must be saved over (spawning it then replacing works just fine) to fix permissions and ammo.

@blackfirefly000 blackfirefly000 marked this pull request as ready for review June 27, 2025 06:44
@rco-titus
Copy link

rco-titus commented Aug 18, 2025

Had an issue with the menu not showing.

the WP placeholder is present in the final ace permission, removed it and got the menu to show

changed
add_ace builtin.everyone "vMenu.WeaponOptions.WPAddonWeapons" allow # addon weapons dlc

to

  • add_ace builtin.everyone "vMenu.WeaponOptions.AddonWeapons" allow # addon weapons dlc

can confirm that the addon weapon menu shows after editing the permission name

Fix weapon permissions
@blackfirefly000
Copy link
Contributor Author

Had an issue with the menu not showing.

the WP placeholder is present in the final ace permission, removed it and got the menu to show

changed add_ace builtin.everyone "vMenu.WeaponOptions.WPAddonWeapons" allow # addon weapons dlc

to

  • add_ace builtin.everyone "vMenu.WeaponOptions.AddonWeapons" allow # addon weapons dlc

can confirm that the addon weapon menu shows after editing the permission name

Thanks for finding this. I've made a commit to fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants