Struct WeaponSlotData
Represents data for a weapon slot, including the weapon ID and the amount of ammunition.
public readonly struct WeaponSlotData
- Inherited Members
Constructors
WeaponSlotData(byte, int)
Initializes a new instance of the WeaponSlotData struct.
public WeaponSlotData(byte id, int ammo)
Parameters
Fields
Ammo
Gets the amount of ammunition for the weapon in the slot.
public readonly int Ammo
Field Value
Id
Gets the ID of the weapon in the slot.
public readonly byte Id
Field Value
Properties
Info
The static WeaponInfo entry for this weapon ID.
Returns a sentinel (None, slot -1) for invalid IDs.
public WeaponInfo Info { get; }
Property Value
Shootable
True if this weapon shoots bullets (and so consumes ammo, can be reloaded, etc.).
Mirrors WeaponSlotData::shootable in the open.mp SDK.
public bool Shootable { get; }
Property Value
Slot
The slot this weapon occupies (0-12), or -1 if the weapon ID
doesn't map to a real weapon. Mirrors WeaponSlotData::slot in the open.mp SDK.
public int Slot { get; }