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



Float help - Tuntun - 15.10.2012

Hello
Can Somebody explain me what is Float? Float:X Float:Y Float:Z what is that?


AW: Float help - BiosMarcel - 15.10.2012

This is an integer : 1 This is a Float 1.1

Your Money is saved a integer

Your X,Y and Z Positions are Floats


Re: Float help - Lordzy - 15.10.2012

Float is used in cases such as coordinates.

For example, in getting a player's position, we used Float arrays

pawn Код:
new Float:X,Float:Y,Float:Z //X means the x coordinate.
//Y means the Y coordinate
//and Z means the z coordinate its height.

//Using it

GetPlayerPos(playerid,X,Y,Z); //Got X,Y,Z position of a player.
Also it can be used in some other cases also.


Re: Float help - Randy More - 15.10.2012

Floats are like.. variables for saving the decimal data in, if you used an integer for it like that..

pawn Код:
new var;
It will not work properly, Floats for example are used for the health points, coordinates and such as, you will have to save/load it with the actual value like "2156.121", but if you used an integer like the stated variable, it will be just like "2156" only.


Re: Float help - Ghost_Boii - 15.10.2012

Float are positions


Re : Float help - yusei - 15.10.2012

More info


Re: Float help - Tuntun - 15.10.2012

can explain on very good please?
i mean if i do
SetPlayerSpawn(playerid,now float or what?
Float: Y Float X And Float Z where can i find the code's? i need go to ig and type /save? and i copy the code's?


Re: Float help - Ghost_Boii - 15.10.2012

Float
Mean
Here
PHP код:
AddPlayerClass(0,-70.6670,1797.7673,17.4779,261.6867,0,0,0,0,0,0); // 

In This These Are The FloatX,Y,Z

-70.6670,1797.7673,17.4779 



Re: Float help - Ghost_Boii - 15.10.2012

Sorry For Bump


Re: Float help - Randy More - 15.10.2012

You just want to use SetPlayerPos for a specific location? then yes simply submit /save in-game at the location you seek and those will be your coordinates..

pawn Код:
AddPlayerClass(0,X,Y,Z,Facing-Angle,0,0,0,0,0,0); //