26.02.2011, 12:38
pawn Код:
stock GetPlayerSpeed(playerid)
{
new Float:x, Float:y, Float:z, Float:rst;
if(IsPlayerInAnyVehicle(playerid))
{
GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z);
}
else
{
GetPlayerVelocity(playerid, x, y, z);
}
rst = ((x*x) + (y*y));
return floatround(rst * 200, floatround_round);
}