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