20.09.2010, 19:56
heres returning into a integer
:
![Cheesy](images/smilies/biggrin.png)
pawn Код:
stock
GetSpeed(playerid, mode = 1)
{
new
Float:velo[3]
;
GetVehicleVelocity(GetPlayerVehicleID(playerid), velo[0], velo[1], velo[2]);
return IsPlayerInAnyVehicle(playerid) ? floatround(((floatsqroot(((velo[0] * velo[0]) + (velo[1] * velo[1]) + (velo[2] * velo[2]))) * (!mode ? 105.0 : 170.0))) * 1) : 0;
}