Search Results for

    Show / Hide Table of Contents

    Class Game

    Inheritance
    Object
    Game
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: GTA
    Assembly: ScriptHookVDotNet3.dll
    Syntax
    public static class Game

    Properties

    | Improve this Doc View Source

    FPS

    Gets the current frame rate in frames per second.

    Declaration
    public static float FPS { get; }
    Property Value
    Type Description
    Single
    | Improve this Doc View Source

    FrameCount

    Gets the total number of frames that have been rendered in this session.

    Declaration
    public static int FrameCount { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    GameTime

    Gets how many milliseconds the game has been open in this session

    Declaration
    public static int GameTime { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    IsCutsceneActive

    Gets a value indicating whether the cutscene is active.

    Declaration
    public static bool IsCutsceneActive { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsLoading

    Gets a value indicating whether there is a loading screen being displayed.

    Declaration
    public static bool IsLoading { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsMissionActive

    Gets or sets a value informing the engine if a mission is in progress.

    Declaration
    public static bool IsMissionActive { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsNightVisionActive

    Gets or sets a value indicating whether to render the world with a night vision filter.

    Declaration
    public static bool IsNightVisionActive { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsPaused

    Gets or sets a value indicating whether the pause menu is active.

    Declaration
    public static bool IsPaused { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsRandomEventActive

    Gets or sets a value informing the engine if a random event is in progress.

    Declaration
    public static bool IsRandomEventActive { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsThermalVisionActive

    Gets or sets a value indicating whether to render the world with a thermal vision filter.

    Declaration
    public static bool IsThermalVisionActive { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsVibrationEnabled

    Gets a value indicating whether the controller vibration is enabled.

    Declaration
    public static bool IsVibrationEnabled { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsWaypointActive

    Gets a value indicating whether there is a waypoint set on the map.

    Declaration
    public static bool IsWaypointActive { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    Language

    Gets the current game language.

    Declaration
    public static Language Language { get; }
    Property Value
    Type Description
    Language
    | Improve this Doc View Source

    LastFrameTime

    Gets the time in seconds it took for the last frame to render.

    Declaration
    public static float LastFrameTime { get; }
    Property Value
    Type Description
    Single
    | Improve this Doc View Source

    LastInputMethod

    Gets whether the last input was made with a GamePad or keyboard and mouse.

    Declaration
    public static InputMethod LastInputMethod { get; }
    Property Value
    Type Description
    InputMethod
    | Improve this Doc View Source

    MaxWantedLevel

    Gets or sets the maximum wanted level a Player can receive.

    Declaration
    public static int MaxWantedLevel { get; set; }
    Property Value
    Type Description
    Int32

    The maximum wanted level, only accepts values 0 to 5.

    | Improve this Doc View Source

    MeasurementSystem

    Gets the measurement system the game uses to display.

    Declaration
    public static MeasurementSystem MeasurementSystem { get; }
    Property Value
    Type Description
    MeasurementSystem
    | Improve this Doc View Source

    NorthBlip

    Gets the north blip, which is shown on the radar.

    Declaration
    public static Blip NorthBlip { get; }
    Property Value
    Type Description
    Blip
    | Improve this Doc View Source

    Player

    Gets the Player that you are controlling.

    Declaration
    public static Player Player { get; }
    Property Value
    Type Description
    Player
    | Improve this Doc View Source

    PlayerBlip

    Gets the blip of the Player that you are controlling.

    Declaration
    public static Blip PlayerBlip { get; }
    Property Value
    Type Description
    Blip
    | Improve this Doc View Source

    PlayerTargetingMode

    Gets the current targeting mode of the local player.

    Declaration
    public static PlayerTargetingMode PlayerTargetingMode { get; }
    Property Value
    Type Description
    PlayerTargetingMode
    | Improve this Doc View Source

    RadioStation

    Gets or sets the current radio station.

    Declaration
    public static RadioStation RadioStation { get; set; }
    Property Value
    Type Description
    RadioStation
    | Improve this Doc View Source

    TimeScale

    Gets or Sets the time scale of the game.

    Declaration
    public static float TimeScale { get; set; }
    Property Value
    Type Description
    Single

    The time scale, only accepts values in range 0.0f to 1.0f.

    | Improve this Doc View Source

    Version

    Gets the version of the game.

    Declaration
    public static GameVersion Version { get; }
    Property Value
    Type Description
    GameVersion

    Methods

    | Improve this Doc View Source

    DisableAllControlsThisFrame()

    Disables all Controls this frame.

    Declaration
    public static void DisableAllControlsThisFrame()
    | Improve this Doc View Source

    DisableControlThisFrame(Control)

    Makes the engine ignore input from the given Control this frame.

    Declaration
    public static void DisableControlThisFrame(Control control)
    Parameters
    Type Name Description
    Control control

    The Control.

    | Improve this Doc View Source

    DoAutoSave()

    Performs an automatic game save.

    Declaration
    public static void DoAutoSave()
    | Improve this Doc View Source

    EnableAllControlsThisFrame()

    Enables all Controls this frame.

    Declaration
    public static void EnableAllControlsThisFrame()
    | Improve this Doc View Source

    EnableControlThisFrame(Control)

    Makes the engine respond to the given Control this frame.

    Declaration
    public static void EnableControlThisFrame(Control control)
    Parameters
    Type Name Description
    Control control

    The Control to enable..

    | Improve this Doc View Source

    FindPattern(String, IntPtr)

    Searches the address space of the current process for a memory pattern.

    Declaration
    public static IntPtr FindPattern(string pattern, IntPtr startAddress = default(IntPtr))
    Parameters
    Type Name Description
    String pattern

    The pattern.

    IntPtr startAddress

    The address to start searching at. If Zero (langword_csharp_default), search is started at the base address.

    Returns
    Type Description
    IntPtr

    The address of a region matching the pattern, or Zero if none was found.

    Remarks

    This function takes the Cheat Engine/IDA format ("48 8B 0D ?? ?? ? ? 44 8B C6 8B D5 8B D8" for example, where ?? and ? are wildcards).

    | Improve this Doc View Source

    FindPattern(String, String, IntPtr)

    Searches the address space of the current process for a memory pattern.

    Declaration
    public static IntPtr FindPattern(string pattern, string mask, IntPtr startAddress = default(IntPtr))
    Parameters
    Type Name Description
    String pattern

    The pattern.

    String mask

    The pattern mask.

    IntPtr startAddress

    The address to start searching at. If Zero (langword_csharp_default), search is started at the base address.

    Returns
    Type Description
    IntPtr

    The address of a region matching the pattern, or Zero if none was found.

    Remarks

    This function takes the classic format ("\x48\x8B\x0D\x00\x00\x00\x00\x44\x8B\xC6\x8B\xD5\x8B\xD8" as the pattern and "xxx????xxxxxxx" as the mask for example, where \x00 in the pattern and ? In the mask is a wildcard).

    | Improve this Doc View Source

    GenerateHash(String)

    Calculates a Jenkins One At A Time hash from the given String which can then be used by any native function that takes a hash. Can be called in any thread.

    Declaration
    public static int GenerateHash(string input)
    Parameters
    Type Name Description
    String input

    The input String to hash.

    Returns
    Type Description
    Int32

    The Jenkins hash of the input String.

    | Improve this Doc View Source

    GetControlValue(Control)

    Gets an analog value of a Control input.

    Declaration
    public static int GetControlValue(Control control)
    Parameters
    Type Name Description
    Control control

    The Control to check.

    Returns
    Type Description
    Int32

    The Control value.

    | Improve this Doc View Source

    GetControlValueNormalized(Control)

    Gets an analog value of a Control input between -1.0f and 1.0f.

    Declaration
    public static float GetControlValueNormalized(Control control)
    Parameters
    Type Name Description
    Control control

    The Control to check.

    Returns
    Type Description
    Single

    The normalized Control value.

    | Improve this Doc View Source

    GetDisabledControlValueNormalized(Control)

    Gets an analog value of a disabled Control input between -1.0f and 1.0f.

    Declaration
    public static float GetDisabledControlValueNormalized(Control control)
    Parameters
    Type Name Description
    Control control

    The Control to check.

    Returns
    Type Description
    Single

    The normalized Control value.

    | Improve this Doc View Source

    GetLocalizedString(Int32)

    Returns a localized String from the games language files with a specified GXT key hash.

    Declaration
    public static string GetLocalizedString(int entryLabelHash)
    Parameters
    Type Name Description
    Int32 entryLabelHash

    The GXT key hash.

    Returns
    Type Description
    String

    The localized String if the key hash exists; otherwise, Empty

    | Improve this Doc View Source

    GetLocalizedString(String)

    Returns a localized String from the games language files with a specified GXT key.

    Declaration
    public static string GetLocalizedString(string entry)
    Parameters
    Type Name Description
    String entry

    The GXT key.

    Returns
    Type Description
    String

    The localized String if the key exists; otherwise, Empty

    | Improve this Doc View Source

    GetProfileSetting(Int32)

    Gets an value associated with the specified index of the profile setting.

    Declaration
    public static int GetProfileSetting(int index)
    Parameters
    Type Name Description
    Int32 index

    The index of the profile setting values.

    Returns
    Type Description
    Int32

    The integer value associated with the specified index of the profile setting.

    | Improve this Doc View Source

    GetUserInput(WindowTitle, String, Int32)

    Creates an input box for the user to input text using the keyboard.

    Declaration
    public static string GetUserInput(WindowTitle windowTitle, string defaultText, int maxLength)
    Parameters
    Type Name Description
    WindowTitle windowTitle

    The title of the input box window.

    String defaultText

    The default text.

    Int32 maxLength

    The maximum length of text input allowed.

    Returns
    Type Description
    String

    The String of what the user entered or Empty if the user canceled.

    | Improve this Doc View Source

    GetUserInput(String)

    Creates an input box for the user to input text using the keyboard.

    Declaration
    public static string GetUserInput(string defaultText = "")
    Parameters
    Type Name Description
    String defaultText

    The default text.

    Returns
    Type Description
    String

    The String of what the user entered or Empty if the user canceled.

    | Improve this Doc View Source

    IsControlEnabled(Control)

    Gets whether a Control is enabled or disabled this frame.

    Declaration
    public static bool IsControlEnabled(Control control)
    Parameters
    Type Name Description
    Control control

    The Control to check.

    Returns
    Type Description
    Boolean

    true if the Control is Enabled; otherwise, false

    | Improve this Doc View Source

    IsControlJustPressed(Control)

    Gets whether a Control was just pressed this frame

    Declaration
    public static bool IsControlJustPressed(Control control)
    Parameters
    Type Name Description
    Control control

    The Control to check.

    Returns
    Type Description
    Boolean

    true if the Control was just pressed this frame; otherwise, false

    | Improve this Doc View Source

    IsControlJustReleased(Control)

    Gets whether a Control was just released this frame

    Declaration
    public static bool IsControlJustReleased(Control control)
    Parameters
    Type Name Description
    Control control

    The Control to check.

    Returns
    Type Description
    Boolean

    true if the Control was just released this frame; otherwise, false

    | Improve this Doc View Source

    IsControlPressed(Control)

    Gets whether a Control is currently pressed.

    Declaration
    public static bool IsControlPressed(Control control)
    Parameters
    Type Name Description
    Control control

    The Control to check.

    Returns
    Type Description
    Boolean

    true if the Control is pressed; otherwise, false

    | Improve this Doc View Source

    IsEnabledControlJustPressed(Control)

    Gets whether a Control is enabled and was just pressed this frame.

    Declaration
    public static bool IsEnabledControlJustPressed(Control control)
    Parameters
    Type Name Description
    Control control

    The Control to check.

    Returns
    Type Description
    Boolean

    true if the Control was just pressed this frame; otherwise, false

    | Improve this Doc View Source

    IsEnabledControlJustReleased(Control)

    Gets whether a Control is enabled and was just released this frame.

    Declaration
    public static bool IsEnabledControlJustReleased(Control control)
    Parameters
    Type Name Description
    Control control

    The Control to check.

    Returns
    Type Description
    Boolean

    true if the Control was just released this frame; otherwise, false

    | Improve this Doc View Source

    IsEnabledControlPressed(Control)

    Gets whether a Control is enabled and currently pressed.

    Declaration
    public static bool IsEnabledControlPressed(Control control)
    Parameters
    Type Name Description
    Control control

    The Control to check.

    Returns
    Type Description
    Boolean

    true if the Control is pressed; otherwise, false

    | Improve this Doc View Source

    IsKeyPressed(Keys)

    Gets whether the specified key is currently held down.

    Declaration
    public static bool IsKeyPressed(Keys key)
    Parameters
    Type Name Description
    Keys key

    The key to check.

    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    Pause(Boolean)

    Pause/resume the game.

    Declaration
    public static void Pause(bool value)
    Parameters
    Type Name Description
    Boolean value

    True/false for pause/resume.

    | Improve this Doc View Source

    SetControlValueNormalized(Control, Single)

    Override a Control by giving it a user-defined value this frame.

    Declaration
    public static void SetControlValueNormalized(Control control, float value)
    Parameters
    Type Name Description
    Control control

    The Control to check.

    Single value

    the value to set the control to.

    | Improve this Doc View Source

    ShowSaveMenu()

    Shows the save menu enabling the user to perform a manual game save.

    Declaration
    public static void ShowSaveMenu()
    | Improve this Doc View Source

    WasButtonCombinationJustEntered(Button[])

    Gets whether a specific sequence of Buttons has been pressed.

    Declaration
    public static bool WasButtonCombinationJustEntered(params Button[] buttons)
    Parameters
    Type Name Description
    Button[] buttons

    The sequence of Buttons in the order the user should enter them in-game.

    Returns
    Type Description
    Boolean

    true if the combination was just entered; otherwise, false

    Remarks

    There must be between 6 and 29 inclusive Buttons otherwise an ArgumentException is thrown. It only works for GamePad inputs. The in-game cheat combinations use the same system.

    | Improve this Doc View Source

    WasCheatStringJustEntered(String)

    Gets whether a cheat code was entered into the cheat text box.

    Declaration
    public static bool WasCheatStringJustEntered(string cheat)
    Parameters
    Type Name Description
    String cheat

    The name of the cheat to check.

    Returns
    Type Description
    Boolean

    true if the cheat was just entered; otherwise, false

    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX