GetPlayerGravity: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
__NOTOC__ | __NOTOC__ | ||
{{Deprecated}} | {{Deprecated}} | ||
Please use [[getPedGravity]] | |||
This function returns a float that contains the current gravity for the specified [[player]]. | This function returns a float that contains the current gravity for the specified [[player]]. | ||
Revision as of 20:58, 20 April 2011
This function is deprecated. This means that its use is discouraged and that it might not exist in future versions, but there should be a more generic way to perform what it does. | |
Please use getPedGravity
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
- 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