Skip to content

Commit

Permalink
fix: netId linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mafewtm authored and ChatDisabled committed Dec 24, 2023
1 parent 9ab84d0 commit 03d56b9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,13 @@ end)
RegisterNetEvent('qb-occasions:client:BuyFinished', function(vehData)
DoScreenFadeOut(250)
Wait(500)
local veh = lib.callback.await('qbx_vehiclesales:server:spawnVehicle', false, vehData, Config.Zones[zone].BuyVehicle, false)
local netId = lib.callback.await('qbx_vehiclesales:server:spawnVehicle', false, vehData, Config.Zones[zone].BuyVehicle, false)
local timeout = 100
while not NetworkDoesEntityExistWithNetworkId(netId) and timeout > 0 do
Wait(10)
timeout -= 1
end
local veh = NetToVeh(netId)
SetEntityHeading(veh, Config.Zones[zone].BuyVehicle.w)
SetVehicleFuelLevel(veh, 100)
exports.qbx_core:Notify(Lang:t('success.vehicle_bought'), 'success', 2500)
Expand Down Expand Up @@ -269,12 +270,13 @@ end)
RegisterNetEvent('qb-occasions:client:ReturnOwnedVehicle', function(vehData)
DoScreenFadeOut(250)
Wait(500)
local veh = lib.callback.await('qbx_vehiclesales:server:spawnVehicle', false, vehData, Config.Zones[zone].BuyVehicle, false)
local netId = lib.callback.await('qbx_vehiclesales:server:spawnVehicle', false, vehData, Config.Zones[zone].BuyVehicle, false)
local timeout = 100
while not NetworkDoesEntityExistWithNetworkId(netId) and timeout > 0 do
Wait(10)
timeout -= 1
end
local veh = NetToVeh(netId)
SetEntityHeading(veh, Config.Zones[zone].BuyVehicle.w)
SetVehicleFuelLevel(veh, 100)
exports.qbx_core:Notify(Lang:t('success.vehicle_bought'), 'success', 2500)
Expand Down

0 comments on commit 03d56b9

Please sign in to comment.