[ESX] Weapon Extensions | Addon Items

You seems pretty incompetent.

”ESX is bad, you are bad”. I’m sorry but you probably don’t know my knowledge and you probably haven’t even figured out how to use ESX own accessories. Stop posting stuff you have no clue about. You just look like a moron. So please stop posting here and let him have his own post by himself. If you have any problems or want to argue, take that in my DM’s. Bye!

I’m sorry :neutral_face:

How to make body armors not disappear?

Could anyone possibly share a snippet on enabling the use of med-kits and bandages through this script? I’ve tried replacing the small and medium armor with bandage and medkit and changed “AddArmorToPed (ped, xx)” to AddHealthToPed (it was a long shot, I know) and then I also tried the native SetEntityHealth and they just don’t seem to work.

Really like the idea of it taking a few seconds to use a bandage and medkit and I like the way Mythic delivers the progress bar and notification.

@PonchTV
This??

ESX.RegisterUsableItem('medikit', function(source)
	if not playersHealing[source] then
		local xPlayer = ESX.GetPlayerFromId(source)
		xPlayer.removeInventoryItem('medikit', 1)
	
		playersHealing[source] = true
		TriggerClientEvent('esx_ambulancejob:useItem', source, 'medikit')

		Citizen.Wait(10000)
		playersHealing[source] = nil
	end
end)

That would be great however for this particular server I’m not running esx_ambulancejob. I’m creating an “anarchy” server that’s generally just a death match type deal and I have esx_wasted handling my death functions rather than ambulance job because esx_wasted will send you to a random hospital and not all the same hospital.

Hey, when i use the Ammo Boxes to refill my weapons nothing happens.Unbenannt

You have to change the amount of ammo the Weapon can hold and how much you want it to Refill.

Be default it’s set at 250 and refill is 50.
You have to go into the client/main.lua and change the lines starting from 325 with Pistol Ammo to go along with what you have the ammo set to on your server.

OR, you can change all your ammo for weapons to the higher value to work.

RegisterNetEvent(‘nfw_wep:pAmmo’)
AddEventHandler(‘nfw_wep:pAmmo’, function()
local ped = GetPlayerPed(-1)
local currentWeaponHash = GetSelectedPedWeapon(ped)
local ammo = GetAmmoInPedWeapon(ped, currentWeaponHash)
local item = “pAmmo”

**if(ammo >= 42 or ammo + 14 > 42)** <-----THIS IS WHAT YOU CHANGE then
    exports['mythic_notify']:DoHudText('inform', 'Your weapon ammo is already maxed!')
    TriggerServerEvent('returnItem', item)
    return
end

if table.includes(pistol, currentWeaponHash) then
    exports['mythic_notify']:DoHudText('inform', 'Added 14 more Pistol ammo')
    AddAmmoToPed(ped, currentWeaponHash, 14)<----THIS NUMBER NEEDS TO BE CHANGED AS WELL
else
    exports['mythic_notify']:DoHudText('inform', 'This weapon is not compatible with this ammo')
    TriggerServerEvent('returnItem', item)
end

end)

It spawns me correctly the items but when i try to add them into a store it didn’t allow me… Some help?

anyone else getting massive usage on idle for this script? if someone puts a vest on it goes way down to .02 until then it runs at like .43

1 Like

yes same here

Where can I find the script for ammo boxes?

when im using this with EUP. its placing a cop vest on the person.
is there any way i can make it not put anything on the player and just add the armor ?

dont worry i fixed it :smiley:

Hey, it’s always giving me the gillet, is there a way i can make it into a different armor type?

You are so Toxic on every post for No Reason

2 Likes

Hey, How did you fix it?

Everywhere it says

prop = {
    model = "prop_bodyarmour_02",
}

erase the prop.

When you say erase the prop do you mean do this

prop = {
model = “”,
}

I have done this but it still buts the police jacket on. Or remove the all of it?

hey first of thx for your release

and i have a question do you know how to add the mk2 extentions ? or how i can find them out ?