23.09.2010, 18:42
pawn Код:
stock GetSpeed(playerid)
{
new Float:ST[3];
GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
return floatround(1.61*floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 100.3);
}
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && GetSpeed(playerid))
{
// Your func. here.
}