mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-01 18:58:54 +00:00
@@ -87,6 +87,20 @@ ESX.RegisterServerCallback('esx_boat:getGarage', function (source, cb)
|
||||
|
||||
end)
|
||||
|
||||
ESX.RegisterServerCallback('esx_boat:buyBoatLicense', function (source, cb)
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
|
||||
if xPlayer.getMoney() >= Config.LicensePrice then
|
||||
xPlayer.removeMoney(Config.LicensePrice)
|
||||
|
||||
TriggerEvent('esx_license:addLicense', source, 'boat', function()
|
||||
cb(true)
|
||||
end)
|
||||
else
|
||||
cb(false)
|
||||
end
|
||||
end)
|
||||
|
||||
function getPriceFromModel(model)
|
||||
for i=1, #Config.Vehicles, 1 do
|
||||
if Config.Vehicles[i].model == model then
|
||||
|
||||
Reference in New Issue
Block a user