19.10.2009, 13:29
Hello. Someone ages ago gave me this function:
but no matter where i am or which way i am facing it always points to the north area OFF the map :S. even with 5.00 distance.
Help it muchly apprectiated.
pawn Код:
stock GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
new Float:a;
GetPlayerFacingAngle(playerid, a);
a -= 90;
y += (distance * floatsin(a, degrees));
x += (distance * floatcos(a, degrees));
}
Help it muchly apprectiated.