Class WeaponCollection
Inheritance
WeaponCollection
Namespace: GTA
Assembly: ScriptHookVDotNet3.dll
Syntax
public sealed class WeaponCollection
Properties
|
Improve this Doc
View Source
BestWeapon
Declaration
public Weapon BestWeapon { get; }
Property Value
|
Improve this Doc
View Source
Current
Declaration
public Weapon Current { get; }
Property Value
|
Improve this Doc
View Source
CurrentWeaponObject
Declaration
public Prop CurrentWeaponObject { get; }
Property Value
|
Improve this Doc
View Source
Item[WeaponHash]
Declaration
public Weapon this[WeaponHash hash] { get; }
Parameters
Property Value
Methods
|
Improve this Doc
View Source
Drop()
Declaration
|
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
|
Improve this Doc
View Source
Give(String, Int32, Boolean, Boolean)
Declaration
public Weapon Give(string name, int ammoCount, bool equipNow, bool isAmmoLoaded)
Parameters
Returns
|
Improve this Doc
View Source
HasWeapon(WeaponHash)
Declaration
public bool HasWeapon(WeaponHash weaponHash)
Parameters
Returns
|
Improve this Doc
View Source
IsWeaponValid(WeaponHash)
Declaration
public bool IsWeaponValid(WeaponHash hash)
Parameters
Returns
|
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
|
Improve this Doc
View Source
RemoveAll()
Declaration
|
Improve this Doc
View Source
Select(Weapon)
Declaration
public bool Select(Weapon weapon)
Parameters
Type |
Name |
Description |
Weapon |
weapon |
|
Returns
|
Improve this Doc
View Source
Select(WeaponHash)
Declaration
public bool Select(WeaponHash weaponHash)
Parameters
Returns
|
Improve this Doc
View Source
Select(WeaponHash, Boolean)
Declaration
public bool Select(WeaponHash weaponHash, bool equipNow)
Parameters
Returns