TakeAllWeapons: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 15: | Line 15: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
takeAllWeapons ( | thePlayer = getPlayerFromID ( 1 ) | ||
outputChatBox ( "All weapons removed from " .. getClientName ( | takeAllWeapons ( thePlayer ) | ||
outputChatBox ( "All weapons removed from " .. getClientName ( thePlayer ) .. "." )</syntaxhighlight> | |||
==See Also== | ==See Also== | ||
{{Weapon functions}} | {{Weapon functions}} |
Revision as of 18:54, 15 August 2007
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 you want to take them away when the player is alive.
Syntax
takeAllWeapons ( thePlayer )
Required Arguments
- thePlayer: A player object referencing the specified player
Returns
Returns true if the function succeeded, false otherwise.
Example
thePlayer = getPlayerFromID ( 1 ) takeAllWeapons ( thePlayer ) outputChatBox ( "All weapons removed from " .. getClientName ( thePlayer ) .. "." )
See Also
- getWeaponProperty
- getPickupWeapon
- getOriginalWeaponProperty
- getSlotFromWeapon
- getWeaponIDFromName
- getWeaponNameFromID
- setWeaponAmmo
- setWeaponProperty