๐ซSimWeapon
General game-weapon, properties & functions are derived from SimObject.
Static Functions:
SimWeapon.Create(model: Hash, coords: Vector3, rotation: Vector3): SimWeapon
Returns SimWeapon object when successfully created.
.CreateAndEquip
SimWeapon.CreateAndEquip(character: SimCharacter, model: Hash): SimWeapon
Returns SimWeapon object when successfully created and equipped. Note: Any current equipped weapon will be destroyed!
.CreateAndEquipStowed
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!