XY infront of player
#1

Hello. Someone ages ago gave me this function:

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));
}
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.
Reply


Messages In This Thread
XY infront of player - by pagie1111 - 19.10.2009, 13:29
Re: XY infront of player - by Think - 19.10.2009, 13:31
Re: XY infront of player - by pagie1111 - 19.10.2009, 13:32
Re: XY infront of player - by Jefff - 19.10.2009, 13:52
Re: XY infront of player - by pagie1111 - 19.10.2009, 13:54
Re: XY infront of player - by pagie1111 - 20.10.2009, 09:28
Re: XY infront of player - by Donny_k - 20.10.2009, 09:35
Re: XY infront of player - by pagie1111 - 20.10.2009, 09:39
Re: XY infront of player - by Donny_k - 20.10.2009, 10:00

Forum Jump:


Users browsing this thread: 2 Guest(s)