TakeAllWeapons: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
==Description==
This function removes every weapons from a specified player, rendering him unarmed.
This function removes every weapons from a specified player, rendering him unarmed. It returns a boolean value (true or false) depending on whether the function passed or failed.


==Syntax==
==Syntax==
<syntaxhighlight lang="lua">TakeAllWeapons ( player )</syntaxhighlight>
<syntaxhighlight lang="lua">TakeAllWeapons ( thePlayer )</syntaxhighlight>


===Required Arguments===
===Required Arguments===
*'''player''': A [[player]] object referencing the specified player
*'''thePlayer''': A [[player]] object referencing the specified player
 
===Returns===
Returns ''true'' if the function succeeded, ''false'' otherwise.


==Example==
==Example==

Revision as of 11:27, 14 August 2006

This function removes every weapons from a specified player, rendering him unarmed.

Syntax

TakeAllWeapons ( thePlayer )

Required Arguments

  • thePlayer: A player object referencing the specified player

Returns

Returns true if the function succeeded, false otherwise.

Example

player = getPlayerFromID ( 1 )
TakeAllWeapons ( player ) 
outputChatBox ( "All weapons removed from ", getPlayerName ( player ), "." )

See Also