[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)
 | 
			
		||||
 | 
			
		||||
-- Funktion zum Spawnen des NPCs
 | 
			
		||||
local function SpawnGuardNPC(npc)
 | 
			
		||||
function SpawnGuardNPC(npc)
 | 
			
		||||
    -- Ped Model laden
 | 
			
		||||
    RequestModel(npc.model)
 | 
			
		||||
    while not HasModelLoaded(npc.model) do
 | 
			
		||||
| 
						 | 
				
			
			@ -38,7 +38,7 @@ local function SpawnGuardNPC(npc)
 | 
			
		|||
end
 | 
			
		||||
 | 
			
		||||
-- Funktion zum Entfernen des NPCs
 | 
			
		||||
local function RemoveGuardNPC()
 | 
			
		||||
function RemoveGuardNPC()
 | 
			
		||||
    if DoesEntityExist(npcHandle) then
 | 
			
		||||
        DeleteEntity(npcHandle)
 | 
			
		||||
        isNPCSpawned = false
 | 
			
		||||
| 
						 | 
				
			
			@ -59,8 +59,10 @@ CreateThread(function()
 | 
			
		|||
            print("spawnDistance: "..spawnDistance)
 | 
			
		||||
        
 | 
			
		||||
            if dist < spawnDistance and not isNPCSpawned then
 | 
			
		||||
                print("Trigger")
 | 
			
		||||
                SpawnGuardNPC(v.NPC)
 | 
			
		||||
            elseif dist > spawnDistance and isNPCSpawned then
 | 
			
		||||
                print("Distrigger")
 | 
			
		||||
                RemoveGuardNPC()
 | 
			
		||||
            end
 | 
			
		||||
        end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,4 +17,20 @@ Config.Zonen = {
 | 
			
		|||
            vector4(242.8265, -809.7695, 29.7245, 338.3645)
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
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