should handle network id based targeting add/remove
This commit is contained in:
1 parent
8ea43ea7ce
commit
5ea2d32b88
3 files changed
+45
No files matched your search
@@ -97,6 +97,21 @@ Target.RemoveLocalEntity = function(entities, optionNames)
|
||||
ox_target:removeLocalEntity(entities, optionNames)
|
||||
end
|
||||
|
||||
---This will add a networked entity to the target system.
|
||||
---@param netids table | number
|
||||
---@param options table
|
||||
Target.AddNetworkedEntity = function(netids, options)
|
||||
options = Target.FixOptions(options)
|
||||
ox_target:addEntity(netids, options)
|
||||
end
|
||||
|
||||
---This will remove a networked entity from the target system.
|
||||
---@param netids table | number
|
||||
---@param optionNames string
|
||||
Target.RemoveNetworkedEntity = function(netids, optionNames)
|
||||
ox_target:removeEntity(netids, optionNames)
|
||||
end
|
||||
|
||||
---This will add target options to all specified models. This is useful for when you want to add target options to all models of a specific type.
|
||||
---@param models number | table
|
||||
---@param options table
|
||||
|
||||
@@ -80,6 +80,21 @@ Target.AddGlobalVehicle = function(options)
|
||||
})
|
||||
end
|
||||
|
||||
---This will add a networked entity to the target system.
|
||||
---@param netids table | number
|
||||
---@param options table
|
||||
Target.AddNetworkedEntity = function(netids, options)
|
||||
options = Target.FixOptions(options)
|
||||
qb_target:AddTargetEntity(netids, options)
|
||||
end
|
||||
|
||||
---This will remove a networked entity from the target system.
|
||||
---@param netids table | number
|
||||
---@param optionNames string
|
||||
Target.RemoveNetworkedEntity = function(netids, optionNames)
|
||||
qb_target:RemoveTargetEntity(netids, optionNames)
|
||||
end
|
||||
|
||||
---This will remove target options from all vehicles.
|
||||
---@param options table
|
||||
Target.RemoveGlobalVehicle = function(options)
|
||||
|
||||
@@ -80,6 +80,21 @@ Target.RemoveGlobalVehicle = function(options)
|
||||
sleepless_interact:removeGlobalVehicle(assembledLables)
|
||||
end
|
||||
|
||||
---This will add a networked entity to the target system.
|
||||
---@param netids table | number
|
||||
---@param options table
|
||||
Target.AddNetworkedEntity = function(netids, options)
|
||||
options = Target.FixOptions(options)
|
||||
sleepless_interact:addEntity(netids, options)
|
||||
end
|
||||
|
||||
---This will remove a networked entity from the target system.
|
||||
---@param netids table | number
|
||||
---@param optionNames string
|
||||
Target.RemoveNetworkedEntity = function(netids, optionNames)
|
||||
sleepless_interact:removeEntity(netids, optionNames)
|
||||
end
|
||||
|
||||
---This will generate targets on non networked entites with the passed options.
|
||||
---@param entities number | table
|
||||
---@param options table
|
||||
|
||||
Reference in new issue
Block a user