TakeWeapon: Difference between revisions
Jump to navigation
Jump to search
(→Syntax) |
(→Syntax) |
||
Line 4: | Line 4: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">bool TakeWeapon ( | <syntaxhighlight lang="lua">bool TakeWeapon ( player, weaponid )</syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== |
Revision as of 02:34, 18 May 2006
Description
This function removes a specified weapon from a certain player's inventory. It returns a boolean value (true or false) depending on whether the function passed or failed.
Syntax
bool TakeWeapon ( player, weaponid )
Required Arguments
- player: A player object referencing the specified player.
- weaponid: An integer (whole number) that refers to the Weapon IDs|weapon ID you wish to remove.
Example
player = getPlayerFromID ( 1 ) if ( TakeWeapon ( player, 1 ) ) serverChat ( "Weapon 1 removed from ", getPlayerName ( player ), "." ) end