[Include] SetPlayerGravity
#1

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
Reply
#2

Should learn to hook your callbacks.
Reply
#3

Nice way of doing this, but we'll have to wait till Kalcor change up his mind to make this feature.
Till then, try to play with Vehicle Velocity.
Reply
#4

Very nice idea! GG!

Anyway if someone need real SetPlayerGravity() write PM for me.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)