Search Results for

    Show / Hide Table of Contents

    Struct GlobalVariable

    A value class which handles access to global script variables.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: GTA.Native
    Assembly: ScriptHookVDotNet3.dll
    Syntax
    public struct GlobalVariable

    Properties

    | Improve this Doc View Source

    MemoryAddress

    Gets the native memory address of the GlobalVariable.

    Declaration
    public readonly IntPtr MemoryAddress { get; }
    Property Value
    Type Description
    IntPtr

    Methods

    | Improve this Doc View Source

    ClearBit(Int32)

    Set the value of a specific bit of the GlobalVariable to false.

    Declaration
    public void ClearBit(int index)
    Parameters
    Type Name Description
    Int32 index

    The zero indexed bit of the GlobalVariable to clear.

    | Improve this Doc View Source

    Get(Int32)

    Gets the global variable at the specified index.

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

    The index of the global variable.

    Returns
    Type Description
    GlobalVariable

    A GlobalVariable instance representing the global variable.

    | Improve this Doc View Source

    GetArray(Int32)

    Returns an array of all GlobalVariables in a global array.

    Declaration
    public GlobalVariable[] GetArray(int itemSize)
    Parameters
    Type Name Description
    Int32 itemSize

    The number of items stored in each array index. For example an array of Vector3s takes up 3 items.

    Returns
    Type Description
    GlobalVariable[]

    The array of GlobalVariables.

    | Improve this Doc View Source

    GetArrayItem(Int32, Int32)

    Gets the GlobalVariable stored at a specific index in a global array.

    Declaration
    public GlobalVariable GetArrayItem(int index, int itemSize)
    Parameters
    Type Name Description
    Int32 index

    The array index.

    Int32 itemSize

    The number of items stored in each array index. For example an array of Vector3s takes up 3 items.

    Returns
    Type Description
    GlobalVariable

    The GlobalVariable at the index given.

    | Improve this Doc View Source

    GetStructField(Int32)

    Gets the GlobalVariable stored at a given offset in a global structure.

    Declaration
    public GlobalVariable GetStructField(int index)
    Parameters
    Type Name Description
    Int32 index

    The index the GlobalVariable is stored in the structure. For example the Y component of a Vector3 is at index 1.

    Returns
    Type Description
    GlobalVariable

    The GlobalVariable at the index given.

    | Improve this Doc View Source

    IsBitSet(Int32)

    Gets a value indicating whether a specific bit of the GlobalVariable is set.

    Declaration
    public bool IsBitSet(int index)
    Parameters
    Type Name Description
    Int32 index

    The zero indexed bit of the GlobalVariable to check.

    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    Read<T>()

    Gets the value stored in the GlobalVariable.

    Declaration
    public T Read<T>()
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    SetBit(Int32)

    Set the value of a specific bit of the GlobalVariable to true.

    Declaration
    public void SetBit(int index)
    Parameters
    Type Name Description
    Int32 index

    The zero indexed bit of the GlobalVariable to set.

    | Improve this Doc View Source

    Write<T>(T)

    Set the value stored in the GlobalVariable.

    Declaration
    public void Write<T>(T value)
    Parameters
    Type Name Description
    T value

    The new value to assign to the GlobalVariable.

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    WriteString(String, Int32)

    Set the value stored in the GlobalVariable to a string.

    Declaration
    public void WriteString(string value, int maxSize)
    Parameters
    Type Name Description
    String value

    The string to set the GlobalVariable to.

    Int32 maxSize

    The maximum size of the string. Can be found for a given global variable by checking the decompiled scripts from the game.

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