GetWeaponOwner: Difference between revisions
Jump to navigation
Jump to search
(Added more explanatory text) |
m (→Syntax) |
||
Line 5: | Line 5: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua">bool getWeaponOwner ( weapon theWeapon )</syntaxhighlight> | ||
{{OOP|Pair is completely disabled at the moment (its value is ''[[nil]]'').|[[Element/Weapon|weapon]]:getOwner|owner|setWeaponOwner}} | {{OOP|Pair is completely disabled at the moment (its value is ''[[nil]]'').|[[Element/Weapon|weapon]]:getOwner|owner|setWeaponOwner}} | ||
Revision as of 09:55, 24 December 2014
Script Example Missing Function GetWeaponOwner needs a script example, help out by writing one. | |
Before submitting check out Editing Guidelines Script Examples. |
This function gets the owner of a custom weapon. Weapon ownership system was, however, disabled, so this function always returns false. Please refer to setWeaponOwner for details.
Syntax
bool getWeaponOwner ( weapon theWeapon )
OOP Syntax Help! I don't understand this!
- Note: Pair is completely disabled at the moment (its value is nil).
- Method: weapon:getOwner(...)
- Variable: .owner
- Counterpart: setWeaponOwner
Required Arguments
- theWeapon: The weapon to get the owner of.
Returns
This function was intended to return the player which owns the custom weapon, and false if an error occured. However, at the moment it always returns false.
Example
--TODO
Requirements
This template will be deleted.
See also
- createWeapon
- fireWeapon
- getWeaponAmmo
- getWeaponClipAmmo
- getWeaponFiringRate
- getWeaponFlags
- getWeaponOwner
- getWeaponProperty
- getWeaponState
- getWeaponTarget
- resetWeaponFiringRate
- setWeaponAmmo
- setWeaponClipAmmo
- setWeaponFiringRate
- setWeaponFlags
- setWeaponProperty
- setWeaponState
- setWeaponTarget