TakeAllWeapons: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 10: Line 10:


==Example==
==Example==
player = [[getPlayerFromID]] ( 1 )
<syntaxhighlight lang="lua">player = getPlayerFromID ( 1 )
  [[TakeAllWeapons]] ( player )  
TakeAllWeapons ( player )  
  [[serverChat]] ( "All weapons removed from ", [[getPlayerName]] ( player ), "." )
serverChat ( "All weapons removed from ", getPlayerName ( player ), "." )</syntaxhighlight>

Revision as of 02:33, 18 May 2006

Description

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

bool TakeAllWeapons ( player )

Required Arguments

  • player: A player object referencing the specified player

Example

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