forked from Simnation/Main
ed
This commit is contained in:
parent
f43cf424cf
commit
6778fbc673
2 changed files with 30 additions and 55 deletions
|
@ -1,4 +1,4 @@
|
|||
-- Generated with https://configurator.jgscripts.com at 8/6/2025, 2:03:39 PM
|
||||
-- Generated with https://configurator.jgscripts.com at 8/6/2025, 2:46:29 PM
|
||||
|
||||
Config = {}
|
||||
Config.Locale = 'de'
|
||||
|
@ -34,12 +34,12 @@ Config.EnableTransfers = {
|
|||
betweenGarages = false,
|
||||
betweenPlayers = true,
|
||||
}
|
||||
Config.AllowInfiniteVehicleSpawns = false
|
||||
Config.JobGaragesAllowInfiniteVehicleSpawns = false
|
||||
Config.AllowInfiniteVehicleSpawns = true
|
||||
Config.JobGaragesAllowInfiniteVehicleSpawns = true
|
||||
Config.GangGaragesAllowInfiniteVehicleSpawns = false
|
||||
Config.GarageVehicleReturnCost = 0
|
||||
Config.GarageVehicleReturnCostSocietyFund = false
|
||||
Config.GarageShowBlips = false
|
||||
Config.GarageShowBlips = true
|
||||
Config.GarageUniqueBlips = false
|
||||
Config.GarageUniqueLocations = true
|
||||
Config.GarageEnableInteriors = true
|
||||
|
@ -552,7 +552,7 @@ Config.JobGarageLocations = {
|
|||
},
|
||||
},
|
||||
}
|
||||
Config.GangGarageShowBlips = true
|
||||
Config.GangGarageShowBlips = false
|
||||
Config.GangGarageUniqueBlips = false
|
||||
Config.GangGarageSetVehicleCommand = 'setgangvehicle'
|
||||
Config.GangGarageRemoveVehicleCommand = 'removegangvehicle'
|
||||
|
|
|
@ -6,31 +6,21 @@ QBCore.Functions.CreateCallback("roadphone:valet:getCars", function(source, cb)
|
|||
return;
|
||||
end
|
||||
|
||||
local result
|
||||
|
||||
if Config.JGAdvancedGarages then
|
||||
result = MySQL.Sync.fetchAll("SELECT * FROM " .. Config.OwnedVehiclesTable .. " WHERE `citizenid` = @identifier and `impound` = @impound", {
|
||||
MySQL.Async.fetchAll("SELECT * FROM " .. Config.OwnedVehiclesTable .. " WHERE `citizenid` = @citizenid and type = @type and `impound` = @impound", {
|
||||
['@impound'] = 0,
|
||||
['@identifier'] = xPlayer.PlayerData.citizenid
|
||||
})
|
||||
else
|
||||
result = MySQL.Sync.fetchAll("SELECT * FROM " .. Config.OwnedVehiclesTable .. " WHERE `citizenid` = @identifier", {
|
||||
['@identifier'] = xPlayer.PlayerData.citizenid
|
||||
})
|
||||
end
|
||||
|
||||
['@citizenid'] = xPlayer.PlayerData.citizenid,
|
||||
['@type'] = "car"
|
||||
}, function(result)
|
||||
local cachedvehicles = {}
|
||||
|
||||
for i = 1, #result do
|
||||
|
||||
local Garage = result[i].garage_id
|
||||
|
||||
table.insert(cachedvehicles, {
|
||||
plate = result[i].plate,
|
||||
vehicle = result[i].vehicle,
|
||||
vehicle = result[i].vehicle, -- result[i].vehicle,
|
||||
type = 'car',
|
||||
hash = result[i].hash,
|
||||
garage = result[i].garage,
|
||||
stored = result[i].state
|
||||
garage = result[i].garage_id,
|
||||
stored = result[i].in_garage
|
||||
})
|
||||
|
||||
end
|
||||
|
@ -39,25 +29,19 @@ QBCore.Functions.CreateCallback("roadphone:valet:getCars", function(source, cb)
|
|||
|
||||
end)
|
||||
|
||||
end)
|
||||
|
||||
QBCore.Functions.CreateCallback('roadphone:valet:loadVehicle', function(source, cb, plate)
|
||||
|
||||
local valetCheck = valetServerSideCheck(plate)
|
||||
local xPlayer = QBCore.Functions.GetPlayer(source)
|
||||
|
||||
if valetCheck ~= false then
|
||||
cb(false, valetCheck)
|
||||
return;
|
||||
end
|
||||
|
||||
if not xPlayer then
|
||||
cb(false)
|
||||
return;
|
||||
end
|
||||
|
||||
MySQL.Async.fetchAll('SELECT * FROM ' .. Config.OwnedVehiclesTable .. ' WHERE `plate` = @plate AND `citizenid` = @identifier', {
|
||||
['@plate'] = plate,
|
||||
['@identifier'] = xPlayer.PlayerData.citizenid
|
||||
MySQL.Async.fetchAll('SELECT * FROM ' .. Config.OwnedVehiclesTable .. ' WHERE `plate` = @plate', {
|
||||
['@plate'] = plate
|
||||
}, function(vehicle)
|
||||
cb(vehicle)
|
||||
end)
|
||||
|
@ -80,7 +64,7 @@ QBCore.Functions.CreateCallback('roadphone:valet:checkMoney', function(source, c
|
|||
TriggerClientEvent("roadphone:sendNotification", source, {
|
||||
apptitle = "APP_VALET_NAME",
|
||||
title = "APP_VALET_CAR_ONTHEWAY",
|
||||
img = "/public/img/Apps/light_mode/valet.webp"
|
||||
img = "/public/img/Apps/valet.jpg"
|
||||
})
|
||||
|
||||
discordLog("9807270", "Valet", xPlayer.PlayerData.name .. ' ' .. Lang:t('info.valet_car_delivered_2', { value = Config.ValetDeliveryPrice }), 'RoadPhone - Valet', nil, Cfg.ValetWebhook)
|
||||
|
@ -90,7 +74,7 @@ QBCore.Functions.CreateCallback('roadphone:valet:checkMoney', function(source, c
|
|||
TriggerClientEvent("roadphone:sendNotification", source, {
|
||||
apptitle = "APP_VALET_NAME",
|
||||
title = "APP_VALET_NOTENOUGHMONEY",
|
||||
img = "/public/img/Apps/light_mode/valet.webp"
|
||||
img = "/public/img/Apps/valet.jpg"
|
||||
})
|
||||
|
||||
cb(false)
|
||||
|
@ -101,17 +85,8 @@ end)
|
|||
|
||||
RegisterServerEvent("roadphone:valetCarSetOutside")
|
||||
AddEventHandler("roadphone:valetCarSetOutside", function(plate)
|
||||
|
||||
if Config.cdGarages or Config.JGAdvancedGarages then
|
||||
MySQL.Async.execute('UPDATE '..Config.OwnedVehiclesTable..' SET `in_garage` = @in_garage WHERE `plate` = @plate', {
|
||||
['@plate'] = plate,
|
||||
['@in_garage'] = 0,
|
||||
})
|
||||
return
|
||||
end
|
||||
|
||||
MySQL.Async.execute("UPDATE " .. Config.OwnedVehiclesTable .. " SET `state` = @stored WHERE `plate` = @plate", {
|
||||
["@plate"] = plate,
|
||||
["@stored"] = 0
|
||||
})
|
||||
end)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue