Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Game

Index

Constructors

constructor

Properties

Static Protected cachedPlayer

cachedPlayer: Player

Static hashCache

hashCache: Map<string, number> = ...

Accessors

ExtendWorldBoundry

  • set ExtendWorldBoundry(vec: Vector3): void
  • Sets the max boundry the local player can go to before they get killed

    Parameters

    • vec: Vector3

      the max bounds for the local player

    Returns void

LastVehicle

Static CurrentInputMode

  • Get current input mode.

    Returns InputMode

    InputMode: Mouse & Keyboard or GamePad.

Static FPS

  • get FPS(): number
  • Gets the current frame rate per second

    Returns number

Static FrameCount

  • get FrameCount(): number
  • Gets the total amount of frames rendered in this session

    Returns number

Static GameTime

  • get GameTime(): number
  • Gets how many milliseconds the game has been open this session

    Returns number

Static IsCutsceneActive

  • get IsCutsceneActive(): boolean

Static IsLoading

  • get IsLoading(): boolean
  • Get if a loading screen is active.

    Returns boolean

Static IsMissionActive

  • get IsMissionActive(): boolean
  • set IsMissionActive(toggle: boolean): void

Static IsPaused

  • get IsPaused(): boolean
  • set IsPaused(toggle: boolean): void
  • Is the player in the pause menu (ESC).

    Returns boolean

  • Force enable pause menu.

    Parameters

    • toggle: boolean

    Returns void

Static IsRandomEventActive

  • get IsRandomEventActive(): boolean
  • set IsRandomEventActive(toggle: boolean): void

Static IsWaypointActive

  • get IsWaypointActive(): boolean
  • Is a waypoint set on the map.

    Returns boolean

Static Language

Static LastFrameTime

  • get LastFrameTime(): number
  • Gets the time it currently takes to render a frame, in seconds;

    Returns number

Static MaxWantedLevel

  • get MaxWantedLevel(): number
  • set MaxWantedLevel(value: number): void
  • Get the maximum wanted level.

    Returns number

  • Set the maximum wanted level the local client can get.

    Parameters

    • value: number

    Returns void

Static Nightvision

  • get Nightvision(): boolean
  • set Nightvision(toggle: boolean): void
  • Get if nightvision is active.

    Returns boolean

  • Toggle nightvision.

    Parameters

    • toggle: boolean

    Returns void

Static Player

Static PlayerPed

  • get PlayerPed(): Ped
  • Get the local player character's Ped object.

    Returns Ped

    A local player's character.

Static PlayerVersusPlayer

  • get PlayerVersusPlayer(): boolean
  • set PlayerVersusPlayer(value: boolean): void
  • Get whether PvP is enabled.

    Returns boolean

    True if enabled.

  • Set whether PvP is enabled.

    Parameters

    • value: boolean

    Returns void

    True if enabled.

Static RadioStation

  • Gets the player's current radio station.

    Returns RadioStation

    A radio station.

  • Sets the player's radio station.

    Parameters

    Returns void

    A radio station.

Static ShowPoliceBlipsOnRadar

  • set ShowPoliceBlipsOnRadar(toggle: boolean): void
  • Set whether police blips should show on minimap.

    Parameters

    • toggle: boolean

    Returns void

Static ThermalVision

  • get ThermalVision(): boolean
  • set ThermalVision(toggle: boolean): void
  • Get if thermal (heat) vision is active.

    Returns boolean

  • Toggle thermal (heat) vision.

    Parameters

    • toggle: boolean

    Returns void

Static TimeScale

  • set TimeScale(time: number): void
  • Sets the time scale of the Game.

    Parameters

    • time: number

      The time scale, only accepts values between 0.0 and 1.0

    Returns void

Static WantedMultiplier

  • set WantedMultiplier(value: number): void
  • Set the multiplier of the wanted level.

    Parameters

    • value: number

    Returns void

Methods

Static disableAllControlsThisFrame

  • disableAllControlsThisFrame(inputMode: InputMode): void
  • Disables all Controls this frame.

    Parameters

    Returns void

Static disableControlThisFrame

  • Makes the Game Engine ignore the given Control this frame

    Parameters

    Returns void

Static doesGXTEntryExist

  • doesGXTEntryExist(entry: string | number): boolean
  • Determines the game language files contain a entry for the specified GXT key

    Parameters

    • entry: string | number

      The GXT key.

    Returns boolean

    true if GXT entry exists; otherwise, false

Static enableAllControlsThisFrame

  • enableAllControlsThisFrame(inputMode: InputMode): void
  • Enables all Controls this frame.

    Parameters

    Returns void

Static enableControlThisFrame

  • Makes the Game Engine respond to the given Control this frame

    Parameters

    Returns void

Static entityFromHandle

  • Get an entity object from an entity handle.

    Parameters

    • handle: number

      Handle of entity

    Returns null | Ped | Vehicle | Prop

    A Ped, Vehicle or Prop object. undefined if entity handle doesn't exist.

Static generateHash

  • generateHash(input: string): number
  • Calculate the Jenkins One At A Time (joaat) has from the given string.

    Parameters

    • input: string

      The input string to calculate the hash

    Returns number

Static getGXTEntry

  • getGXTEntry(entry: string | number): string
  • Returns a localised string from the games language files with a specified GXT key

    Parameters

    • entry: string | number

      The GXT key.

    Returns string

    The localised string if the key exists; otherwise, empty string

Static isControlEnabled

  • Check whether a control is enabled this frame.

    Parameters

    Returns boolean

    True or False.

Static isControlJustPressed

  • Check whether a control has been pressed since last check.

    Parameters

    Returns boolean

    True or False.

Static isControlJustReleased

  • Check whether a control has been released since last check.

    Parameters

    Returns boolean

    True or False.

Static isControlPressed

  • Check whether a control is currently pressed.

    Parameters

    Returns boolean

    True or False.

Static isControlReleased

  • Check whether a control is being released.

    Parameters

    Returns boolean

    True or False.

Static isDisabledControlJustPressed

  • Check whether a disabled control has been pressed since last check.

    Parameters

    Returns boolean

    True or False.

Static isDisabledControlJustReleased

  • Check whether a disabled control has been released since last check.

    Parameters

    Returns boolean

    True or False.

Static isDisabledControlPressed

  • Check whether a disabled control is currently pressed.

    Parameters

    Returns boolean

    True or False.

Static isDisabledControlReleased

  • Check whether a disabled control is being released.

    Parameters

    Returns boolean

    True or False.

Static playMusic

  • playMusic(musicFile: string): void
  • Play music. Same as Audio.playSound

    Parameters

    • musicFile: string

      Music file.

    Returns void

Static playSound

  • playSound(soundFile: string, soundSet: string): void
  • Play a sound. Same as Audio.playSound

    Parameters

    • soundFile: string

      Name of sound

    • soundSet: string

      The set where the sound is in

    Returns void

Static playerList

  • playerList(excludeLocalPlayer?: boolean): IterableIterator<Player>
  • Get an iterable list of players currently on server.

    Parameters

    • excludeLocalPlayer: boolean = false

    Returns IterableIterator<Player>

    Iterable list of Player objects.

Static stopMusic

  • stopMusic(musicFile?: string): void
  • Stop music. If musicFile is not given, last played music is stopped. Same as Audio.playSound

    Parameters

    • Optional musicFile: string

      (optional) Music file.

    Returns void

Generated using TypeDoc