🇭🇰
Sleeping Dogs: DE (Script API)
  • Overview
  • ⛔Const
  • đŸ”ĸEnums
  • đŸ“ĻClasses
    • 🌈Color
    • 💾Config
    • 🚀Console
    • â˜¯ī¸Font
    • đŸ‘ŊHash
    • đŸ–ŧī¸Image
    • âŒ¨ī¸Input
    • đŸ‘ī¸Renderer
    • âŗTimer
    • 2ī¸âƒŖVector2
    • 3ī¸âƒŖVector3
  • đŸ—ƒī¸Game Classes
    • â„šī¸Overview
    • 🔊Audio
    • 📹Camera
    • đŸĢ‚CollisionData
    • 🎮GameInput
    • 🧩GameSlice
    • đŸ“ēHud
    • 📊Metrics
    • 📱PDA
    • 📈ProgressionTracker
    • 💡SimObject
    • 📮SimObjectProp
    • 🧍SimCharacter
    • 🚘SimVehicle
    • đŸ”ĢSimWeapon
    • â˜€ī¸TimeOfDayManager
  • 📩Callbacks
    • OnCollision
    • OnCharacterDeath
    • OnCharacterSpawn
    • OnGameUpdate
    • OnRender
    • OnUnload
    • OnVehicleDeath
Powered by GitBook
On this page
  • Properties:
  • Static Functions:
  • Functions:

Was this helpful?

  1. Game Classes

SimWeapon

General game-weapon, properties & functions are derived from SimObject.

Properties:

Name
Type
Description

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

Argument
Type
Description

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

Argument
Type
Description

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

Argument
Type
Description

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

Argument
Type
Description

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

Argument
Type
Description

character

Valid Character Object

Returns SimWeapon object if there is any equipped weapon on character otherwise null.

.GetStowed

SimWeapon.GetStowed(character: SimCharacter): SimWeapon

Argument
Type
Description

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

Argument
Type
Description

character

Valid Character Object

Returns true if weapon was successfully equipped. Note: Any current equipped weapon will be destroyed!

PreviousSimVehicleNextTimeOfDayManager

Last updated 1 year ago

Was this helpful?

based on

đŸ—ƒī¸
đŸ”Ģ
Metrics.SimTime
More info
More info
SimCharacter
More info
SimCharacter
SimCharacter
SimCharacter