IsPlayerDead

From Multi Theft Auto: Wiki
Revision as of 10:04, 14 August 2006 by EAi (talk | contribs) (→‎Example)
Jump to navigation Jump to search

This function checks if the specified player is dead or not.

Syntax

bool isPlayerDead ( player thePlayer )

Required Arguments

  • thePlayer: A player object referencing the specified player

Returns

Returns true if the player is dead, false otherwise.

Example

This example checks if a random player is dead, and if so displays a message in the chat.

player = getRandomPlayer ( )
if ( isPlayerDead ( player ) )
  outputChatBox ( getPlayerName ( player ) .. " has bitten the dust." )
end

See Also