[Release] Dynamic Holsters (EUP support)

Holsters

This resource places and replaces the gun from its holster when the player has the weapon in hand.

Many peds (particularly EUP) have holster textures with and without a gun. This resource takes advantage by seamlessly switching the clothing of the ped when the player draws the weapon. This adds a nice touch for realism and is particularly useful for law enforcement role-play.

GIF to demonstrate:

Features:

  • Easy to configure.
  • Handles multiple peds.
  • Handles multiple holsters on each ped, regardless of what category/component they’re from.
  • Built-in support for all holsters on both the latest male and female EUP multiplayer peds.
  • Well optimised, it only runs when the player is using a supported ped and at sensible intervals. The player’s clothing will only be set when they draw the weapon.
  • Players can toggle off and on using command /holsters.

Download

Latest release (v1.1.0)

Source code, contributions are most welcome.

Installation

  1. Download the latest release as a zip file, or clone the repository directly from GitHub.
  2. You will have a folder named holsters-v(1.0.x), you may want to rename it to something simple like holsters.
  3. Put the folder from the previous step in your server’s resources folder.
  4. Add start holsters to your server.cfg

You may need to edit the config.lua to add any non-standard peds or holsters, refer to my configuration guide to find out how.

24 Likes

nice work

2 Likes

Looks good i will test it now

1 Like

Would this work with civilian clothing with the gun holster?

Nice idea adding the holster clothing.
Similar to mine https://forum.cfx.re/t/release-esx-non-esx-holster-weapon/
But without the delay.
We can merge them together if you would like to.
PM me.

2 Likes

If the ped has a filled holster and an empty holster drawable then it should work, as long as you configure it.

I actually just nutted when I saw this. @Jamelele1 you are a legend.

2 Likes

Does this work with multiple weapons? It only shows the combat pistol in the config, can I just add another one after it and it will work with that one too? Can I set up a separate set of belts with a taser (there’s one thats filled and one thats empty)?

@EvanM89 This only works with just one weapon at the moment and trying to add more will break the config. But adding support for additional weapons like tasers is something I’m willing to look at.

Great script! Is there anyway I can add an animation to this, replacing the standard holster and unholster animation?

Not currently, but adding animations is an option I’ve considered. However the animation wouldn’t match some of the holsters (like leg holsters), so I’d have to figure out a way to make that configurable.

Hey, nice script; however i cannot get it to work in my server.

Here is my config.lua

I have my holsters under “Neck/Scarves”, and the empty is 2, whilst 8 is the full.

Hi there, thanks for your enquiry, you seem to have missed a comma in the config which is most likely what’s causing your issues, as commas are required to separate elements of lists in lua. The line that says:

[8] = 2

should be:

[8] = 2,

You also have that same holster specified 2 lines below. I don’t actually know the outcome of duplicating holsters in the config, but that may also cause you issues and I’d only specify that holster once. If you’re using just default EUP, then it should already be set up for you.

Hope this helps.

1 Like

Yup, it worked. Must not have caught that lol, my bad.

Glad I was able to help!

I’m not sure if I should be asking this here. But I can’t find a full and an empty holster.
Due to this I cannot make this script work.
Any help would be appreciated!

This script is made to give functionality to peds that do have those different holster drawables, so if it doesn’t have them then the script won’t be any use.

Is there an explanation on how to sync this script with EUP? Also, I can’t find any good holsters for my server for the MP ped models. Do you recommend any in particular?

It should be set up for EUP already in config.lua, as long as the holsters haven’t changed or none have been added since I last updated it.

The holsters that come with EUP are pretty good, I’m not really in the loop on what else is out there though.

@Jamelele1 Is there a way to get multiple firearms to exit the holster so I can have it so the pistol also does the same thing along with the combat pistol?