From Multi Theft Auto: Wiki
Jump to navigation
Jump to search
|
|
| Line 1: |
Line 1: |
| __NOTOC__
| |
| {{RU/Server function}}
| |
| {{Translate|ru}}
| |
| This function removes every weapons from a specified player, rendering him unarmed.
| |
|
| |
|
| ''Note: weapons are removed when a player dies by default. This means that it is only appropriate to use this function while a player is alive.''
| |
|
| |
| ==Syntax==
| |
| <syntaxhighlight lang="lua">takeAllWeapons ( player thePlayer )</syntaxhighlight>
| |
|
| |
| ===Required Arguments===
| |
| *'''thePlayer''': A [[player]] object referencing the specified player
| |
|
| |
| ===Returns===
| |
| Returns ''true'' if the function succeeded, ''false'' otherwise.
| |
|
| |
| ==Example==
| |
| This example removes all weapons from every player
| |
| <syntaxhighlight lang="lua">
| |
| takeAllWeapons ( getRootElement() ) --remove all the weapons
| |
| outputChatBox ( "Weapons are not permitted!" ) --tell the players why they lost their weapons</syntaxhighlight>
| |
|
| |
| ==See Also==
| |
| {{RU/Weapon functions}}
| |
| [[en:takeAllWeapons]]
| |
Revision as of 16:18, 31 March 2016