29.06.2013, 22:49
This include allows you to change (although sometimes glithy) player's gravity. This does not change vehicles or other objects.
Installation
Place setgravity.inc to the include directory and add #include <setgravity> directive to your gamemode or filterscript. Then add SetGravity_OnPlayerConnect(playerid); to the OnPlayerConnect public function and SetGravity_OnPlayerUpdate(playerid); to OnPlayerUpdate in your script.
Functions
SetPlayerGravity(playerid, Float:newgravity)
This sets player to use custom gravity system, which tries to mimic gravity effects. 0.008 corresponds to the default gravity. 0.0 gravity still makes the player descend, so you may use something around -0.02281.
ResetPlayerGravity(playerid)
This forces the player to use the default server gravity.
Download: pastebin.com/KPAwD6d2, save as setgravity.inc
Installation
Place setgravity.inc to the include directory and add #include <setgravity> directive to your gamemode or filterscript. Then add SetGravity_OnPlayerConnect(playerid); to the OnPlayerConnect public function and SetGravity_OnPlayerUpdate(playerid); to OnPlayerUpdate in your script.
Functions
SetPlayerGravity(playerid, Float:newgravity)
This sets player to use custom gravity system, which tries to mimic gravity effects. 0.008 corresponds to the default gravity. 0.0 gravity still makes the player descend, so you may use something around -0.02281.
ResetPlayerGravity(playerid)
This forces the player to use the default server gravity.
Download: pastebin.com/KPAwD6d2, save as setgravity.inc