InZidiuZ/LegacyFuel

Jerry can as item?

Closed this issue · 2 comments

Hello could you please tell me how i add the jerry can as item?

Change server lua to
`
ESX = nil

if Config.UseESX then
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)

RegisterServerEvent('fuel:pay')
AddEventHandler('fuel:pay', function(price)
	local xPlayer = ESX.GetPlayerFromId(source)
	local amount = ESX.Math.Round(price)

	if price > 0 then
		xPlayer.removeMoney(amount)
		xPlayer.addWeapon("weapon_petrolcan")
	end
end)

end
`

I think you'd do that in whatever framework you're using. Closing this.