[Duda] Warning extraсo.
#4

Usa Este de GROVE4L, Anda Perfecto .

CODIGO:
pawn Код:
stock VelocidadVehiculo(playerid) //By GROVE4L
{
    new Float:ST[4];
    if(IsPlayerInAnyVehicle(playerid))
    GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
    else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
    ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 180.3;
    return floatround(ST[3]);
}
MODO DE USO:
pawn Код:
VelocidadVehiculo(playerid);
EJEMPLO DE USO:
pawn Код:
#include <a_samp>
#define VELOCIDAD (20)

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/mivelocidad", cmdtext, true, 10) == 0)
    {
        if(IsPlayerInAnyVehicle(playerid))return 1;
        if (VelocidadVehiculo(playerid) >= VELOCIDAD)
        {
            //FUNCION
        }
        return 1;
    }
    return 0;
}
Reply


Messages In This Thread
[Duda] Warning extraсo. - by Jose_grana - 05.10.2012, 22:23
Respuesta: [Duda] Warning extraсo. - by Fluid016 - 05.10.2012, 22:51
Re: [Duda] Warning extraсo. - by admantis - 06.10.2012, 00:16
Respuesta: [Duda] Warning extraсo. - by OTACON - 06.10.2012, 00:44
Respuesta: [Duda] Warning extraсo. - by admantis - 06.10.2012, 05:09
Respuesta: [Duda] Warning extraсo. - by CaptainMactavish - 06.10.2012, 05:29
Respuesta: [Duda] Warning extraсo. - by OTACON - 06.10.2012, 07:02

Forum Jump:


Users browsing this thread: 1 Guest(s)