12.08.2010, 10:12
Stepashka, ошибко
я бы так сделал:
pawn Code:
ST[0] = floatsqroot(floatpower(ST[0], 2.0) + floatpower(ST[1], 2.0) + floatpower(ST[2], 2.0));
return floatround(ST[3])*100;
pawn Code:
stock GetPlayerSpeed(playerid)
{
new Float:ST[3];
if(IsPlayerInAnyVehicle(playerid))GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
return floatround( floatsqroot(floatpower(ST[0], 2.0) + floatpower(ST[1], 2.0) + floatpower(ST[2], 2.0)) )*100;
}