IsPlayerDead: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 12: Line 12:
<syntaxhighlight lang="lua">player = GetRandomPlayer ( )
<syntaxhighlight lang="lua">player = GetRandomPlayer ( )
if ( IsPlayerDead ( player ) )
if ( IsPlayerDead ( player ) )
   serverChat ( GetPlayerName ( player ) , " has bitten the dust." )
   outputChatBox ( GetPlayerName ( player ) , " has bitten the dust." )
end</syntaxhighlight>
end</syntaxhighlight>

Revision as of 03:27, 20 May 2006

Description

This function returns a boolean value (true or false) depending on whether the specified player is dead or not.

Syntax

bool IsPlayerDead ( player player )

Required Arguments

  • player: A player object referencing the specified player

Example

player = GetRandomPlayer ( )
if ( IsPlayerDead ( player ) )
  outputChatBox ( GetPlayerName ( player ) , " has bitten the dust." )
end