diff --git a/resources/[carscripts]/mh_garage/client/main.lua b/resources/[carscripts]/mh_garage/client/main.lua index 380cf04e9..882c12b83 100644 --- a/resources/[carscripts]/mh_garage/client/main.lua +++ b/resources/[carscripts]/mh_garage/client/main.lua @@ -17,11 +17,12 @@ function SpawnGuardNPC(npc) RequestModel(npc.model) while not HasModelLoaded(npc.model) do Wait(1) + print("Model is Loading...") end -- NPC erstellen npcHandle = CreatePed(4, npc.model, npc.spawn.x, npc.spawn.y, npc.spawn.x, npc.spawn.w, false, true) - + print("NPC Sollte stehen!") -- NPC Eigenschaften setzen SetEntityAsMissionEntity(npcHandle, true, true) SetBlockingOfNonTemporaryEvents(npcHandle, true) @@ -54,15 +55,10 @@ CreateThread(function() for k, v in pairs(Config.Zonen) do local dist = #(playerCoords - vector3(v.NPC.spawn.x, v.NPC.spawn.y, v.NPC.spawn.z)) local spawnDistance = v.NPC.distance - print("PlayerCoords: "..playerCoords) - print("dist: "..dist) - print("spawnDistance: "..spawnDistance) if dist < spawnDistance and not isNPCSpawned then - print("Trigger") SpawnGuardNPC(v.NPC) elseif dist > spawnDistance and isNPCSpawned then - print("Distrigger") RemoveGuardNPC() end end