I know right! I just got the Gabz subscription and now i just need more props! Its a little bit of effort and my props arenāt perfect, but it does add that little bit of extraness to your eating animations! Iām probably gonna make some fruits next.
If you add them to your own prop pack, make sure to do a DLC request to my ytyp.
Add: data_file āDLC_ITYP_REQUESTā āstream/knjgh_pizzas.ytypā to your fxmanifest.
Hi all, iāve been getting a few questions in my dm about how to add this as usable item. So for the ones that donāt know, hereās how to do it in esx.
First make sure to add food_pizza_jalapeno_peperoni (or whatever name you want) as item in your database. Then make the item usable by adding this to your esx_basicneeds/server/main.lua (could add it anywhere, but i recommend adding it all in basicneeds):
ESX.RegisterUsableItem('food_pizza_jalapeno_peperoni', function(source) --database item name
local xPlayer = ESX.GetPlayerFromId(source)
xPlayer.removeInventoryItem('food_pizza_jalapeno_peperoni', 1) --database item name
TriggerClientEvent('esx_status:add', source, 'hunger', 100000) --- amount of hunger added
TriggerClientEvent('esx_basicneeds:onEat', source, 'knjgh_pizzaslice1') -- -propname
xPlayer.showNotification(_U('used_food')) --- or whatever you use. Recommend making 1 in general and not 1 per item, like 'used_food'.
end)
You can do this with every item that needs to be usable.
Make sure esx_basicneeds/locales/en.lua (or whatever language you use), does contain the new āused_foodā. If not, add ['used_food'] = 'Yummy!',
That should work. Correct me if iām wrong!
Ofcourse make sure to ensure knjgh_pizzaslices_props in your server.cfg. But i recommend combining all your food props into 1 resource. If you only use mine, then this is alright.