forked from Simnation/Main
[Garage]
This commit is contained in:
parent
01b5635131
commit
6fd16d35ce
2 changed files with 20 additions and 2 deletions
|
@ -12,7 +12,7 @@ Citizen.CreateThread(function()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Funktion zum Spawnen des NPCs
|
-- Funktion zum Spawnen des NPCs
|
||||||
local function SpawnGuardNPC(npc)
|
function SpawnGuardNPC(npc)
|
||||||
-- Ped Model laden
|
-- Ped Model laden
|
||||||
RequestModel(npc.model)
|
RequestModel(npc.model)
|
||||||
while not HasModelLoaded(npc.model) do
|
while not HasModelLoaded(npc.model) do
|
||||||
|
@ -38,7 +38,7 @@ local function SpawnGuardNPC(npc)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Funktion zum Entfernen des NPCs
|
-- Funktion zum Entfernen des NPCs
|
||||||
local function RemoveGuardNPC()
|
function RemoveGuardNPC()
|
||||||
if DoesEntityExist(npcHandle) then
|
if DoesEntityExist(npcHandle) then
|
||||||
DeleteEntity(npcHandle)
|
DeleteEntity(npcHandle)
|
||||||
isNPCSpawned = false
|
isNPCSpawned = false
|
||||||
|
@ -59,8 +59,10 @@ CreateThread(function()
|
||||||
print("spawnDistance: "..spawnDistance)
|
print("spawnDistance: "..spawnDistance)
|
||||||
|
|
||||||
if dist < spawnDistance and not isNPCSpawned then
|
if dist < spawnDistance and not isNPCSpawned then
|
||||||
|
print("Trigger")
|
||||||
SpawnGuardNPC(v.NPC)
|
SpawnGuardNPC(v.NPC)
|
||||||
elseif dist > spawnDistance and isNPCSpawned then
|
elseif dist > spawnDistance and isNPCSpawned then
|
||||||
|
print("Distrigger")
|
||||||
RemoveGuardNPC()
|
RemoveGuardNPC()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,3 +18,19 @@ Config.Zonen = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Config.Log = {
|
||||||
|
Webhook = "https://discord.com/api/webhooks/1366812966049288192/9ZjJC9_gLX6Fk-acf0YSW_haGWpCqG9zRGWaj0wCKLZefp8FX-GwNZBP77H6K93KfIw3",
|
||||||
|
Color = {
|
||||||
|
green = 56108,
|
||||||
|
grey = 8421504,
|
||||||
|
red = 16711680,
|
||||||
|
orange = 16744192,
|
||||||
|
blue = 2061822,
|
||||||
|
purple = 11750815,
|
||||||
|
},
|
||||||
|
|
||||||
|
SystemName = "Evolution_State_life Log [Dr. Teddy]",
|
||||||
|
UserAvatar = '',
|
||||||
|
SystemAvatar = '',
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue