speedometer?
#1

I have searched many topics etc. And can't find a good working function for it =/ Hope somebody will be able to help me
Reply
#2

There are tons of them, which kind of speedometer you like?
Reply
#3

A simple one like this:

Speed: 105 Km/h.
Reply
#4

I have this one now:

pawn Код:
stock GetPlayerSpeed(playerid,bool:kmh)
{
    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);
}
But it's not very accurate.. When driving a infernus backwards it says 50 km/h.. also when driving a hill or something else it slows down (the km /h)
Reply
#5

Bump
Reply
#6

Quote:
Originally Posted by swieberdevos
Посмотреть сообщение
I have searched many topics etc. And can't find a good working function for it =/ Hope somebody will be able to help me
http://forum.sa-mp.com/showthread.ph...ghlight=speedo
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)