ResetWeaponFiringRate: Difference between revisions
Jump to navigation
Jump to search
Cazomino05 (talk | contribs) No edit summary |
m (Added small example) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Client function}} | {{Client function}} | ||
This function resets the firing rate of a [[Element/Weapon|custom weapon]] to the default one. | |||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">bool resetWeaponFiringRate ( weapon theWeapon )</syntaxhighlight> | <syntaxhighlight lang="lua">bool resetWeaponFiringRate ( weapon theWeapon )</syntaxhighlight> | ||
{{OOP||[[Element/Weapon|weapon]]:resetFiringRate}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
Line 11: | Line 12: | ||
===Returns=== | ===Returns=== | ||
Returns ''true'' on success, ''false'' otherwise. | Returns ''true'' on success, ''false'' otherwise. | ||
===Example=== | |||
<syntaxhighlight lang="lua">local weapon = createWeapon ("mp5",0,0,10) | |||
resetWeaponFiringRate (weapon) | |||
</syntaxhighlight> | |||
==Requirements== | ==Requirements== | ||
{{Requirements|1.3.0- | {{Requirements|n/a|1.3.0-9.04555|}} | ||
==See | ==See also== | ||
{{Client weapon creation functions}} | {{Client weapon creation functions}} |
Latest revision as of 14:58, 4 July 2016
This function resets the firing rate of a custom weapon to the default one.
Syntax
bool resetWeaponFiringRate ( weapon theWeapon )
OOP Syntax Help! I don't understand this!
- Method: weapon:resetFiringRate(...)
Required Arguments
- theWeapon: the weapon to reset the firing rate of.
Returns
Returns true on success, false otherwise.
Example
local weapon = createWeapon ("mp5",0,0,10) resetWeaponFiringRate (weapon)
Requirements
Minimum server version | n/a |
---|---|
Minimum client version | 1.3.0-9.04555 |
Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version client="1.3.0-9.04555" />
See also
- createWeapon
- fireWeapon
- getWeaponAmmo
- getWeaponClipAmmo
- getWeaponFiringRate
- getWeaponFlags
- getWeaponOwner
- getWeaponProperty
- getWeaponState
- getWeaponTarget
- resetWeaponFiringRate
- setWeaponAmmo
- setWeaponClipAmmo
- setWeaponFiringRate
- setWeaponFlags
- setWeaponProperty
- setWeaponState
- setWeaponTarget