You can try to use plugin: https://github.com/IllidanS4/YSF
It has more useful functions, check it out.
Code:
native SetPlayerGravity(playerid, Float:gravity);
native Float:GetPlayerGravity(playerid);
It has more useful functions, check it out.