import { Control } from './enums/Control'; import { InputMode } from './enums/InputMode'; import { Language } from './enums/Language'; import { Ped } from './models/Ped'; import { Player } from './models/Player'; import { Prop } from './models/Prop'; import { Vehicle } from './models/Vehicle'; export declare abstract class Game { /** * Calculate the Jenkins One At A Time (joaat) has from the given string. * * @param input The input string to calculate the hash */ static generateHash(input: string): number; /** * Gets the game language */ static readonly Language: Language; /** * Gets how many milliseconds the game has been open this session */ static readonly GameTime: number; /** * Sets the time scale of the Game. * * @param time The time scale, only accepts values between 0.0 and 1.0 */ static TimeScale: number; /** * Gets the total amount of frames rendered in this session */ static readonly FrameCount: number; /** * Gets the current frame rate per second */ static readonly FPS: number; /** * Gets the time it currently takes to render a frame, in seconds; */ static readonly LastFrameTime: number; /** * Get the local player's Player object. */ static readonly Player: Player; /** * Get the local player character's Ped object. * @returns A local player's character. */ static readonly PlayerPed: Ped; /** * Get the max players allowed on the server (Not working since Convar isn't replicated). */ static readonly MaxPlayers: number; /** * Get an iterable list of players currently on server. * @returns Iterable list of Player objects. */ static playerList(): IterableIterator; /** * Get whether PvP is enabled. * @returns True if enabled. */ /** * Set whether PvP is enabled. */ static PlayerVersusPlayer: boolean; /** * Get the maximum wanted level. */ /** * Set the maximum wanted level the local client can get. */ static MaxWantedLevel: number; /** * Set the multiplier of the wanted level. */ static WantedMultiplier: number; /** * Set whether police blips should show on minimap. */ static ShowPoliceBlipsOnRadar: boolean; /** * Get if nightvision is active. */ /** * Toggle nightvision. */ static Nightvision: boolean; /** * Get if thermal (heat) vision is active. */ /** * Toggle thermal (heat) vision. */ static ThermalVision: boolean; static IsMissionActive: boolean; static IsRandomEventActive: boolean; static readonly IsCutsceneActive: boolean; /** * Is a waypoint set on the map. */ static readonly IsWaypointActive: boolean; /** * Is the player in the pause menu (ESC). */ /** * Force enable pause menu. */ static IsPaused: boolean; /** * Get if a loading screen is active. */ static readonly IsLoading: boolean; /** * Get current input mode. * @returns InputMode: Mouse & Keyboard or GamePad. */ static readonly CurrentInputMode: InputMode; /** * Check whether a control is currently pressed. * * @param index input group (usually 0) * @param control Control * @returns True or False. */ static isControlPressed(index: number, control: Control): boolean; /** * Check whether a control has been pressed since last check. * * @param index input group (usually 0) * @param control Control * @returns True or False. */ static isControlJustPressed(index: number, control: Control): boolean; /** * Check whether a disabled control has been pressed since last check. * * @param index input group (usually 0) * @param control Control * @returns True or False. */ static isDisabledControlJustPressed(index: number, control: Control): boolean; /** * Check whether a control is being released. * * @param index input group (usually 0) * @param control Control * @returns True or False. */ static isControlReleased(index: number, control: Control): boolean; /** * Check whether a control has been released since last check. * * @param index input group (usually 0) * @param control Control * @returns True or False. */ static isControlJustReleased(index: number, control: Control): boolean; /** * Get an entity object from an entity handle. * * @param handle Handle of entity * @returns A Ped, Vehicle or Prop object. `undefined` if entity handle doesn't exist. */ static entityFromHandle(handle: number): Ped | Vehicle | Prop | undefined; /** * Play a sound. Same as Audio.playSound * * @param soundFile Name of sound * @param soundSet The set where the sound is in */ static playSound(soundFile: string, soundSet: string): void; /** * Play music. Same as Audio.playSound * * @param musicFile Music file. */ static playMusic(musicFile: string): void; /** * Stop music. If `musicFile` is not given, last played music is stopped. Same as Audio.playSound * * @param musicFile (optional) Music file. */ static stopMusic(musicFile?: string): void; protected static cachedPlayer: Player; }