SetGravity

From SA-MP Wiki

Jump to: navigation, search


Description:

Set the gravity for all players.


Parameters:
(Float:gravity)
Float:gravityThe value that the gravity should be set to (between -50.0 and 50.0).


Return Values:

This function always returns 1, even when it fails to execute if the gravity is out of the limits (lower than -50.0 or high than +50.0).


Image:32px-Ambox_warning_orange.png

Note

Default gravity is 0.008.


Example Usage:

public OnGameModeInit()
{
    // Set moon-like gravity
    SetGravity(0.001);
 
    return 1;
}

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

In other languages