Quick question about float
#1

Well, I made a command, which gets player pos, interior and virtual world. With the command /save (server sided), the pos is wrote on a file called "savedpositions.txt".

My command:
pawn Код:
if(strcmp("/get",cmdtext,true,10) == 0)
    {
       new Float:x,Float:y,Float:z;
       new string[128],nome[MAX_PLAYER_NAME];
       GetPlayerName(playerid,nome,sizeof(nome));
       format(file,sizeof(file),SERVER_USER_FILE,nome);
       GetPlayerPos(playerid, x,y,z);
       format(string,sizeof(string),"your position x: %f | y: %f | z: %f | Interior: %d | Virtual world: %d | Spawnou: %d",x,y,z,GetPlayerInterior(playerid),GetPlayerVirtualWorld(playerid),dini_Int(file,"Spawnou"));
       SendClientMessage(playerid, 0x33CCFFAA, string);
       PlayerPlaySound(playerid, 1139, 0.0,0.0,0.0);
       return 1;
       
    }
But I just could see that these positions are shown on float. On the file "savepositions", the positions are shown like this:

Код:
2036.3229,1283.8787,10.8203
But I can teleport to them with my command /lgoto simply using that:
Код:
/lgoto 2036.32,1283.87,10.82
instead
Код:
/lgoto 2036.3229,1283.8787,10.8203
So how do I save:
2036.32,1283.87,10.82
instead
2036.3229,1283.8787,10.8203

Sorry if I typed too much e_e. Thx.
Reply


Messages In This Thread
Quick question about float - by blackwave - 28.12.2010, 13:05
Re: Quick question about float - by _rAped - 28.12.2010, 13:38
Re: Quick question about float - by blackwave - 28.12.2010, 13:43
Re: Quick question about float - by Mauzen - 28.12.2010, 13:44
Re: Quick question about float - by _rAped - 28.12.2010, 13:47
Re: Quick question about float - by blackwave - 28.12.2010, 13:50

Forum Jump:


Users browsing this thread: 2 Guest(s)