Still struggling? I’ve managed to get it working after trying for a while.
Hi, I still can’t use the weapons
I think I have to convert them into an Item but I don’t know how, thanks for answering
You dont have to do anything. Just add the item list with weapons to your database and then you spawn the items to use. “/giveitem 1 WEAPON_ASSAULTRIFLE 1” like that.
OK, so I can give myself weapons with the commandos and for the armory of the police station? I can’t use those weapons
No … weapons will be items, so instead of using /giveweapon… you will use /giveitem…
Anyway I can not use weapons as items, when I store them in vehicles and stuff the ammo doesnt go with them because they’re items. Any way around this or any way to tweak it so the ammo goes with the weapon item?
So that for example I could place a pistol with 50 rounds into the trunk of a vehicle, someone could then take it out and get the weapon with the 50 bullets, instead of bullets being client side if that makes sense.
i open my inventory and my screen ui freezes when i go to close the inventory. i have to close my game completely to move again. im using the final version of es_extended before v2. would anyone know the reason for freezing.
i would assume the freeze function when inventory opens is the problem. would i be able to remove the locking of any other action while opening inventory.
-Edit- I figured out the freeze issue. cant rename resource folder unless renaming it in the scripts.
has anyone fixed the attachment problems?
I can’t attach anything to any weapon??
I got everything all setup but when I go to the weapon shop, I want it to use a weapon license.
I looked through the code and found the check for licenses commented out, so I uncommented them and now the weapon shop doesnt even show a marker tor blip at the location. How do I fix that?
Edit: Also when the code is commented out, the weapon marker/blip works, but the license marker never appears anywhere at the coords I specified.
if IsInWeaponShopZone(coords) then
if IsControlJustReleased(0, Keys[“E”]) then
if Licenses[‘weapon’] ~= nil then
OpenShopInv(“weaponshop”)
Citizen.Wait(2000)
else
exports[‘mythic_notify’]:DoHudText(‘error’, ‘You need a Fire Arms license before you can buy weapons’)
end
end
end
if IsInPoliceShopZone(coords) then
if IsControlJustReleased(0, Keys[“E”]) then
if ESX.GetPlayerData().job.name == “police” then
if Licenses[‘weapon’] ~= nil the
OpenShopInv(“policeshop”)
Citizen.Wait(2000)
else
exports[‘mythic_notify’]:DoHudText(‘error’, ‘You need a Fire Arms license before you can buy weapons’)
end
otu esi edozi ego iji dabel like this
hello bro do you have ttachments working on your inventory?
does anyone know what makes these markers go crazy like this?
check loop in the while true do
find Citizen.Wait() in the while true do
change value in 0-5 no more! maybe have value “8-15”
can you please share version of ESX you are using?
I need help! I can´t put this inventory in my server and i dont know why, Someone can tell me how i put the inventory in my server
Hello! Does anyone know how to make when moving an item from the trunk or glove compartment to inventory that they no longer have enough space? it’s the only problem I have
Problem: Shop(AnyType) is opened. It allows player movement, and actions.
Note-able Info: Player inventory on open works correctly by freezing player actions, and closes correctly with no issues.
Possible Reason and/or Fix:
> function openInventory()
> -- loadPlayerInventory()
> isInInventory = true
> lockinv()
> SetNuiFocus(true, true)
> loadPlayerInventory()
> SendNUIMessage(
> {
> action = "display",
> type = "normal",
> hunger = myhunger,
> thirst = mythirst,
> stress = mystress,
> health = health,
> armour = armour,
> oxygen = oxy,
> weight = weight
> }
> )
> end
function closeInventory()
isInInventory = false
ClearPedSecondaryTask(PlayerPedId())
SendNUIMessage(
{
action = "hide"
}
)
SetNuiFocus(false, false)
end
This is the current player inventory (conde-b1g_inventory\client\main.lua LINE 384). I believe there needs to be a similar line in the shops.lua to prevent player action while shop is open.
Question: how would i rewrite this to hook into the shops.lua properly to avoid player movement and attack/aim functions while shopping for items.
**Fixed on LINE165.
change the Citizen.Wait(10) below and make it Citizen.Wait(1). that way it refreshes the character lock more often, and less likely you’ll attack/move while buying from shops/inventory.
i also copy pasted the lockinv function into the shops.lua near the top with a line inserted below as hook the openshopsinventory function.
fwi- i dont know how to write in lua completely and i might have got lucky messing around, so good luck.
no bro You know how to fix money to dabel like this