From 13431ff32682e502519403cac745a02d1f69172c Mon Sep 17 00:00:00 2001 From: Miho931 <98314142+Miho931@users.noreply.github.com> Date: Sun, 8 Jun 2025 13:53:03 +0200 Subject: [PATCH] Update main.lua --- resources/[carscripts]/mh_garage/client/main.lua | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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)