Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
refactor: Remove model requesting and loading
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeWasTakenn committed Dec 22, 2021
1 parent 2d0ea78 commit 961dc2d
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions client/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -469,21 +469,13 @@ end)
RegisterNetEvent('luke_garages:RequestVehicle')
AddEventHandler('luke_garages:RequestVehicle', function(data)
local spawn = nil
local model = data.vehicle.model

if data.type == 'garage' then
spawn = currentGarage.spawns
else
spawn = currentImpound.spawns
end

RequestModel(model)
while not HasModelLoaded(model) do
Citizen.Wait(0)
end

SetModelAsNoLongerNeeded(model)


for i = 1, #spawn do
if ESX.Game.IsSpawnPointClear(vector3(spawn[i].x, spawn[i].y, spawn[i].z), 1.0) then
if data.type == 'impound' then
Expand Down

0 comments on commit 961dc2d

Please sign in to comment.