1
0
Fork 0
forked from Simnation/Main
This commit is contained in:
Miho931 2025-06-08 12:30:15 +02:00
parent a4d06e39b8
commit 69959fbc41
2 changed files with 2 additions and 2 deletions

View file

@ -20,7 +20,7 @@ local function SpawnGuardNPC(npc)
end end
-- NPC erstellen -- NPC erstellen
npcHandle = CreatePed(4, npc.model, npc.spawn, false, true) npcHandle = CreatePed(4, npc.model, npc.spawn.x, npc.spawn.y, npc.spawn.x, npc.spawn.w false, true)
-- NPC Eigenschaften setzen -- NPC Eigenschaften setzen
SetEntityAsMissionEntity(npcHandle, true, true) SetEntityAsMissionEntity(npcHandle, true, true)
@ -52,7 +52,7 @@ CreateThread(function()
local playerCoords = GetEntityCoords(playerPed) local playerCoords = GetEntityCoords(playerPed)
for k, v in pairs(Config.Zonen) do for k, v in pairs(Config.Zonen) do
local dist = #(playerCoords - v.NPC.spawn) local dist = #(playerCoords - vector3(v.NPC.spawn.x, v.NPC.spawn.y, v.NPC.spawn.z))
local spawnDistance = v.NPC.distance local spawnDistance = v.NPC.distance
if dist < spawnDistance and not isNPCSpawned then if dist < spawnDistance and not isNPCSpawned then