diff --git a/client/main.lua b/client/main.lua index bf4a8c0..5222c35 100644 --- a/client/main.lua +++ b/client/main.lua @@ -217,7 +217,7 @@ RegisterNetEvent('qb-vehiclekeys:client:GiveKeys', function(id) end end else - QBCore.Functions.Notify({ text = Lang:t("notify.no_keys"), type = 'error' }) + QBCore.Functions.Notify({Lang:t("notify.no_keys"), type = 'error'}) end end end) @@ -241,7 +241,7 @@ function GiveKeys(id, plate) if distance < 1.5 and distance > 0.0 then TriggerServerEvent('qb-vehiclekeys:server:GiveVehicleKeys', id, plate) else - QBCore.Functions.Notify({ text = Lang:t("notify.not_near"), type = 'error' }) + QBCore.Functions.Notify({Lang:t("notify.not_near"), type = 'error'}) end end @@ -330,10 +330,10 @@ function ToggleVehicleLocks(veh) NetworkRequestControlOfEntity(veh) if vehLockStatus == 1 then TriggerServerEvent('qb-vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(veh), 2) - QBCore.Functions.Notify({ text = Lang:t("notify.vehicle_locked"), type = 'inform' }) + QBCore.Functions.Notify({Lang:t("notify.vehicle_locked"), type = 'inform'}) else TriggerServerEvent('qb-vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(veh), 1) - QBCore.Functions.Notify({ text = Lang:t("notify.vehicle_unlocked"), type = 'inform' }) + QBCore.Functions.Notify({Lang:t("notify.vehicle_unlocked"), type = 'inform'}) end SetVehicleLights(veh, 2) @@ -344,7 +344,7 @@ function ToggleVehicleLocks(veh) Wait(300) ClearPedTasks(ped) else - QBCore.Functions.Notify({ text = Lang:t("notify.no_keys"), type = 'error' }) + QBCore.Functions.Notify({Lang:t("notify.no_keys"), type = 'error'}) end else TriggerServerEvent('qb-vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(veh), 1) @@ -411,7 +411,7 @@ function LockpickFinishCallback(success) if GetPedInVehicleSeat(vehicle, -1) == cache.ped then TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', QBCore.Functions.GetPlate(vehicle)) else - QBCore.Functions.Notify({ text = Lang:t("notify.vehicle_lockedpick"), type = 'success' }) + QBCore.Functions.Notify({Lang:t("notify.vehicle_lockedpick"), type = 'success'}) TriggerServerEvent('qb-vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(vehicle), 1) end @@ -454,7 +454,7 @@ function Hotwire(vehicle, plate) if (math.random() <= Config.HotwireChance) then TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', plate) else - QBCore.Functions.Notify({ text = Lang:t("notify.failed_lockedpick"), type = 'error' }) + QBCore.Functions.Notify({Lang:t("notify.failed_lockedpick"), type = 'error'}) end Wait(Config.TimeBetweenHotwires) IsHotwiring = false @@ -528,7 +528,7 @@ function CarjackVehicle(target) TriggerServerEvent('hud:server:GainStress', math.random(1, 4)) TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', plate) else - QBCore.Functions.Notify({ text = Lang:t("notify.carjack_failed"), type = 'error' }) + QBCore.Functions.Notify({Lang:t("notify.carjack_failed"), type = 'error'}) MakePedFlee(target) TriggerServerEvent('hud:server:GainStress', math.random(1, 4)) end diff --git a/server/main.lua b/server/main.lua index 63c8fe3..1dcda30 100644 --- a/server/main.lua +++ b/server/main.lua @@ -18,7 +18,7 @@ RegisterNetEvent('qb-vehiclekeys:server:GiveVehicleKeys', function(receiver, pla local giver = source if HasKeys(giver, plate) then - TriggerClientEvent('QBCore:Notify', giver, {text = Lang:t("notify.gave_keys") }) + TriggerClientEvent('QBCore:Notify', giver, Lang:t("notify.gave_keys")) if type(receiver) == 'table' then for _,r in ipairs(receiver) do GiveKeys(receiver[r], plate) @@ -27,7 +27,7 @@ RegisterNetEvent('qb-vehiclekeys:server:GiveVehicleKeys', function(receiver, pla GiveKeys(receiver, plate) end else - TriggerClientEvent('QBCore:Notify', giver, {text = Lang:t("notify.no_keys") }) + TriggerClientEvent('QBCore:Notify', giver, Lang:t("notify.no_keys")) end end) @@ -69,7 +69,7 @@ function GiveKeys(id, plate) if not VehicleList[plate] then VehicleList[plate] = {} end VehicleList[plate][citizenid] = true - TriggerClientEvent('QBCore:Notify', id, {text = Lang:t('notify.keys_taken')}) + TriggerClientEvent('QBCore:Notify', id, Lang:t('notify.keys_taken')) TriggerClientEvent('qb-vehiclekeys:client:AddKeys', id, plate) end @@ -127,7 +127,7 @@ lib.addCommand('addkeys', { }, function (source, args) local src = source if not args.id or not args.plate then - TriggerClientEvent('QBCore:Notify', src, {text = Lang:t("notify.fpid")}) + TriggerClientEvent('QBCore:Notify', src, Lang:t("notify.fpid")) return end GiveKeys(args.id, args.plate) @@ -153,7 +153,7 @@ lib.addCommand('removekeys', { }, function (source, args) local src = source if not args.id or not args.plate then - TriggerClientEvent('QBCore:Notify', src, {text = Lang:t("notify.fpid")}) + TriggerClientEvent('QBCore:Notify', src, Lang:t("notify.fpid")) return end RemoveKeys(args.id, args.plate)