IsPlayerInWater: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server client function}} | |||
This function is used to determine whether or not a player is currenlty in water. | This function is used to determine whether or not a player is currenlty in water. | ||
Revision as of 12:01, 7 August 2007
This function is used to determine whether or not a player is currenlty in water.
Syntax
Click to expand [+]
ServerClick to expand [+]
ClientExample
This example shows all players that are in water in a list to the player who enters the 'playersInWater' command.
[lua] function showPlayersInWater(player) local players = getElementsByType("player") local list = "" for k,v in ipairs(players) do if (isPlayerUnderWater(v) == true) then list = list.." "..getClientName(v) end end outputChatBox("Players pretending to be trouts:"..list,player) end addCommandHandler("playersInWater",showPlayersInWater)
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