Functions
TrackEntity
Function to start tracking an entity for its deletion
function HRLib.TrackEntity(
entityId: integer,
attachedInfo: table<string, any>?,
cb: fun(entityType: 'vehicle'|'ped'|'object')?
)
Parameters description
entityId
- the id of the entity to trackattachedInfo
- a table where you can set additional info to the properties in the event triggercb
- a callback function to trigger during entity check if you of course want to do something with the entity in each check or to add additional info to the properties in the event trigger but needs to be triggered on each check
GetIsEntityTracked
Function to check if an entity is being tracked by the function TrackEntity
function HRLib.GetIsEntityTracked(entityId: integer): boolean
Parameters description
entityId
- the id of the entity to check
GetTrackedEntityProperties
Function to get the last values set to the properties in the last check
function HRLib.GetTrackedEntityProperties(entity: integer, index: string?): any?
Parameters description
entity
- the entity id to get the properties ofindex
- index of the properties if you're not interested to get all the properties (ifnil
, it will return all the properties)
GetTrackedEntities
Function to get all tracked entities from the player
function HRLib.GetTrackedEntities(): { entity: integer, properties: table }[]?
RemoveEntityTracker
Function to stop tracking entity
function HRLib.RemoveEntityTracker(entityId: integer)
Parameters description
entityId
- the entity id to remove the tracker of
Last updated