mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-03 11:48:53 +00:00
@@ -224,23 +224,6 @@ ESX.RegisterServerCallback('esx_vehicleshop:buyVehicleSociety', function (source
|
||||
end)
|
||||
end)
|
||||
|
||||
ESX.RegisterServerCallback('esx_vehicleshop:getPersonnalVehicles', function (source, cb)
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
|
||||
MySQL.Async.fetchAll('SELECT * FROM owned_vehicles WHERE owner = @owner', {
|
||||
['@owner'] = xPlayer.identifier
|
||||
}, function (result)
|
||||
local vehicles = {}
|
||||
|
||||
for i=1, #result, 1 do
|
||||
local vehicleData = json.decode(result[i].vehicle)
|
||||
table.insert(vehicles, vehicleData)
|
||||
end
|
||||
|
||||
cb(vehicles)
|
||||
end)
|
||||
end)
|
||||
|
||||
ESX.RegisterServerCallback('esx_vehicleshop:getCommercialVehicles', function (source, cb)
|
||||
MySQL.Async.fetchAll('SELECT * FROM cardealer_vehicles ORDER BY vehicle ASC', {}, function (result)
|
||||
local vehicles = {}
|
||||
@@ -399,12 +382,6 @@ ESX.RegisterServerCallback('esx_vehicleshop:isPlateTaken', function (source, cb,
|
||||
end)
|
||||
end)
|
||||
|
||||
if Config.EnablePvCommand then
|
||||
TriggerEvent('es:addGroupCommand', 'pv', 'user', function(source, args, user)
|
||||
TriggerClientEvent('esx_vehicleshop:openPersonnalVehicleMenu', source)
|
||||
end, {help = _U('leaving')})
|
||||
end
|
||||
|
||||
function PayRent(d, h, m)
|
||||
MySQL.Async.fetchAll('SELECT * FROM rented_vehicles', {}, function (result)
|
||||
for i=1, #result, 1 do
|
||||
|
||||
Reference in New Issue
Block a user