Search Results for

    Show / Hide Table of Contents

    Class WeaponCollection

    Inheritance
    Object
    WeaponCollection
    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 sealed class WeaponCollection

    Properties

    | Improve this Doc View Source

    BestWeapon

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

    Current

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

    CurrentWeaponObject

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

    Item[WeaponHash]

    Declaration
    public Weapon this[WeaponHash hash] { get; }
    Parameters
    Type Name Description
    WeaponHash hash
    Property Value
    Type Description
    Weapon

    Methods

    | Improve this Doc View Source

    Drop()

    Declaration
    public void Drop()
    | Improve this Doc View Source

    Give(WeaponHash, Int32, Boolean, Boolean)

    Gives the speficied weapon if the owner Ped does not have one, or selects the weapon if they have one and equipNow is set to true.

    Declaration
    public Weapon Give(WeaponHash weaponHash, int ammoCount, bool equipNow, bool isAmmoLoaded)
    Parameters
    Type Name Description
    WeaponHash weaponHash

    The weapon hash.

    Int32 ammoCount

    The ammo count to be added to the weapon inventory of the owner Ped.

    Boolean equipNow

    If set to true, the owner Ped will switch their weapon to the weapon of weaponHash as soon as they can (not instantly).

    Boolean isAmmoLoaded

    Does not work since the ammo in clip is always full if not selected unless the game code related to auto-reload is modified. This was supposed to determine if the ammo will be loaded after the weapon is given to the owner Ped.

    Returns
    Type Description
    Weapon
    | Improve this Doc View Source

    Give(String, Int32, Boolean, Boolean)

    Declaration
    public Weapon Give(string name, int ammoCount, bool equipNow, bool isAmmoLoaded)
    Parameters
    Type Name Description
    String name
    Int32 ammoCount
    Boolean equipNow
    Boolean isAmmoLoaded
    Returns
    Type Description
    Weapon
    | Improve this Doc View Source

    HasWeapon(WeaponHash)

    Declaration
    public bool HasWeapon(WeaponHash weaponHash)
    Parameters
    Type Name Description
    WeaponHash weaponHash
    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    IsWeaponValid(WeaponHash)

    Declaration
    public bool IsWeaponValid(WeaponHash hash)
    Parameters
    Type Name Description
    WeaponHash hash
    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    Remove(Weapon)

    Declaration
    public void Remove(Weapon weapon)
    Parameters
    Type Name Description
    Weapon weapon
    | Improve this Doc View Source

    Remove(WeaponHash)

    Declaration
    public void Remove(WeaponHash weaponHash)
    Parameters
    Type Name Description
    WeaponHash weaponHash
    | Improve this Doc View Source

    RemoveAll()

    Declaration
    public void RemoveAll()
    | Improve this Doc View Source

    Select(Weapon)

    Declaration
    public bool Select(Weapon weapon)
    Parameters
    Type Name Description
    Weapon weapon
    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    Select(WeaponHash)

    Declaration
    public bool Select(WeaponHash weaponHash)
    Parameters
    Type Name Description
    WeaponHash weaponHash
    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    Select(WeaponHash, Boolean)

    Declaration
    public bool Select(WeaponHash weaponHash, bool equipNow)
    Parameters
    Type Name Description
    WeaponHash weaponHash
    Boolean equipNow
    Returns
    Type Description
    Boolean
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX