ResetWeaponFiringRate: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Added OOP syntax and Needs Example template)
m (Added small example)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Client function}}
{{Client function}}
{{Needs_Example}}
This function resets the firing rate of a [[Element/Weapon|custom weapon]] to the default one.
This function resets the firing rate of a [[Element/Weapon|custom weapon]] to the default one.


Line 13: 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==

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

This template will be deleted.

See also