When you say it just disables esx_properties what do you mean. It stops running all together, or the script runs but you can’t access it. If it stops running all together are there any console errors when you try and start it, either in f8 or server console. Hopefully with these answers someone can help you get it sorted out.
I got it working i missed a little piece of code. Wouldn’t happen to know how i could add weapons to shops other then weapon shop would you. I’m trying to turn YouTool into a Black Market, i’ve managed to change the location and delete the blip all together but when i add weapons it just wont register the weapon as if it actually works. You can buy it and drop it but doesn’t work at all.
The server I used to work for had weapons as items so make it very easy to add weapons to any function in the city. If you are still using gta weapons you would need to recode the shops to check to see the name of the item and if it has WEAPON_ in it use the giveweapon instead of giveitem function on the server.
Would need to see how it was formated before… you might only be able to list the name of the item… and then in the server side that gives the item to the player you would need to check to see if it has ‘WEAPON_’ in the name of the item and handle it different. For what you want to do it would require a fair bit of change in the code - prob not something someone that hasn’t been coding for very long would be able to do.
I managed to get it working now i’m just trying to figure out how to add ammo to the shop, here’s what i changed.
inventoryhud > server > main
if shoptype == "youtool" then
local weapons = Config.Shops.YouTool.Weapons
for _, v in pairs(Config.Shops.YouTool.Weapons) do
if v.name == itemResult[i].name then
table.insert(itemShopList, {
type = "item_weapon",
name = itemInformation[itemResult[i].name].name,
label = itemInformation[itemResult[i].name].label,
limit = 1,
ammo = v.ammo,
rare = itemInformation[itemResult[i].name].rare,
can_remove = itemInformation[itemResult[i].name].can_remove,
price = itemInformation[itemResult[i].name].price,
count = 99999999
})
end
end
end
Inventoryhud > config
YouTool = {
Locations = {
{x = 905.8169555664, y = -3229.8996582032, z = -99.29434967041},
},
Weapons = {
{name = "WEAPON_PISTOL", ammo = 45},
{name = "WEAPON_PUMPSHOTGUN", ammo = 25},
},
Ammo = {
{name = "9mm_rounds", weaponhash = "WEAPON_PISTOL", ammo = 24},
{name = "shotgun_shells", weaponhash = "WEAPON_PUMPSHOTGUN", ammo = 12}
},
Items = {
}
},
Should just have to put the weapon hash and ammo count that needs to be added… and make sure it uses the AddPedAmmo on the server. I haven’t looked into this run time much but seems pretty str8 fwd in how it works.