IsPlayerOnGround
From Multi Theft Auto: Wiki
This function is deprecated. This means that its use is discouraged and that it might not exist in future versions. | |
Please use isPedOnGround instead. |
This function is used to determine whether or not a player is on the ground. This is for on-foot usage only.
Syntax
Click to collapse [-]
Server and clientbool isPlayerOnGround ( player thePlayer )
Required Arguments
- thePlayer: The player you are checking.
Returns
Returns true if the player is on foot and on the ground, false otherwise, even if he is in a vehicle capable of flying.
Example
Click to collapse [-]
Serverside exampleThis example checks if the player who enters the 'amiflying' command is on the ground and outputs a message.
[lua] function isHeFlying ( sourcePlayer ) if ( isPlayerOnGround ( sourcePlayer ) ) then outputChatBox ( "No, you're not flying, you're just stoned!", sourcePlayer ) else outputChatBox ( "Is it a bird, is it a plane... No it's " .. getClientName ( sourcePlayer ) .. "!", sourcePlayer ) end end addCommandHandler ( "amiflying", isHeFlying )
See Also
- forcePlayerMap
- getAlivePlayers
- getDeadPlayers
- getPlayerACInfo
- getPlayerAnnounceValue
- getPlayerBlurLevel
- getPlayerCount
- getPlayerFromName
- getPlayerIdleTime
- getPlayerIP
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
FROM VERSION 1.5.7 r19626 ONWARDS
- getPlayerSerial
- getPlayerTeam
- getPlayerVersion
- getPlayerWantedLevel
- getRandomPlayer
- givePlayerMoney
- isPlayerMapForced
- isPlayerMuted
- isPlayerNametagShowing
- isVoiceEnabled
- redirectPlayer
- resendPlayerACInfo
- resendPlayerModInfo
- setPlayerAnnounceValue
- setPlayerBlurLevel
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerMuted
- setPlayerName
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
FROM VERSION 1.5.7 r19626 ONWARDS
- setPlayerTeam
- setPlayerVoiceBroadcastTo
- setPlayerVoiceIgnoreFrom
- setPlayerWantedLevel
- spawnPlayer
- takePlayerMoney
- takePlayerScreenShot