SHVDN  v3
An ASI plugin for Grand Theft Auto V, which allows running scripts written in any .NET language in-game. Developed by crosire https://github.com/crosire/scripthookvdotnet/
GTA.WeaponAsset Struct Reference
Inheritance diagram for GTA.WeaponAsset:
GTA.Native.INativeValue

Public Member Functions

 WeaponAsset (int hash)
 
 WeaponAsset (uint hash)
 
 WeaponAsset (WeaponHash hash)
 
void Request ()
 Attempts to load this WeaponAsset into memory. More...
 
bool Request (int timeout)
 Attempts to load this WeaponAsset into memory for a given period of time. More...
 
void MarkAsNoLongerNeeded ()
 Tells the game we have finished using this WeaponAsset and it can be freed from memory. More...
 
bool Equals (WeaponAsset weaponAsset)
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
override string ToString ()
 

Static Public Member Functions

static bool operator== (WeaponAsset left, WeaponAsset right)
 
static bool operator!= (WeaponAsset left, WeaponAsset right)
 
static implicit operator WeaponAsset (int hash)
 
static implicit operator WeaponAsset (uint hash)
 
static implicit operator WeaponAsset (WeaponHash hash)
 
static implicit operator InputArgument (WeaponAsset value)
 

Public Attributes

bool IsValid => Function.Call<bool>(Native.Hash.IS_WEAPON_VALID, Hash)
 Gets if this WeaponAsset is valid. More...
 
bool IsLoaded => Function.Call<bool>(Native.Hash.HAS_WEAPON_ASSET_LOADED, Hash)
 Gets a value indicating whether this WeaponAsset is loaded so it can be spawned. More...
 
string DisplayName => Weapon.GetDisplayNameFromHash((WeaponHash)Hash)
 
string LocalizedName => Game.GetLocalizedString(Weapon.GetDisplayNameFromHash((WeaponHash)Hash))
 

Properties

int Hash [get]
 Gets the hash for this WeaponAsset. More...
 
ulong NativeValue [get, set]
 Gets the native representation of this WeaponAsset. More...
 
- Properties inherited from GTA.Native.INativeValue
ulong NativeValue [get, set]
 

Constructor & Destructor Documentation

◆ WeaponAsset() [1/3]

GTA.WeaponAsset.WeaponAsset ( int  hash)

◆ WeaponAsset() [2/3]

GTA.WeaponAsset.WeaponAsset ( uint  hash)

◆ WeaponAsset() [3/3]

GTA.WeaponAsset.WeaponAsset ( WeaponHash  hash)

Member Function Documentation

◆ Equals() [1/2]

override bool GTA.WeaponAsset.Equals ( object  obj)

◆ Equals() [2/2]

bool GTA.WeaponAsset.Equals ( WeaponAsset  weaponAsset)

◆ GetHashCode()

override int GTA.WeaponAsset.GetHashCode ( )

◆ MarkAsNoLongerNeeded()

void GTA.WeaponAsset.MarkAsNoLongerNeeded ( )

Tells the game we have finished using this WeaponAsset and it can be freed from memory.

◆ operator InputArgument()

static implicit GTA.WeaponAsset.operator InputArgument ( WeaponAsset  value)
static

◆ operator WeaponAsset() [1/3]

static implicit GTA.WeaponAsset.operator WeaponAsset ( int  hash)
static

◆ operator WeaponAsset() [2/3]

static implicit GTA.WeaponAsset.operator WeaponAsset ( uint  hash)
static

◆ operator WeaponAsset() [3/3]

static implicit GTA.WeaponAsset.operator WeaponAsset ( WeaponHash  hash)
static

◆ operator!=()

static bool GTA.WeaponAsset.operator!= ( WeaponAsset  left,
WeaponAsset  right 
)
static

◆ operator==()

static bool GTA.WeaponAsset.operator== ( WeaponAsset  left,
WeaponAsset  right 
)
static

◆ Request() [1/2]

void GTA.WeaponAsset.Request ( )

Attempts to load this WeaponAsset into memory.

◆ Request() [2/2]

bool GTA.WeaponAsset.Request ( int  timeout)

Attempts to load this WeaponAsset into memory for a given period of time.

Parameters
timeoutThe time (in milliseconds) before giving up trying to load this WeaponAsset.
Returns
true if this WeaponAsset is loaded; otherwise, false.

◆ ToString()

override string GTA.WeaponAsset.ToString ( )

Member Data Documentation

◆ DisplayName

string GTA.WeaponAsset.DisplayName => Weapon.GetDisplayNameFromHash((WeaponHash)Hash)

◆ IsLoaded

bool GTA.WeaponAsset.IsLoaded => Function.Call<bool>(Native.Hash.HAS_WEAPON_ASSET_LOADED, Hash)

Gets a value indicating whether this WeaponAsset is loaded so it can be spawned.

◆ IsValid

bool GTA.WeaponAsset.IsValid => Function.Call<bool>(Native.Hash.IS_WEAPON_VALID, Hash)

Gets if this WeaponAsset is valid.

◆ LocalizedName

string GTA.WeaponAsset.LocalizedName => Game.GetLocalizedString(Weapon.GetDisplayNameFromHash((WeaponHash)Hash))

Property Documentation

◆ Hash

int GTA.WeaponAsset.Hash
get

Gets the hash for this WeaponAsset.

◆ NativeValue

ulong GTA.WeaponAsset.NativeValue
getset

Gets the native representation of this WeaponAsset.


The documentation for this struct was generated from the following file: