forked from Simnation/Main
[Garage]
This commit is contained in:
parent
a4d06e39b8
commit
69959fbc41
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
|
|
0
resources/[carscripts]/mh_garage/server/server.lua
Normal file
0
resources/[carscripts]/mh_garage/server/server.lua
Normal file
Loading…
Add table
Add a link
Reference in a new issue