forked from Simnation/Main
Update main.lua
This commit is contained in:
parent
a2fe329c9b
commit
5d000c1205
1 changed files with 2 additions and 1 deletions
|
@ -80,12 +80,13 @@ CreateThread(function()
|
||||||
local spawnDistance = v.NPC.distance
|
local spawnDistance = v.NPC.distance
|
||||||
|
|
||||||
if dist < spawnDistance and not isNPCSpawned then
|
if dist < spawnDistance and not isNPCSpawned then
|
||||||
|
isNPCSpawned = true
|
||||||
print(isNPCSpawned)
|
print(isNPCSpawned)
|
||||||
CurrentZone = v
|
CurrentZone = v
|
||||||
SpawnGuardNPC(v.NPC)
|
SpawnGuardNPC(v.NPC)
|
||||||
Wait(300)
|
|
||||||
AddTargetOptions()
|
AddTargetOptions()
|
||||||
elseif dist > spawnDistance and isNPCSpawned then
|
elseif dist > spawnDistance and isNPCSpawned then
|
||||||
|
isNPCSpawned = false
|
||||||
CurrentZone = nil
|
CurrentZone = nil
|
||||||
exports['qb-target']:RemoveTargetEntity(npcHandle)
|
exports['qb-target']:RemoveTargetEntity(npcHandle)
|
||||||
RemoveGuardNPC()
|
RemoveGuardNPC()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue