SA-MP Forums Archive
height - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: height (/showthread.php?tid=146176)



height - [SF]RobMob - 06.05.2010

im trying to make it when a player bounces his car using hydrolics it shows how high they bounce .I got my script working but i was wondering if there is a way to convert the z position to feet or inches .right now when the bounce its showing a number like 31.234567

part of the code so you get a better idea

Код:
public hydrometer(playerid)
{
  new currentveh;
  currentveh = GetPlayerVehicleID(playerid);
  new Float:vehx, Float:vehy, Float:vehz;
  GetVehiclePos(currentveh, vehx, vehy, vehz);
  new vehpostext[96];
  format(vehpostext, sizeof(vehpostext), "Your current vehicle Height Is: %f", vehz);
  SendClientMessage(playerid, 0xFFFFFFFF, vehpostext);
  return 1;
}



Re: height - -Rebel Son- - 06.05.2010

where it says %f put %.0f


Re: height - [SF]RobMob - 06.05.2010

thanks is ther a way to get 1 or 2 numbers past the point?


Re: height - -Rebel Son- - 06.05.2010

%.012f adds 1 and 2.


Re: height - [SF]RobMob - 06.05.2010

thanks