This commit is contained in:
Miho931 2025-06-08 16:20:16 +02:00
parent 0e0f3736ba
commit 2edc94b699
6 changed files with 54 additions and 8 deletions

View file

@ -67,7 +67,7 @@ CreateThread(function()
if dist < spawnDistance and not isNPCSpawned then
SpawnGuardNPC(v.NPC)
Wait(300)
AddTargetOptions()
AddTargetOptions(v)
elseif dist > spawnDistance and isNPCSpawned then
exports['qb-target']:RemoveTargetEntity(npcHandle)
RemoveGuardNPC()
@ -78,20 +78,22 @@ CreateThread(function()
end
end)
function AddTargetOptions()
function AddTargetOptions(zone)
exports['qb-target']:AddTargetEntity(npcHandle, {
options = {
{
type = "client",
event = "garage:storeVehicle",
event = "mh_garage:storeVehicle",
icon = "fas fa-parking",
label = "Fahrzeug einparken"
label = "Fahrzeug einparken",
item = zone
},
{
type = "client",
event = "garage:retrieveVehicle",
event = "mh_garage:retrieveVehicle",
icon = "fas fa-car",
label = "Fahrzeug ausparken"
label = "Fahrzeug ausparken",
item = zone
}
},
distance = 2.5