IsPlayerDead: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 15: | Line 15: | ||
<syntaxhighlight lang="lua">player = getRandomPlayer ( ) | <syntaxhighlight lang="lua">player = getRandomPlayer ( ) | ||
if ( isPlayerDead ( player ) ) | if ( isPlayerDead ( player ) ) | ||
outputChatBox ( getPlayerName ( player ) | outputChatBox ( getPlayerName ( player ) .. " has bitten the dust." ) | ||
end</syntaxhighlight> | end</syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Player functions}} | {{Player functions}} |
Revision as of 10:04, 14 August 2006
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
- getPlayerTeam
- getPlayerBlurLevel
- setPlayerBlurLevel
- getPlayerSerial
- forcePlayerMap
- getPlayerScriptDebugLevel
- getPlayerFromName
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
- getPlayerWantedLevel
- givePlayerMoney
- isPlayerMapForced
- isPlayerNametagShowing
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
- takePlayerMoney
- countPlayersInTeam
- getPlayersInTeam
- isVoiceEnabled
- setControlState
- getControlState