HI!! Its my first release!!!
So i made that plugin to my server but my server closed so rip…
You can do whatever you want with this plugin.
Installing:
- Run in your database the esx_cozinheirojob.sql;
- Place the esx_cozinheirojob in your resource folder;
- write this “start esx_cozinheirojob” in you server.cfg file;
- enjoy!!!
If you want to eat the food you need: [esx_basicneeds] and add this in
esx_basicneeds/server/main.lua https://github.com/ESX-Org/esx_basicneeds
[Code line]
ESX.RegisterUsableItem(‘ovoes’, function(source)
local xPlayer = ESX.GetPlayerFromId(source)
xPlayer.removeInventoryItem('ovoes', 1)
TriggerClientEvent('esx_status:add', source, 'hunger', 200000)
TriggerClientEvent('esx_basicneeds:onEat', source)
TriggerClientEvent('esx:showNotification', source, _U('used_chocolate'))
end)
ESX.RegisterUsableItem(‘vitelaass’, function(source)
local xPlayer = ESX.GetPlayerFromId(source)
xPlayer.removeInventoryItem('vitelaass', 1)
TriggerClientEvent('esx_status:add', source, 'hunger', 600000)
TriggerClientEvent('esx_basicneeds:onEat', source)
TriggerClientEvent('esx:showNotification', source, _U('used_chocolate'))
end)
ESX.RegisterUsableItem(‘polvogre’, function(source)
local xPlayer = ESX.GetPlayerFromId(source)
xPlayer.removeInventoryItem('polvogre', 1)
TriggerClientEvent('esx_status:add', source, 'hunger', 600000)
TriggerClientEvent('esx_basicneeds:onEat', source)
TriggerClientEvent('esx:showNotification', source, _U('used_chocolate'))
end)
ESX.RegisterUsableItem(‘hamb’, function(source)
local xPlayer = ESX.GetPlayerFromId(source)
xPlayer.removeInventoryItem('hamb', 1)
TriggerClientEvent('esx_status:add', source, 'hunger', 900000)
TriggerClientEvent('esx_basicneeds:onEat', source)
TriggerClientEvent('esx:showNotification', source, _U('used_chocolate'))
end)
[Finish Code Line]
I didnt translate to english so if you want to translate, my language is Portuguese, go ahead to translate to yours.
I convet this restaurant map so you can use it.
Download: esx_cozinheirojob-20190207T084558Z-001.zip (33.8 KB)
MAP: carloja3-20190207T194346Z-001.zip (24.1 KB)
Owner of the map: https://www.gta5-mods.com/maps/restaurant
Video: https://youtu.be/9w3CMNfvN7o
Items: items.sql (1.6 KB)