Speed formula
#1

Hey guys!

I need formula for speed in km/h. I need that for my speed-o-meter.
Reply
#2

I want a Ferrari irl, will i get it? NO.

btw search, you will find it, i found it once...
Reply
#3

CyberGhost stop that fuckin cry, thanks.


pawn Код:
stock GetVehicleSpeed( vehicleid )
{
    new
        Float: Poz[ 3 ]
    ;
    GetVehicleVelocity( vehicleid, Poz[ 0 ], Poz[ 1 ], Poz[ 2 ] );
    return floatround( floatsqroot( Poz[ 0 ] * Poz[ 0 ] + Poz[ 1 ] * Poz[ 1 ] + Poz[ 2 ] * Poz[ 2 ] ) * 160 );
}
tested and it works
Reply
#4

Thanks, Gh0sT_. And does it calculate correct speed?
Reply
#5

For me - yes
Reply
#6

Quote:
Originally Posted by Gh0sT_
Посмотреть сообщение
CyberGhost stop that fuckin cry, thanks.


pawn Код:
stock GetVehicleSpeed( vehicleid )
{
    new
        Float: Poz[ 3 ]
    ;
    GetVehicleVelocity( vehicleid, Poz[ 0 ], Poz[ 1 ], Poz[ 2 ] );
    return floatround( floatsqroot( Poz[ 0 ] * Poz[ 0 ] + Poz[ 1 ] * Poz[ 1 ] + Poz[ 2 ] * Poz[ 2 ] ) * 160 );
}
tested and it works
im not crying, i actually adviced him to try the search function.. if he never learn to use it he gonna spam the forum like other dudes does
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)