IsPlayerDead: Difference between revisions

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


==Example==
==Example==
  player = [[GetRandomPlayer]] ( 1 )
  player = [[GetRandomPlayer]] ( )
  if ( [[IsPlayerDead]] ( player ) )
  if ( [[IsPlayerDead]] ( player ) )
   [[ serverChat ]] ( [[GetPlayerName]] ( player ) , " has bitten the dust." )
   [[ serverChat ]] ( [[GetPlayerName]] ( player ) , " has bitten the dust." )
  end
  end

Revision as of 17:30, 25 March 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 )

Required Arguments

  • player: A player object referencing the specified player

Example

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