IsPlayerDead: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 13: | Line 13: | ||
==Example== | ==Example== | ||
This example checks if a random player is dead, and if so displays a message in the chat. | This example checks if a random player is dead, and if so displays a message in the chat. | ||
<syntaxhighlight lang="lua">player = getRandomPlayer ( ) | <syntaxhighlight lang="lua"> | ||
if ( isPlayerDead ( player ) ) | player = getRandomPlayer ( ) | ||
if ( isPlayerDead ( player ) ) then | |||
end</syntaxhighlight> | outputChatBox ( getClientName ( player ) .. " has bitten the dust." ) | ||
end | |||
</syntaxhighlight> | |||
==See Also== | ==See Also== | ||
{{Player functions}} | {{Player functions}} |
Revision as of 18:29, 30 July 2007
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 ) ) then outputChatBox ( getClientName ( player ) .. " has bitten the dust." ) end
See Also
- forcePlayerMap
- getAlivePlayers
- getDeadPlayers
- getPlayerACInfo
- getPlayerAnnounceValue
- getPlayerBlurLevel
- getPlayerCount
- getPlayerFromName
- getPlayerIdleTime
- getPlayerIP
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
- getPlayerScriptDebugLevel
- getPlayerSerial
- getPlayerTeam
- getPlayerVersion
- getPlayerWantedLevel
- getRandomPlayer
- givePlayerMoney
- isPlayerMapForced
- isPlayerMuted
- isPlayerNametagShowing
- isVoiceEnabled
- redirectPlayer
- resendPlayerACInfo
- resendPlayerModInfo
- setPlayerAnnounceValue
- setPlayerBlurLevel
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerMuted
- setPlayerName
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
- setPlayerScriptDebugLevel
- setPlayerTeam
- setPlayerVoiceBroadcastTo
- setPlayerVoiceIgnoreFrom
- setPlayerWantedLevel
- spawnPlayer
- takePlayerMoney
- takePlayerScreenShot