Magic number
#2

Return an integer :
PHP код:
GetPlayerSpeed(playerid)
{
    new
        
Float:x,
        
Float:y,
        
Float:z;
    
GetVehicleVelocity(GetPlayerVehicleID(playerid), xyz);
    return 
floatround(floatsqroot(floatpower(floatabs(x), 2.0) + floatpower(floatabs(y), 2.0) + floatpower(floatabs(z), 2.0)) * 195.28625);

EDIT: There is not a REAL magic number since each (almost) vehicle are his own ratio.
Reply


Messages In This Thread
Magic number - by Antenastyle - 17.05.2017, 16:28
Re: Magic number - by Dayrion - 17.05.2017, 16:43
Re: Magic number - by Vince - 17.05.2017, 17:01
Re: Magic number - by Antenastyle - 17.05.2017, 17:11

Forum Jump:


Users browsing this thread: 1 Guest(s)