SimWeapon
General game-weapon, properties & functions are derived from SimObject.
Properties:
ClipAmmo
integer
Current loaded ammo
TotalAmmo
integer
Current total ammo
LastFiredTime
float (Read Only)
RateOfFireOverride
float
-1.0 - disabled
Static Functions:
.Create
SimWeapon.Create(model: Hash, coords: Vector3, rotation: Vector3)
: SimWeapon
model
Hash
coords
Vector3
Position of new Weapon
rotation
Vector3
Rotation of new Weapon
Returns SimWeapon object when successfully created.
.CreateAndEquip
SimWeapon.CreateAndEquip(character: SimCharacter, model: Hash)
: SimWeapon
character
SimCharacter
Valid Character Object
model
Hash
Returns SimWeapon object when successfully created and equipped. Note: Any current equipped weapon will be destroyed!
.CreateAndEquipStowed
SimWeapon.CreateAndEquipStowed(character: SimCharacter, model: Hash)
: SimWeapon
character
Valid Character Object
model
Hash
Returns SimWeapon object when successfully created and equipped. Note: Any current stowed weapon will be destroyed!
.Get
SimWeapon.Get(object: SimObject)
: SimWeapon
object
SimObject
Valid SimObject
This will cast SimObject to SimWeapon use this only if you know what you're doing!
.GetEquipped
SimWeapon.GetEquipped(character: SimCharacter)
: SimWeapon
character
Valid Character Object
Returns SimWeapon object if there is any equipped weapon on character otherwise null.
.GetStowed
SimWeapon.GetStowed(character: SimCharacter)
: SimWeapon
character
Valid Character Object
Returns SimWeapon object if there is any stowed weapon on character otherwise null.
Functions:
.IsStowable
SimWeapon.IsStowable()
: boolean
Returns true if weapon can be stowed.
.Equip
SimWeapon.Equip(character: SimCharacter)
: boolean
character
Valid Character Object
Returns true if weapon was successfully equipped. Note: Any current equipped weapon will be destroyed!
Last updated