Targets, entities and events, oh my!

Targets updated to have boxzone
Entities dont require a model and are effectively points with on spawn on despawn
onplayerloaded and onplayeriunloaded now pass source
This commit is contained in:
gononono64 committed 2025-06-02 22:19:42 -05:00
1 parent 3a141cb8f2
commit 34d24cb6a9
11 files changed
+61 -352

No files matched your search

+5 -5
View File
@@ -66,7 +66,7 @@ Target.AddGlobalVehicle = function(options)
})
end
---This will remove target options from all vehicles.
---This will remove target options from all vehicles.
---@param options table
Target.RemoveGlobalVehicle = function(options)
local assembledLables = {}
@@ -116,14 +116,14 @@ end
---@param size table
---@param heading number
---@param options table
Target.AddBoxZone = function(name, coords, size, heading, options)
Target.AddBoxZone = function(name, coords, size, heading, options, debug)
options = Target.FixOptions(options)
qb_target:AddBoxZone(name, coords, size.x, size.y, {
name = name,
debugPoly = targetDebug,
debugPoly = debug or targetDebug,
heading = heading,
minZ = coords.z - (size.x * 0.5),
maxZ = coords.z + (size.x * 0.5),
minZ = coords.z - (size.z * 0.5),
maxZ = coords.z + (size.z * 0.5),
}, {
options = options,
distance = options.distance or 1.5,