KillPlayer
Jump to navigation
Jump to search
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
- thePlayer: A player object referencing the specified player.
Returns
Returns true if the player was killed, false if the player specified could not be killed or is invalid.
Example
-- Get the player with an ID of 1 player = getPlayerFromID ( 1 ) -- If a player was found with an ID of 1 then if ( player ) -- Kill the player if ( killPlayer ( player ) ) then -- Inform everyone that they were killed. outputChatBox ( ( getPlayerName ( player ), " was eliminated." ) ) end end