TakeAllWeapons: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 16: | Line 16: | ||
This example removes all weapons from every player | This example removes all weapons from every player | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
takeAllWeapons ( | takeAllWeapons ( root ) --remove all the weapons | ||
outputChatBox ( "Weapons are not permitted!" ) --tell the players why they lost their weapons</syntaxhighlight> | outputChatBox ( "Weapons are not permitted!" ) --tell the players why they lost their weapons</syntaxhighlight> | ||
Revision as of 07:09, 4 November 2020
This function removes every weapons from a specified ped, rendering it unarmed.
Syntax
bool takeAllWeapons ( ped thePed )
Required Arguments
- thePed: A ped element referencing the specified ped
Returns
Returns true if the function succeeded, false otherwise.
Example
This example removes all weapons from every player
takeAllWeapons ( root ) --remove all the weapons outputChatBox ( "Weapons are not permitted!" ) --tell the players why they lost their weapons