SA-MP Forums Archive
Question about 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: Question about Float. (/showthread.php?tid=345905)



Question about Float. - Dr0gIraN - 26.05.2012

Hello, I have a little question about Float. So for example: PlayerInfo[playerid][pTest] is registered as Float and how to write the code to check if the float - PlayerInfo[playerid][pTest] is equal to 0.0 ?
Maybe like that:
if(PlayerInfo[playerid][pTest] == 0.0)
Or the code for Float is different?

Another question: If I make a Float, but I have already registereted accounts in my server, when the player login into the server how much will be his Float, 0 or 0.0 ?

Sorry for my bad english.



Re: Question about Float. - Jonny5 - 26.05.2012

yes you compare floats the same way

using the ==

and 2. the default value of a float is 0.0