v1.14.3
Summary
This release introduces a new weather management module, improves bridge compatibility for vehicle keys and phone numbers, fixes database queries for jail system, and updates default configuration options for better out-of-box experience.
What's New
Features
weather
defaults
vehicle doors unlocked
Bug Fixes
- fixes database and bridge
File Changes
⚙️ Configuration & Bridge Files
These files are not encrypted. Review the changes below — you may need to manually apply updates to your server's config files.
bridge/client/player.lua
end
RegisterNetEvent('luxu_admin:client:giveVehicleKeys', function(plate, modelHash)
+ if source ~= 65535 and source ~= 0 then return end
+
if GetResourceState('dusa_vehiclekeys') == 'started' then
exports['dusa_vehiclekeys']:AddKey(plate)
end
+
+ if GetResourceState('qs-vehiclekeys') == 'started' then
+ local model = ""
+ for _, entity in ipairs(GetGamePool('CVehicle')) do
+ if GetVehicleNumberPlateText(entity) == plate then
+ model = GetEntityArchetypeName(entity)
+ break
+ end
+ end
+
+ if model == '' then
+ return
+ end
+
+ exports['qs-vehiclekeys']:GiveKeys(plate, model, true)
+ end
end)
return playerbridge/server/player.lua
return Player(source).state.phoneNumber
end
+ --[[
+ -- Reported as broken. Open a ticket if you know why
+
if GetResourceState("qs-smartphone-pro") == "started" then
- local id = playerObj?.PlayerData?.citizenid or playerObj.identifier
- return exports['qs-smartphone-pro']:GetPhoneNumberFromIdentifier(id, false) --[[@as string]]
+ local charId = player.getCharId(playerObj)
+ if not charId then return end
+ return exports['qs-smartphone-pro']:GetPhoneNumberFromIdentifier(charId, true)
end
-
+ ]]
if Framework.name == 'esx' then
return Player(source).state.phoneNumber
elseif Framework.name == 'qb' or Framework.name == 'qbx' then
@@ -293,34 +297,24 @@ function player.setGang(playerObj, gang, grade)
end
function player.giveVehicleKeys(source, plate, modelHash)
- local resources = {
- { name = "okokGarage", event = "okokGarage:GiveKeys", args = { source, plate }, type = "server" },
- { name = "qb-vehiclekeys", event = 'GiveKeys', args = { source, plate }, type = "export" },
- { name = "qs-vehiclekeys", event = 'GiveServerKeys', args = { source, plate, modelHash, true }, type = "export" },
- { name = "cd_garage", event = 'cd_garage:AddKeys', args = { source, plate }, type = "client" },
- { name = "gflp10-carkeys", event = 'AddCarkey', args = { source, modelHash, plate }, type = "export" },
- { name = "wasabi_carlock", event = 'GiveKey', args = { source, plate, false }, type = "export" }
- }
-
if GetResourceState("qbx_vehiclekeys") == "started" and GetResourceState("qbx_vehicles") == "started" then
local vehicle = exports.qbx_vehicles:GetVehicleIdByPlate(plate)
if vehicle then
return exports.qbx_vehiclekeys:GiveKeys(source, vehicle)
end
+ elseif GetResourceState("okokGarage") == "started" then
+ return TriggerEvent("okokGarage:GiveKeys", source, plate)
+ elseif GetResourceState("qb-vehiclekeys") == "started" then
+ return exports.qb_vehiclekeys:GiveKeys(source, plate)
+ elseif GetResourceState("cd_garage") == "started" then
+ return TriggerClientEvent("cd_garage:AddKeys", source, plate)
+ elseif GetResourceState("gflp10-carkeys") == "started" then
+ return exports.gflp10_carkeys:AddCarkey(source, modelHash, plate)
+ elseif GetResourceState("wasabi_carlock") == "started" then
+ return exports.wasabi_carlock:GiveKey(source, plate, false)
end
- for _, resource in ipairs(resources) do
- if GetResourceState(resource.name) == "started" then
- if resource.type == "server" then
- return TriggerEvent(resource.event, table.unpack(resource.args))
- elseif resource.type == "client" then
- return TriggerClientEvent(resource.event, table.unpack(resource.args))
- elseif resource.type == "export" then
- return exports[resource.name][resource.event](table.unpack(resource.args))
- end
- end
- end
- ---Fallback for clientside exports
+ --- Fallback for clientside exports
TriggerClientEvent("vehiclekeys:client:SetOwner", source, plate)
--- Check client/player.lua
TriggerClientEvent('luxu_admin:client:giveVehicleKeys', source, plate, modelHash)config/commands/sv_commands.lua
-- Get jail information from database
local jailInfo = MySQL.prepare.await(
- "SELECT *, UNIX_TIMESTAMP(expires_at) as expires_at, UNIX_TIMESTAMP(created_at) as created_at FROM luxu_admin_jail WHERE char_id = ? AND expires_at > NOW()",
+ "SELECT *, TIMESTAMPDIFF(SECOND, '1970-01-01 00:00:00', expires_at) as expires_at, TIMESTAMPDIFF(SECOND, '1970-01-01 00:00:00', created_at) as created_at FROM luxu_admin_jail WHERE char_id = ? AND expires_at > UTC_TIMESTAMP()",
{ charId })
config/config.json
"allow_second_fivem_instance": true,
"owners": ["license2:d020a5e4212b8f58fe054a92393dde19c9576361", "license2:85276b4347e328371328427b3b125b38fdacb011"],
"hierarchy_protection": true,
- "default_duty": false,
+ "default_duty": true,
"default_dark_mode": true,
"props_render_distance": 1000,
"branding": {
@@ -55,7 +55,10 @@
],
"_comment_": "Unique Names | The safe radius is the radius around the jail cell where the player walk freely. If the player is not within the safe radius, they will be teleported to the cell."
},
-
+ "weather":{
+ "enabled": false,
+ "__comment__": "Use luxu's built-in weather system"
+ },
"reports": {
"enabled": true
},config/hooks/server.lua
local function deleteVehicle(entity)
if GetResourceState("AdvancedParking") == "started" then
- return exports["AdvancedParking"]:DeleteVehicle(vehicle, false)
+ return exports["AdvancedParking"]:DeleteVehicle(entity, false)
end
DeleteEntity(entity)
endfxmanifest.lua
author 'luxu-gg'
description 'Admin menu for FiveM'
-version '1.14.2'
+version '1.14.3'
dependencies {
'oxmysql',Full list of files changed
| Change | File |
|---|---|
| Modified | bridge/client/player.lua |
| Modified | bridge/server/player.lua |
| Modified | client/modules/props.lua |
| Added | client/modules/weather.lua |
| Modified | config/commands/sv_commands.lua |
| Modified | config/config.json |
| Modified | config/hooks/server.lua |
| Modified | fxmanifest.lua |
| Modified | server/modules/jail.lua |
| Modified | server/index.js |
| Modified | web/ |