Scripting help..1 line
#4

I'll give you a small function, maybe you will use it:

pawn Код:
stock
    GetVehicleSpeed(vehicleid)
    {
        new
            Float: x,
            Float: y,
            Float: z;

        GetVehicleVelocity(vehicleid, x, y, z);
        return floatround((floatmul(floatsqroot(floatpower(x, 2.0) + floatpower(y, 2.0) + floatpower(z, 2.0)), 100.0) / 0.4463), floatround_floor);
    }
It returns the vehicle speed in kmp/h.
Reply


Messages In This Thread
Scripting help..1 line - by ifly4life - 18.12.2010, 02:02
Re: Scripting help..1 line - by Benjo - 18.12.2010, 02:28
Re: Scripting help..1 line - by ifly4life - 18.12.2010, 02:29
Re: Scripting help..1 line - by MrDeath537 - 18.12.2010, 02:36

Forum Jump:


Users browsing this thread: 1 Guest(s)