Update main.lua

This commit is contained in:
Miho931 2025-06-08 13:45:42 +02:00
parent 6fcdf2d1d2
commit 91265ef93c

View file

@ -16,13 +16,13 @@ function SpawnGuardNPC(npc)
-- Ped Model laden
RequestModel(npc.model)
local timeout = 0
while not HasModelLoaded(npcHash) and timeout < 100 do
while not HasModelLoaded(npc.model) and timeout < 100 do
timeout = timeout + 1
print("Warte auf Model-Load...")
Wait(100)
end
if not HasModelLoaded(npcHash) then
if not HasModelLoaded(npc.model) then
print("Model konnte nicht geladen werden!")
return
end