note Help Needed
This wiki is the result of an ongoing community effort — thank you all for helping!
If you want to provide changes to 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.