### Hierarchy

- Game

## Index

### Constructors

- constructor

### Properties

- cachedPlayer

### Accessors

- CurrentInputMode
- FPS
- FrameCount
- GameTime
- IsCutsceneActive
- IsLoading
- IsMissionActive
- IsPaused
- IsRandomEventActive
- IsWaypointActive
- Language
- LastFrameTime
- MaxWantedLevel
- Nightvision
- Player
- PlayerPed
- PlayerVersusPlayer
- RadioStation
- ShowPoliceBlipsOnRadar
- ThermalVision
- TimeScale
- WantedMultiplier

### Methods

- disableAllControlsThisFrame
- disableControlThisFrame
- doesGXTEntryExist
- enableAllControlsThisFrame
- enableControlThisFrame
- entityFromHandle
- generateHash
- getGXTEntry
- isControlEnabled
- isControlJustPressed
- isControlJustReleased
- isControlPressed
- isControlReleased
- isDisabledControlJustPressed
- isDisabledControlJustReleased
- isDisabledControlPressed
- isDisabledControlReleased
- playMusic
- playSound
- playerList
- stopMusic

## Constructors

### constructor

- new Game(): Game

- #### Returns Game

## Properties

### Static Protected cachedPlayer

cachedPlayer: Player

- Defined in Game.ts:452

## Accessors

### Static CurrentInputMode

- get CurrentInputMode(): InputMode

- - Defined in Game.ts:221

  Get current input mode.

  #### Returns InputMode

  InputMode: Mouse & Keyboard or GamePad.

### Static FPS

- get FPS(): number

- - Defined in Game.ts:51

  Gets the current frame rate per second

  #### Returns number

### Static FrameCount

- get FrameCount(): number

- - Defined in Game.ts:44

  Gets the total amount of frames rendered in this session

  #### Returns number

### Static GameTime

- get GameTime(): number

- - Defined in Game.ts:28

  Gets how many milliseconds the game has been open this session

  #### Returns number

### Static IsCutsceneActive

- get IsCutsceneActive(): boolean

- - Defined in Game.ts:185

  #### Returns boolean

### Static IsLoading

- get IsLoading(): boolean

- - Defined in Game.ts:213

  Get if a loading screen is active.

  #### Returns boolean

### Static IsMissionActive

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

- - Defined in Game.ts:169

  #### Returns boolean

- - Defined in Game.ts:173

  #### Parameters

  - ##### toggle: boolean

  #### Returns void

### Static IsPaused

- get IsPaused(): boolean
- set IsPaused(toggle: boolean): void

- - Defined in Game.ts:199

  Is the player in the pause menu (ESC).

  #### Returns boolean

- - Defined in Game.ts:206

  Force enable pause menu.

  #### Parameters

  - ##### toggle: boolean

  #### Returns void

### Static IsRandomEventActive

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

- - Defined in Game.ts:177

  #### Returns boolean

- - Defined in Game.ts:181

  #### Parameters

  - ##### toggle: boolean

  #### Returns void

### Static IsWaypointActive

- get IsWaypointActive(): boolean

- - Defined in Game.ts:192

  Is a waypoint set on the map.

  #### Returns boolean

### Static Language

- get Language(): Language

- - Defined in Game.ts:21

  Gets the game language

  #### Returns Language

### Static LastFrameTime

- get LastFrameTime(): number

- - Defined in Game.ts:58

  Gets the time it currently takes to render a frame, in seconds;

  #### Returns number

### Static MaxWantedLevel

- get MaxWantedLevel(): number
- set MaxWantedLevel(value: number): void

- - Defined in Game.ts:110

  Get the maximum wanted level.

  #### Returns number

- - Defined in Game.ts:117

  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

- - Defined in Game.ts:144

  Get if nightvision is active.

  #### Returns boolean

- - Defined in Game.ts:151

  Toggle nightvision.

  #### Parameters

  - ##### toggle: boolean

  #### Returns void

### Static Player

- get Player(): Player

- - Defined in Game.ts:65

  Get the local player's Player object.

  #### Returns Player

### Static PlayerPed

- get PlayerPed(): Ped

- - Defined in Game.ts:78

  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

- - Defined in Game.ts:96

  Get whether PvP is enabled.

  #### Returns boolean

  True if enabled.

- - Defined in Game.ts:103

  Set whether PvP is enabled.

  #### Parameters

  - ##### value: boolean

  #### Returns void

  True if enabled.

### Static RadioStation

- get RadioStation(): RadioStation
- set RadioStation(station: RadioStation): void

- - Defined in Game.ts:230

  Gets the player's current radio station.

  #### Returns RadioStation

  A radio station.

- - Defined in Game.ts:240

  Sets the player's radio station.

  #### Parameters

  - ##### station: RadioStation

    A radio station.

  #### Returns void

  A radio station.

### Static ShowPoliceBlipsOnRadar

- set ShowPoliceBlipsOnRadar(toggle: boolean): void

- - Defined in Game.ts:137

  Set whether police blips should show on minimap.

  #### Parameters

  - ##### toggle: boolean

  #### Returns void

### Static ThermalVision

- get ThermalVision(): boolean
- set ThermalVision(toggle: boolean): void

- - Defined in Game.ts:158

  Get if thermal (heat) vision is active.

  #### Returns boolean

- - Defined in Game.ts:165

  Toggle thermal (heat) vision.

  #### Parameters

  - ##### toggle: boolean

  #### Returns void

### Static TimeScale

- set TimeScale(time: number): void

- - Defined in Game.ts:37

  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

- - Defined in Game.ts:130

  Set the multiplier of the wanted level.

  #### Parameters

  - ##### value: number

  #### Returns void

## Methods

### Static disableAllControlsThisFrame

- disableAllControlsThisFrame(inputMode: InputMode): void

- - Defined in Game.ts:368

  Disables all Controls this frame.

  #### Parameters

  - ##### inputMode: InputMode

    InputMode

  #### Returns void

### Static disableControlThisFrame

- disableControlThisFrame(inputMode: InputMode, control: Control): void

- - Defined in Game.ts:359

  Makes the Game Engine ignore the given Control this frame

  #### Parameters

  - ##### inputMode: InputMode

    InputMode

  - ##### control: Control

    Control

  #### Returns void

### Static doesGXTEntryExist

- doesGXTEntryExist(entry: string | number): boolean

- - Defined in Game.ts:434

  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

- - Defined in Game.ts:377

  Enables all Controls this frame.

  #### Parameters

  - ##### inputMode: InputMode

    InputMode

  #### Returns void

### Static enableControlThisFrame

- enableControlThisFrame(inputMode: InputMode, control: Control): void

- - Defined in Game.ts:349

  Makes the Game Engine respond to the given Control this frame

  #### Parameters

  - ##### inputMode: InputMode

    InputMode

  - ##### control: Control

    Control

  #### Returns void

### Static entityFromHandle

- entityFromHandle(handle: number): null | Ped | Vehicle | Prop

- - Defined in Game.ts:387

  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

- - Defined in Game.ts:11

  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

- - Defined in Game.ts:448

  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

- isControlEnabled(inputMode: InputMode, control: Control): boolean

- - Defined in Game.ts:339

  Check whether a control is enabled this frame.

  #### Parameters

  - ##### inputMode: InputMode

    InputMode

  - ##### control: Control

    Control

  #### Returns boolean

  True or False.

### Static isControlJustPressed

- isControlJustPressed(inputMode: InputMode, control: Control): boolean

- - Defined in Game.ts:273

  Check whether a control has been pressed since last check.

  #### Parameters

  - ##### inputMode: InputMode

    InputMode

  - ##### control: Control

    Control

  #### Returns boolean

  True or False.

### Static isControlJustReleased

- isControlJustReleased(inputMode: InputMode, control: Control): boolean

- - Defined in Game.ts:317

  Check whether a control has been released since last check.

  #### Parameters

  - ##### inputMode: InputMode

    InputMode

  - ##### control: Control

    Control

  #### Returns boolean

  True or False.

### Static isControlPressed

- isControlPressed(inputMode: InputMode, control: Control): boolean

- - Defined in Game.ts:251

  Check whether a control is currently pressed.

  #### Parameters

  - ##### inputMode: InputMode

    InputMode

  - ##### control: Control

    Control

  #### Returns boolean

  True or False.

### Static isControlReleased

- isControlReleased(inputMode: InputMode, control: Control): boolean

- - Defined in Game.ts:295

  Check whether a control is being released.

  #### Parameters

  - ##### inputMode: InputMode

    InputMode

  - ##### control: Control

    Control

  #### Returns boolean

  True or False.

### Static isDisabledControlJustPressed

- isDisabledControlJustPressed(inputMode: InputMode, control: Control): boolean

- - Defined in Game.ts:284

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

  #### Parameters

  - ##### inputMode: InputMode

    InputMode

  - ##### control: Control

    Control

  #### Returns boolean

  True or False.

### Static isDisabledControlJustReleased

- isDisabledControlJustReleased(inputMode: InputMode, control: Control): boolean

- - Defined in Game.ts:328

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

  #### Parameters

  - ##### inputMode: InputMode

    InputMode

  - ##### control: Control

    Control

  #### Returns boolean

  True or False.

### Static isDisabledControlPressed

- isDisabledControlPressed(inputMode: InputMode, control: Control): boolean

- - Defined in Game.ts:262

  Check whether a disabled control is currently pressed.

  #### Parameters

  - ##### inputMode: InputMode

    InputMode

  - ##### control: Control

    Control

  #### Returns boolean

  True or False.

### Static isDisabledControlReleased

- isDisabledControlReleased(inputMode: InputMode, control: Control): boolean

- - Defined in Game.ts:306

  Check whether a disabled control is being released.

  #### Parameters

  - ##### inputMode: InputMode

    InputMode

  - ##### control: Control

    Control

  #### Returns boolean

  True or False.

### Static playMusic

- playMusic(musicFile: string): void

- - Defined in Game.ts:414

  Play music. Same as Audio.playSound

  #### Parameters

  - ##### musicFile: string

    Music file.

  #### Returns void

### Static playSound

- playSound(soundFile: string, soundSet: string): void

- - Defined in Game.ts:405

  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(): IterableIterator<Player>

- - Defined in Game.ts:86

  Get an iterable list of players currently on server.

  #### Returns IterableIterator<Player>

  Iterable list of Player objects.

### Static stopMusic

- stopMusic(musicFile?: string): void

- - Defined in Game.ts:423

  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