GetWeaponTarget: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Example made no sense.)
(Added OOP syntax)
Line 2: Line 2:
{{Client function}}
{{Client function}}
{{Needs Example}}
{{Needs Example}}
Get the target of the custom weapon.
This functions gets the target of a [[Element/Weapon|custom weapon]].


==Syntax==
==Syntax==
<syntaxhighlight lang="lua">element getWeaponTarget ( weapon theWeapon )</syntaxhighlight>
<syntaxhighlight lang="lua">element getWeaponTarget ( weapon theWeapon )</syntaxhighlight>
{{OOP|Variable is read only.|[[Element/Weapon|weapon]]:getTarget|target|setWeaponTarget}}


===Required Arguments===
===Required Arguments===
Line 11: Line 12:


===Returns===
===Returns===
Returns the ''target element'' of the custom weapon, ''false'' otherwise.
Returns the ''target element'' of the [[Element/Weapon|custom weapon]], ''false'' otherwise.


==Example==
==Example==
Line 21: Line 22:
{{Requirements|n/a|1.3.0-9.04555|}}
{{Requirements|n/a|1.3.0-9.04555|}}


==See Also==
==See also==
{{Client weapon creation functions}}
{{Client weapon creation functions}}

Revision as of 16:26, 23 December 2014

Accessories-text-editor.png Script Example Missing Function GetWeaponTarget needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.

This functions gets the target of a custom weapon.

Syntax

element getWeaponTarget ( weapon theWeapon )

OOP Syntax Help! I don't understand this!

Note: Variable is read only.
Method: weapon:getTarget(...)
Variable: .target
Counterpart: setWeaponTarget


Required Arguments

  • theWeapon: The weapon to get the target of.

Returns

Returns the target element of the custom weapon, false otherwise.

Example

-- TODO

Requirements

This template will be deleted.

See also