GetXYBehindThePlayer
#2

Add this somewhere in your code:
pawn Код:
GetXYBehindPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
    new Float:a;

    GetPlayerPos(playerid, x, y, a);
    GetPlayerFacingAngle(playerid, a);
    if (IsPlayerInAnyVehicle(playerid)) GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
    x -= (distance * floatsin(-a, degrees));
    y -= (distance * floatcos(-a, degrees));
}
Credit to dice7.
Reply


Messages In This Thread
GetXYBehindThePlayer - by arjanforgames - 21.07.2013, 16:22
Re: GetXYBehindThePlayer - by [XST]O_x - 21.07.2013, 16:24
Re: GetXYBehindThePlayer - by arjanforgames - 21.07.2013, 16:30
Re: GetXYBehindThePlayer - by [XST]O_x - 21.07.2013, 16:33
Re: GetXYBehindThePlayer - by arjanforgames - 21.07.2013, 16:36

Forum Jump:


Users browsing this thread: 1 Guest(s)