warning Not Translated
This page has not been translated into the language that your browser requested yet. The English content is being shown as a fallback.
If you want to contribute a translation for this page then please click here.
GetGravity
Description
Get the currently global gravity.
Examples
SA-MP server:
#include <a_samp>
#if !defined GetGravity
native Float:GetGravity();
#endif
public OnGameModeInit()
{
printf("Current gravity: %f", GetGravity());
return 1;
}
open.mp server:
#include <open.mp>
public OnGameModeInit()
{
printf("Current gravity: %f", GetGravity());
return 1;
}
Notes
warning
In SA-MP Server this function is not defined by default. Add 'native Float:GetGravity();' under the inclusion of a_samp.inc to use it.
Related Functions
- SetGravity: Set the global gravity.
- GetPlayerGravity: Get a player's gravity.