[Release][ESX] Proper Rack/Unrack weapon script

So there’s been a few Weapon unrack/racking scripts that have been released lately and quite frankly they’re a bit… different to what an actual weapon (un)rack script should be and so I decided to spend a few minutes throwing this script together which allows for more immersion (even though the animation is… not the best)

What this script features what none other’s do;

  • Actual Distance Checker

  • Job Checker

  • Vehicle Class Check (If it’s not a police vehicle then the weapon won’t unrack)

Requirements: Mythic Progress Bars by Alzar

Video: https://www.youtube.com/watch?v=PBsFnwaOy28

Github Download

Credits:
@Alzar - for the Progress Bar’s which in return then inspired me to do this.

5 Likes

decent.

Could see this integrated with “RadialMenu” for some cool crap

Yeah it’s a possibility, I’m all down to suggestions so I’ll take a look at it soon and see what’s what.

1 Like

I really like this script and you did a great job but I have a suggestion, you should make it so instead of commands you just switch to the weapon next to the vehicle.

Hmm… I’m a bit confused here, the reason it’s a command is so it can be executed… how can it be executed without it, unless you mean keybinded? for example… numpad7 or so on… I’d love to hear more on this! :slight_smile:

Not necessarily do you mind if I post a link to another post as an example?

Yeah sure, go for it

If you Want i Can help maybe we Can make a version together ? Let me know

Yeah for sure, hit me up in the DM’s and we’ll put our heads together, see what we can do and so on :slight_smile:

Does this one give me max ammo if I put a gun with 0 ammo into the vehicle too? =p

This doesn’t work for me, player is stuck in the animation forever and never pulls weapon out.

1 Like

Can you describe what you’re doing so I can try reproduce the error?

It remove’s the weapon in total, then if you type /unrack, it will add the weapon and set the wepaon ammo to 130 which is one fully loaded clip and 3 magazines spare in technical terms.

I’ve literally just dropped the server into resources and put the file name (without -master) into the config.cfg like you would with any other script.

I attempted to use my own progress bars which isn’t work, so just reverted the code back and made sure I didn’t miss any commas or {'s etc etc.

Is anybody else having trouble with /unrack - it just does the animation forever and doesn’t do anything else.

Hm, I know the animation issue is related to the Progress Bar’s via Alzar, make sure this resource is named exactly “mythic_progbar” without the Quotations.

If you want me to possibly help setup the script to work with your progress bars, shoot me a PM and I’ll see what we can do :slight_smile:

Can we save ammo? :thinking: put in with 0 take out with 0, put in with 10 take out with 10

1 Like

At the moment, I have no intention with it saving ammo, but I can always look into this if it brings more attraction, but it’s a pretty good idea I won’t lie.

2 Likes

id like to see a script like this that is the whole package. Ammo saving would be really nice.

1 Like