height
#1

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;
}
Reply
#2

where it says %f put %.0f
Reply
#3

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

%.012f adds 1 and 2.
Reply
#5

thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)