SA-MP Forums Archive
Checking 2 different sums of floats - 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)
+--- Thread: Checking 2 different sums of floats (/showthread.php?tid=293499)



Checking 2 different sums of floats - Giovanni - 28.10.2011

Hi,
I have created a public which bascially generates a random location where players have to go to then. Everything is working fine, but I have noticed that sometimes comes the same location 2 times in a row.


I want to find a way around it somehow, and created a function which just adds the 3 positions to a sum. So then I want to do it like:

It first checks the sum. If it is NOT the same as in the check before, it will create a checkpoint. But if it IS the same, then it shalle generate it again.


I was unsure how to do this, and thought if it is possible to do that with a do - while loop, but I am totally stuck, and hope that somebody here can help me.

Thanks in advance.


(I hope that my explanation was clear)



Re: Checking 2 different sums of floats - admantis - 28.10.2011

The answer to your title: floatcmp (works like strcmp but with float numbers..).