mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 08:13:21 +00:00
Add files
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
ESX = nil
|
||||
|
||||
TriggerEvent('esx:getSharedObject', function(obj)
|
||||
ESX = obj
|
||||
end)
|
||||
|
||||
ESX.RegisterUsableItem('beer', function(source)
|
||||
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
|
||||
xPlayer.removeInventoryItem('beer', 1)
|
||||
|
||||
TriggerClientEvent('esx_status:add', source, 'drunk', 250000)
|
||||
TriggerClientEvent('esx_optionalneeds:onDrink', source)
|
||||
TriggerClientEvent('esx:showNotification', source, 'Vous avez utilisé 1x ~y~Bière~s~')
|
||||
|
||||
end)
|
||||
Reference in New Issue
Block a user