[Release] Weapons On Back

I would try something like that but it would have to be a command based then.

Can non ESX Scripts still be loaded on an ESX Server?

Command based is always the best!

‘WEAPON_PISTOL_MK2’
‘WEAPON_SNSPISTOL_MK2’
‘WEAPON_REVOLVER_MK2’
‘WEAPON_SMG_MK2’
‘WEAPON_COMBATMG_MK2’
‘WEAPON_ASSAULTRIFLE_MK2’
‘WEAPON_CARBINERIFLE_MK2’
‘WEAPON_SPECIALCARBINE_MK2’
‘WEAPON_BULLPUPRIFLE_MK2’
‘WEAPON_PUMPSHOTGUN_MK2’
‘WEAPON_HEAVYSNIPER_MK2’
‘WEAPON_MARKSMANRIFLE_MK2’

There has to be an object for you to see it. those are your Mk2 hashs, Do what you will with them. I’ve already made a script like this so I just pulled them off mine for you. :stuck_out_tongue:

4 Likes

Can non ESX Scripts still be loaded on an ESX Server? yes @nvrsbr

can u share the script for the taser with me please? its exactly what im looking for

is there a way to add a toggle script

@Saint1 It’s probably another script you have installed because this one does not mess with the players armor.

@SecondLifeRP You will have to make that modification yourself until I get around to doing that.

Where would i post the “start weapons-on-back” in my server.cfg file? @minipunch

@HypnoticNoah I believe any where works, usually next to where the other resources are "start"ed

image 2 guns in the same place … how do I fix this?

1 Like

@Sorry Since the script doesn’t really do anything special when the player has two large weapons in their weapon wheel, you would have to either modify the script to maybe space them out (feel free to make a PR) or just prevent the player from having two at a time if you don’t want them to overlap.

1 Like

Anyone find the value to use for the sawed of shotgun? One of my favorites to use and would really love to be able to have that on my back

@AriChik Add this entry into the SETTINGS.compatable_weapon_hashes list: ["w_sg_sawnoff"] = 2017895192 . Or just uncomment line 37 in the cl_weapons-on-back.lua file, remove the extra comment text, and add a comma.

So I may be making a very obvious mistake here (wouldn’t surprise me),

I’m attempting to add functionality for both the pistol and the machete, hopefully to have them attached to the hips of the players.

Now I’ve added them to the compatible weapons list, and specifically added the machete to the melee check. However, I’m finding that upon loading in to the world, the pistol and machete simply drop on to the floor, almost as if they were detached, or perhaps never attached to the player.

I can’t see that being the case given I haven’t modified any of the code other than the compatible weapons list and the melee check, so I’m a little lost. :joy:

@ValonGP It’s going to be a little tough to really help you with that without seeing what you’ve done in code but maybe if you want to PM me with it I can try to help you there.

Only minor bug I have with the script is that when someone disconnects and reconnects with weapons, the guns disappear on the back until they draw them again. Any solution? Thank you in advance

Are you sure this isn’t being caused by some other resource? It should put them on their back even if not equipped no matter what.

Hmm unsure, if so I wouldn’t know which resource would cause this issue. Any recommendations?

-Edit Hmmm it seems when ppl first load into the server they are a random Player model with no guns and than when the players model finally loads the guns fall from the back. Have to figure out a way for players to stop spawning as a PED when they first load in. If you have any suggestions that would be helpful.

@AriChik I think what we do is load the player’s weapons only once their model is loaded, not before hand.