Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AreaBlip

Hierarchy

Index

Constructors

constructor

  • new AreaBlip(x: number, y: number, z: number, width: number, height: number, global: boolean): AreaBlip
  • Parameters

    • x: number
    • y: number
    • z: number
    • width: number
    • height: number
    • global: boolean

    Returns AreaBlip

Properties

alpha

alpha: number

asMissionCreator

asMissionCreator: boolean

attachedTo

attachedTo: Entity | null

blipType

blipType: BlipType

bright

bright: boolean

category

category: number

color

color: BlipColor | number

crewIndicatorVisible

crewIndicatorVisible: boolean

dimension

dimension: number

Object dimension.

remarks

Check https://docs.altv.mp/articles/dimensions.html to understand how it works.

display

display: number

flashInterval

flashInterval: number

flashTimer

flashTimer: number

flashes

flashes: boolean

flashesAlternate

flashesAlternate: boolean

friendIndicatorVisible

friendIndicatorVisible: boolean

gxtName

gxtName: string

heading

heading: number

headingIndicatorVisible

headingIndicatorVisible: boolean

highDetail

highDetail: boolean

Readonly id

id: number

Readonly isAttached

isAttached: boolean

isFriendly

isFriendly: boolean

isGlobal

isGlobal: boolean

name

name: string

number

number: number

outlineIndicatorVisible

outlineIndicatorVisible: boolean

pos

pos: Vector3

Object position.

priority

priority: number

pulse

pulse: boolean

Readonly refCount

refCount: number

Returns the ref count of the entity.

remarks

It's only available in debug-mode.

route

route: boolean

routeColor

routeColor: RGBA

scale

scale: number

secondaryColor

secondaryColor: number | RGBA

shortRange

shortRange: boolean

showCone

showCone: boolean

shrinked

shrinked: boolean

size

size: Vector2
remarks

Does't properly work for areablips currently.

sprite

sprite: BlipSprite

Readonly targets

targets: readonly Player[]

tickVisible

tickVisible: boolean

Readonly type

Type of the object.

Readonly valid

valid: boolean

Object usability.

returns

False if object is no longer usable.

visible

visible: boolean

Static Readonly all

all: readonly Blip[]

Array with all blips.

remarks

This creates a clone of the array everytime it is called. It is advised to call this once and store the result in a variable, before iterating over it.

example
const blips = alt.Blip.all; // Store it in a variable, so it doesn't create a copy of the array on each iteration
for(let i = 0; i < blips.length; i++)
{
  alt.log(`${blips[i].scriptID}`); // Logs the scriptID of every blip
}

Static Readonly count

count: number

Methods

addTarget

  • addTarget(player: Player): void
  • Parameters

    Returns void

deleteMeta

  • deleteMeta(key: string): void
  • deleteMeta<K>(key: K): void

deleteSyncedMeta

  • deleteSyncedMeta(key: string): void
  • deleteSyncedMeta<K>(key: K): void
  • Removes the specified key and the data connected to that specific key.

    Parameters

    • key: string

      The key of the value to remove.

    Returns void

  • Type parameters

    Parameters

    • key: K

    Returns void

destroy

  • destroy(): void
  • Removes the object from the world.

    Returns void

fade

  • fade(opacity: number, duration: number): void
  • Parameters

    • opacity: number
    • duration: number

    Returns void

getMeta

  • getMeta<K>(key: Exclude<K, keyof ICustomBlipMeta>): unknown
  • getMeta<K>(key: K): ICustomBlipMeta[K] | undefined
  • getMeta<V>(key: string): V | undefined

getMetaDataKeys

  • getMetaDataKeys(): readonly string[]

getSyncedMeta

  • getSyncedMeta<K>(key: Exclude<K, keyof ICustomBaseObjectSyncedMeta>): unknown
  • getSyncedMeta<K>(key: K): ICustomBaseObjectSyncedMeta[K] | undefined
  • getSyncedMeta<V>(key: string): V | undefined

getSyncedMetaKeys

  • getSyncedMetaKeys(): readonly string[]

hasMeta

  • hasMeta(key: string): boolean
  • hasMeta<K>(key: K): boolean

hasSyncedMeta

  • hasSyncedMeta(key: string): boolean
  • hasSyncedMeta<K>(key: K): boolean
  • Determines whether contains the specified key.

    Parameters

    • key: string

      The key of the value to locate.

    Returns boolean

    True if the meta table contains any data at the specified key or False if not

  • Type parameters

    Parameters

    • key: K

    Returns boolean

removeTarget

  • removeTarget(player: Player): void
  • Parameters

    Returns void

setMeta

  • setMeta<K>(key: K, value: shared.InterfaceValueByKey<ICustomBlipMeta, K>): void
  • setMeta<K>(key: K, value: ICustomBlipMeta[K]): void
  • setMeta<V, K>(key: K, value: shared.InterfaceValueByKey<ICustomBlipMeta, K, V>): void

setSyncedMeta

  • setSyncedMeta<K>(key: K, value: shared.InterfaceValueByKey<ICustomBaseObjectSyncedMeta, K>): void
  • setSyncedMeta<K>(key: K, value: ICustomBaseObjectSyncedMeta[K]): void
  • setSyncedMeta<V, K>(key: K, value: shared.InterfaceValueByKey<ICustomBaseObjectSyncedMeta, K, V>): void

Static getByID

  • getByID(id: number): Blip | null
  • Retrieves the blip from the pool.

    Parameters

    • id: number

      The id of the blip.

    Returns Blip | null

    Entity if it was found, otherwise null.