SA-MP Forums Archive
Make A Spido - 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: Make A Spido (/showthread.php?tid=156034)



Make A Spido - whitedragon - 20.06.2010

How to make normal spido what equaly speed up and speed down?


Re: Make A Spido - Dolph - 20.06.2010

I think you have to know textdraws and the use of Float


Re: Make A Spido - Naxix - 20.06.2010

A fast search and i found this function made by Misco:

Код:
stock GetPlayerSpeed(playerid, bool:kmh) // by misco
{
  new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
  if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz); else GetPlayerVelocity(playerid,Vx,Vy,Vz);
  rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2)));
  return kmh?floatround(rtn * 100 * 1.61):floatround(rtn * 100);
}
Now just use this in a textdraw.


Re: Make A Spido - Dolph - 20.06.2010

Float and Textdraw.. God im smart


Re: Make A Spido - Naxix - 20.06.2010

Quote:
Originally Posted by Dolph
Float and Textdraw.. God im smart
It's not as simple as float.. It's a calculation


Re: Make A Spido - whitedragon - 21.06.2010

how to show player it?


Re: Make A Spido - ledzep - 21.06.2010

There are tons of filterscripts of speedos with fancy textdraws and such. If you need a speedo and don't know how to script, use one of them. If you get curious as to how such a script works, open it up in your pawn editor and check it out.