forked from Simnation/Main
Update main.lua
This commit is contained in:
parent
c301b8407a
commit
580a854ab5
1 changed files with 36 additions and 26 deletions
|
@ -449,6 +449,8 @@ CreateThread(function()
|
|||
-- Wait for target system to be ready
|
||||
Wait(1000)
|
||||
|
||||
-- Check if Config.ContainerTypes exists and is not empty
|
||||
if Config.ContainerTypes and next(Config.ContainerTypes) then
|
||||
-- Add target for all container types
|
||||
for _, containerType in pairs(Config.ContainerTypes) do
|
||||
exports['qb-target']:AddTargetModel(containerType.model, {
|
||||
|
@ -464,7 +466,12 @@ CreateThread(function()
|
|||
distance = 3.0
|
||||
})
|
||||
end
|
||||
else
|
||||
print("[Container Heist] Error: Config.ContainerTypes is nil or empty!")
|
||||
end
|
||||
|
||||
-- Check if Config.ContainerLocations exists and is not empty
|
||||
if Config.ContainerLocations and next(Config.ContainerLocations) then
|
||||
-- Spawn containers at fixed locations if configured
|
||||
for _, location in pairs(Config.ContainerLocations) do
|
||||
if location.spawnContainer then
|
||||
|
@ -480,6 +487,9 @@ CreateThread(function()
|
|||
SetModelAsNoLongerNeeded(hash)
|
||||
end
|
||||
end
|
||||
else
|
||||
print("[Container Heist] Warning: Config.ContainerLocations is nil or empty!")
|
||||
end
|
||||
end)
|
||||
|
||||
-- Automatically scan for containers periodically
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue