GetPlayerSpeed
#1

hey does anyone knows a good working GetPlayerSpeed
I've got
PHP код:
stock GetVehicleSpeed(vehicleid)
{
        if(
vehicleid != INVALID_VEHICLE_ID)
        {
                new 
Float:Pos[3],Float:VS ;
                
GetVehicleVelocity(vehicleidPos[0], Pos[1], Pos[2]);
                
VS floatsqroot(Pos[0]*Pos[0] + Pos[1]*Pos[1] + Pos[2]*Pos[2])*200;
                return 
floatround(VS,floatround_round);
        }
        return 
INVALID_VEHICLE_ID;
}
stock GetPlayerSpeed(playerid)
{
        if(
playerid != INVALID_PLAYER_ID)
        {
                new 
Float:Pos[3],Float:PS;
                
GetPlayerVelocity(playeridPos[0], Pos[1], Pos[2]);
                
PS floatsqroot(Pos[0]*Pos[0] + Pos[1]*Pos[1] + Pos[2]*Pos[2])*200;
                return 
floatround(PS,floatround_round);
        }
        return 
INVALID_PLAYER_ID;

but if i would use GetPlayerSpeed(playerid) >= 120 would work...or its made only for excact speed..?
Reply


Messages In This Thread
GetPlayerSpeed - by wumpyc - 31.10.2011, 20:15
Re: GetPlayerSpeed - by Mean - 31.10.2011, 21:34
Re: GetPlayerSpeed - by Michael@Belgium - 31.10.2011, 21:37

Forum Jump:


Users browsing this thread: 1 Guest(s)