TakeWeapon: Difference between revisions
Jump to navigation
Jump to search
JonChappell (talk | contribs) No edit summary |
mNo edit summary |
||
Line 7: | Line 7: | ||
===Required Arguments=== | ===Required Arguments=== | ||
*''' | *'''player''': A [[player]] object referencing the specified player. | ||
*'''weaponid''': An integer (whole number) that refers to the weapon you wish to remove. | *'''weaponid''': An integer (whole number) that refers to the weapon you wish to remove. | ||
==Example== | ==Example== | ||
player = [[getPlayerFromID]] ( 1 ) | player = [[getPlayerFromID]] ( 1 ) | ||
if ( [[TakeWeapon]] ( player, 1 ) ) | |||
[[serverChat]] ( "Weapon 1 removed from ", [[getPlayerName]] ( player ), "." ) |
Revision as of 07:05, 28 March 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 player, int weaponid )
Required Arguments
- player: A player object referencing the specified player.
- weaponid: An integer (whole number) that refers to the weapon you wish to remove.
Example
player = getPlayerFromID ( 1 ) if ( TakeWeapon ( player, 1 ) ) serverChat ( "Weapon 1 removed from ", getPlayerName ( player ), "." )