Float help
#1

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

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
Reply
#3

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.
Reply
#4

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.
Reply
#5

Float are positions
Reply
#6

More info
Reply
#7

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?
Reply
#8

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 
Reply
#9

Sorry For Bump
Reply
#10

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); //
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)