SA-MP Forums Archive
How to get gravity? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to get gravity? (/showthread.php?tid=133412)



How to get gravity? - Torran - 12.03.2010

Hello,

Is there a function or something to get the gravity?
As im making a /setgravity command and if player tries to set gravity and the gravity is already that level or w/e it returns msg?


Re: How to get gravity? - Mike Garber - 12.03.2010

I don't see nothing like that on the Wiki, but I don't see the point of having that.
It's not like you save memory or anything by doing that.


Re: How to get gravity? - adsy - 12.03.2010

SetGravity(0.00;

under ongamemodeinit()

0.008 is normal gravity

easiest thing to do is to set it with a variable


Re: How to get gravity? - gotenks918 - 12.03.2010

Hmmm, only way I could think to do it is create a float.

new float:Gravity;

When user uses /setgravity [amount] make Gravity = amount or something similar but also run the check if(amount = Gravity) or something. It's the only way I can think to do it.