Skip to content

Commit

Permalink
Update main.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
DevX32 authored Oct 17, 2023
1 parent a12298e commit 5424c51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ RegisterNetEvent('qb-admin:server:changeplayerdata', function(Selected, Selected
end)

RegisterNetEvent('qb-admin:server:SaveCar', function(mods, vehicle, plate)
local src = source
local src = Source
local Player = exports.qbx_core:GetPlayer(src)
local result = MySQL.Sync.fetchAll('SELECT plate FROM player_vehicles WHERE plate = ?', { plate })

if result[1] ~= nil then TriggerClientEvent('ox_lib:notify', src, Lang:t("error.failed_vehicle_owner"), 'error', 3000) return end
if not (exports.qbx_core:HasPermission(src, events['savecar']) then NoPerms(src) return end
if not (exports.qbx_core:HasPermission(src, events['savecar'])) then NoPerms(src) return end

TriggerEvent('qb-log:server:CreateLog', 'admin', 'Admin menu', 'pink', string.format("**%s** (CitizenID: %s | ID: %s) - Saved a car to his garage **%s**",
GetPlayerName(src), Player.PlayerData.citizenid, src, vehicle.model))
Expand Down

0 comments on commit 5424c51

Please sign in to comment.