HRScripts Documentation
  • HRScripts Documentation
  • Resources
    • 📚HRLib
      • Classes
        • HRLibConfig
        • HRLibClientFPlayer
        • HRLibServerFPlayer
        • HRLibClientIPlayer
        • HRLibServerIPlayer
        • HRLibCloseIPlayer
        • HRLibCloseFPlayer
        • HRLibBlipOptions
        • HRLibBlipForCoordOptions
        • HRLibBlipForEntityOptions
        • HRLibBlipForAreaOptions
        • HRLibBlipForPickupOptions
        • HRLibInputDialogueTextOptions
        • HRLibVehicleProperties
      • Modules
        • Bridge
          • Shared
          • Client
          • Server
        • Callbacks
          • Shared
          • Client
          • Server
        • Closest
          • Client
        • Controls Disable
          • Client
        • CreateBlip
          • Client
        • DiscordMsg
          • Server
        • DoesIdExist
          • Shared
        • FPlayer
          • Shared
          • Client
          • Server
        • GetPedsInVehicle
          • Client
        • GetPedWeapons
          • Client
        • GetPlayers
          • Client
        • GetVehicleDoorStatus
          • Client
        • GetVehicleFromPlate
          • Client
        • Interface
          • Client
          • Server
        • IPlayer
          • Client
          • Server
        • PlayerIdentifiers
          • Server
        • RadomValueWithNoRepetition
          • Shared
        • RegCommand
          • Client
          • Server
        • Resource
          • Shared
          • Server
        • SpawnVehicle
          • Shared
        • Streaming
          • Client
        • string
          • Shared
        • table
          • Shared
        • ToVector
          • Shared
        • TrackingEntities
          • Client
            • Functions
            • Events
        • Values
          • Shared
          • Client
        • VehicleProperties
          • Client
          • Server
        • SetDefaultPedVariation
          • Shared
    • HRGarages
      • Classes
        • HRGaragesConfig
        • HRGaragesVehicleInfo
        • HRGaragesClientFunctions
      • Exports
        • Server
    • 📦HRStorages
      • Exports
        • Client
        • Server
      • Callbacks
      • Commands
    • 🧹HRComserv
    • 🥷HRHostage
    • HRAdminMenu
      • Events
      • Exports
        • Client
        • Server
      • State Bags
    • ☑️HRWhitelist
    • HRExtraCommands
    • 🚦HRRealisticTraffic
    • 🗣️HRNPCDialogue
      • Classes
Powered by GitBook
On this page
  • TrackEntity
  • GetIsEntityTracked
  • GetTrackedEntityProperties
  • GetTrackedEntities
  • RemoveEntityTracker
  1. Resources
  2. HRLib
  3. Modules
  4. TrackingEntities
  5. Client

Functions

PreviousClientNextEvents

Last updated 29 days ago

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 track

  • attachedInfo - a table where you can set additional info to the properties in the event trigger

  • cb - 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

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 of

  • index - index of the properties if you're not interested to get all the properties (if nil, 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

📚
TrackEntity