diff --git a/resources/[carscripts]/mh_garage/client/main.lua b/resources/[carscripts]/mh_garage/client/main.lua index c0d91421b..d93ad39ac 100644 --- a/resources/[carscripts]/mh_garage/client/main.lua +++ b/resources/[carscripts]/mh_garage/client/main.lua @@ -18,34 +18,27 @@ function SpawnGuardNPC(npc) local timeout = 0 while not HasModelLoaded(npc.model) and timeout < 100 do timeout = timeout + 1 - print("Warte auf Model-Load...") Wait(100) end if not HasModelLoaded(npc.model) then - print("Model konnte nicht geladen werden!") return end - print("Model erfolgreich geladen, erstelle NPC...") -- NPC erstellen npcHandle = CreatePed(4, npc.model, npc.spawn.x, npc.spawn.y, npc.spawn.z, npc.spawn.w, false, true) if not DoesEntityExist(npcHandle) then - print("NPC konnte nicht erstellt werden!") return end - print("NPC erfolgreich erstellt mit Handle: " .. tostring(npcHandle)) -- NPC Eigenschaften setzen SetEntityAsMissionEntity(npcHandle, true, true) - SetPedDefaultComponentVariation(npcHandle) - --[[ SetEntityAsMissionEntity(npcHandle, true, true) SetBlockingOfNonTemporaryEvents(npcHandle, true) SetPedDiesWhenInjured(npcHandle, false) SetPedCanPlayAmbientAnims(npcHandle, true) SetPedCanRagdollFromPlayerImpact(npcHandle, false) SetEntityInvincible(npcHandle, true) - FreezeEntityPosition(npcHandle, true) ]] + FreezeEntityPosition(npcHandle, true) -- Optional: Animation für den NPC TaskStartScenarioInPlace(npcHandle, "WORLD_HUMAN_GUARD_STAND", 0, true)