KillPlayer: Difference between revisions
Jump to navigation
Jump to search
JonChappell (talk | contribs) m (→Example) |
Black Dragon (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
This function kills the specified player. It returns a boolean value (true or false) depending on whether the function passed or failed. | This function kills the specified player. It returns a boolean value (true or false) depending on whether the function passed or failed. | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">bool KillPlayer ( player thePlayer )</syntaxhighlight> | |||
===Required Arguments=== | ===Required Arguments=== | ||
* '''player''': A [[player]] object referencing the specified player | * '''player''': A [[player]] object referencing the specified player. | ||
===Returns=== | |||
Returns true if the function succeeded, and false otherwise. | |||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua">player = GetPlayerFromID ( 1 ) | |||
if ( | if ( KillPlayer ( player ) ) | ||
outputChatBox ( ( GetPlayerName ( player ), " was eliminated." ), source ) | |||
end | end</syntaxhighlight> |
Revision as of 17:25, 18 May 2006
This function kills the specified player. It returns a boolean value (true or false) depending on whether the function passed or failed.
Syntax
bool KillPlayer ( player thePlayer )
Required Arguments
- player: A player object referencing the specified player.
Returns
Returns true if the function succeeded, and false otherwise.
Example
player = GetPlayerFromID ( 1 ) if ( KillPlayer ( player ) ) outputChatBox ( ( GetPlayerName ( player ), " was eliminated." ), source ) end