Thanks for letting me know. Still have no idea why it is disabling F5 and F6 when those 2 keys are not even called upon in this script.
The issue is being looked into.
Thanks for letting me know. Still have no idea why it is disabling F5 and F6 when those 2 keys are not even called upon in this script.
The issue is being looked into.
Found the issue I believe. I had left alt (character wheel) disabled for the radio animation, which appearently also disables the character quick switch buttons F5, F6 and F7.
A fix has been applied. Download the script again and try. Issue should hopefully be resolved.
Thanks for the fix yep works great
Thatās also what seems to be the case if you want to use TAB, but have the buttons 0-9 disabled for some reason. Did you find a workaround for this or did you change the key to something else?
I just removed the DisableControlAction
for that animation since the character wheel is not used anyway. No need to disable it.
Another wonderful edit by @sadboilogan just posted.
Removed the need for the left ctrl key, and combined the animations to work with the same key. See OP for the revised changes and to download the new version.
New Feature:
When INPUT_SELECT_WEAPON_HANDGUN (6) is pressed the player will equip a pistol, removing it from their holster. When INPUT_SELECT_WEAPON_UNARMED (1) is pressed the player will return to being unarmed with the pistol back in its holster. Using the weapon wheel has no effect.
New update just pushed to master!
Holster/Unholster Pistol is no longer button based. It automatically detects if the player is holding a pistol or not.
If I wanted to include the combat pistol, would this be correct?
if GetSelectedPedWeapon(ped) == GetHashKey("WEAPON_PISTOL") or GetSelectedPedWeapon(ped) == GetHashKey("WEAPON_COMBATPISTOL") then
SetPedComponentVariation(ped, 9, 0, 0, 0)
else
if GetSelectedPedWeapon(ped) ~= GetHashKey("WEAPON_PISTOL") or GetSelectedPedWeapon(ped) ~= GetHashKey("WEAPON_COMBATPISTOL") then
SetPedComponentVariation(ped, 9, 1, 0, 0)
Fixed it for you, and yes that works.
Ah, ok, awesome. I missed part of it. Thanks!
LSPDFR has a mod similar to the weapon draw portion of this script.
How would I go about adding a draw animation when the weapon is drawn from the holster.
If you look at this GIF in this on LSPDFRās site thatās what I mean.
http://www.lcpdfr.com/files/file/8017-cop-holster/
I am also wonder, I have some models that have leg holsters that with the draw weapon script automatically disappear. How would I set it up so If player has current ped component Accessory (3) have the script do nothing.
Wouldnāt be hard at all. Just need to find the animation it uses and it could be added very easily.
Iām not sure. You could try playing around with the values listed in SetPedComponentVariation
. These values are for default peds and would need to be changed for addon or replacement peds if the models are not set up the same way.
Is it a version [fx / esx] ?? because it does not work in my server!
Should work with everything that Iām aware. Doesnāt have any requirements.
Could be a conflicting resource, that is disabling the key you are using
New update just pushed to master. Features include:
Thanks to @JinkLeft for providing these updates!
It makes a vest on the mp_m_freemode_01 skin
Hey, i really want to add this to the mp_m_freemode_01 skin which is the multyplayer skins. When i add this skin to it, automatically it puts a grey vest on the character no matter how i edit props or clothes i cant get the vest off the character, and when i remove name from this resource, the vest then comes off. Is there a way you can make it so a vest does not spawn on the MP model so i can use this?
@Kevin_Fisher This script is made to work only with police peds, ones that the components are setup properly. Iād have no idea how to change this to work with other peds as I know nothing about setting up ped components.