Utilities
Client

Framework Utilities

LoadModel

Load a model when called from a thread it will yield until loaded

Framework.LoadModel(model) 
  • model: number | string

LoadAnimDict

Load a animation dictionary when called from a thread it will yield until loaded

Framework.LoadAnimDict(animDict) 
  • animDict: string

LoadAnimSet

Load a animation clipset when called from a thread it will yield until loaded

Framework.LoadAnimSet(animSet)
  • animSet: string

LoadAmbientAudioBank

Load a ambient audio bank when called from a thread it will yield until loaded

Framework.LoadAmbientAudioBank(bank)
  • bank: string

LoadMissionAudioBank

Load a mission audio bank when called from a thread it will yield until loaded

Framework.LoadMissionAudioBank(bank)
  • bank: string

LoadScriptAudioBank

Load a script audio bank when called from a thread it will yield until loaded

Framework.LoadScriptAudioBank(bank)
  • bank: string

GetPeds

Get the Game Ped Pool

Framework.GetPeds()

returns: [handlers: number]

GetObjects

Get the Game Object Pool

Framework.GetObjects()

returns: [handlers: number]

GetVehicles

Get the Game Vehicle Pool

Framework.GetVehicles()

returns: [handlers: number]

GetPickups

Get the Game Pickup Pool

Framework.GetPickups()

returns: [handlers: number]

GetClosestPed

Get the ped and coords closest to set coords and distance

Framework.GetClosestPed(coords, distance)
  • coords: vector3
  • distance?: number

returns:

  • ped?: number
  • coords?: vector3

GetClosestPlayer

Get the player, ped and coords closest to set coords and distance

Framework.GetClosestPlayer(coords, distance, includeLocal)
  • coords: vector3
  • distance?: number
  • includeLocal?: boolean

returns:

  • player?: number
  • ped?: number
  • coords?: vector3

GetClosestObject

Get the object and coords closest to set coords and distance

Framework.GetClosestObject(coords, distance)
  • coords: vector3
  • distance?: number

returns:

  • object?: number
  • coords?: vector3

GetClosestVehicle

Get the vehicle and coords closest to set coords and distance

Framework.GetClosestVehicle(coords, distance, includeLocal)
  • coords: vector3
  • distance?: number
  • includeLocal?: boolean

returns:

  • vehicle?: number
  • coords?: vector3

GetClosestPickup

Get the pickup and coords closest to set coords and distance

Framework.GetClosestPickup(coords, distance)
  • coords: vector3
  • distance?: number

returns:

  • pickup?: number
  • coords?: vector3

GetNearbyPeds

Get all peds and coords in range of set coords and distance

Framework.GetNearbyPeds(coords, distance)
  • coords: vector3
  • distance?: number

returns: { ped: number, coords: vector3 }[]

GetNearbyPlayers

Get all players, peds and coords in range of set coords and distance

Framework.GetNearbyPlayers(coords, distance, includeLocal)
  • coords: vector3
  • distance?: number
  • includeLocal?: boolean

returns: { id: number, ped: number, coords: vector3 }[]

GetNearbyObjects

Get all objects and coords in range of set coords and distance

Framework.GetNearbyObjects(coords, distance)
  • coords: vector3
  • distance?: number

returns: { object: number, coords: vector3 }[]

GetNearbyVehicles

Get all vehicles and coords in range of set coords and distance

Framework.GetNearbyVehicles(coords, distance, includeLocal)
  • coords: vector3
  • distance?: number
  • includeLocal?: boolean

returns: { vehicle: number, coords: vector3 }[]

GetNearbyPickups

Get all pickups and coords in range of set coords and distance

Framework.GetNearbyPickups(coords, distance)
  • coords: vector3
  • distance?: number

returns: { pickup: number, coords: vector3 }[]

ProgressBar

Displays a running progress bar

Framework.ProgressBar(data)
  • data: table
    • duration: number
    • label: string
    • canCancel?: boolean
    • useWhileDead?: boolean
    • anim?: table
      • dict?: string
      • clip?: string
      • flag?: number
      • scenario?: string
    • disable?: table
      • move?: boolean
      • vehicle?: boolean
      • combat?: boolean
      • mouse?: boolean
    • props?: (object or array)
      • model: string
      • bone?: number
      • pos: vector3
      • rot: vector3
    • onFinish?: function()
    • onCancel?: function()

NetworkRequestControlOfNetworkId

⚠️

Not Recommended Unless You Absolutely Need It

Request network control of network id

Framework.NetworkRequestControlOfNetworkId(netid) 
  • netid: number

NetworkRequestControlOfEntity

⚠️

Not Recommended Unless You Absolutely Need It

Request network control of entity

Framework.NetworkRequestControlOfEntity(entity) 
  • entity: number

NetworkRequestControlOfDoor

⚠️

Not Recommended Unless You Absolutely Need It

Request network control of door

Framework.NetworkRequestControlOfDoor(door) 
  • door: number