GetPlayerGravity
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 getPedGravity instead. |
This function returns a float that contains the current gravity for the specified player.
Syntax
float getPlayerGravity ( player thePlayer )
Required Arguments
- thePlayer: The player whose gravity you want to check
Returns
Returns a float indicating the player's gravity, or false if the player is invalid. Default value is 0.008.
Example
This example outputs the gravity of the player who entered the 'showGravity' command.
function showGravity ( thePlayer ) local gravity = getPlayerGravity ( thePlayer ) outputChatBox ( "Your gravity: " .. tostring(gravity), thePlayer ) end addCommandHandler ( "showGravity", showGravity )
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