SA-MP Forums Archive
how much greater is this float - 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: how much greater is this float (/showthread.php?tid=578405)



how much greater is this float - AIped - 19.06.2015

Okay just a question

Here i can do 'something' if the last float is greater then the first.
pawn Код:
if(floatcmp(fr[2],col[2])== -1)
{
  SendClientMessage(playerid,-1,"GREAT HUH?");
}
But how would i script it if i want to check that col[2] is just a bit greater ( so i could add my own number to it)?
i mean col[2] is greater yes but what if i want to return only if its greater than 1.6 or something ?

I hope you understood what i meant. i find it difficult to explain.


Re: how much greater is this float - ikey07 - 19.06.2015

Just use col[2] > fr[2]


Re: how much greater is this float - AIped - 19.06.2015

i want to check if fr[2] is 1.6 greater than col[2]


AW: Re: how much greater is this float - Kaliber - 19.06.2015

Quote:
Originally Posted by AIped
Посмотреть сообщение
i want to check if fr[2] is 1.6 greater than col[2]
Look:

Код:
if(fr[2]-col[2] > 1.6)
Greekz


Re: AW: Re: how much greater is this float - AIped - 19.06.2015

Quote:
Originally Posted by Kaliber
Посмотреть сообщение
Look:

Код:
if(fr[2]-col[2] > 1.6)
Greekz
Ah yes ofcourse thanks