Speedo meter
#1

Hey guys I've created my own speedo meter I must say I succeed at it :P but not 100% I noticed a thing that I don't like... so when I'm driving really fast and if I'm pressing left or right arrow along with forward arrow it lowers or raise my speed it depends in what way I'm turning... so here is my code for speed, can someone tell me how to get more accurate speedometer / speed detector? Thanks in advance and as always +rep for helpers

pawn Код:
stock GetSpeed(playerid)
{
    new Float: Pos[4];
    GetVehicleVelocity(GetPlayerVehicleID(playerid), Pos[0], Pos[1], Pos[2]);
    return floatround(1.61 * floatsqroot(floatabs(floatpower(Pos[0] + Pos[1] + Pos[2], 2))) * 100);
}
Reply
#2

Okay I found more accurate
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)