object spawns infront of me when in vehicle
#2

pawn Код:
GetXYBehindPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
        new Float:a;
        GetPlayerPos(playerid, x, y, a);
        GetPlayerFacingAngle(playerid, a);
         // <===
        if (GetPlayerVehicleID(playerid))
        {
            GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
        }
        a = a - 180; // <===
        x += (distance * floatsin(-a, degrees));
        y += (distance * floatcos(-a, degrees));
}
Reply


Messages In This Thread
object spawns infront of me when in vehicle - by swieberdevos - 05.07.2011, 14:24
Re: object spawns infront of me when in vehicle - by Vince - 05.07.2011, 14:26
Re: object spawns infront of me when in vehicle - by HayZatic - 05.07.2011, 16:48

Forum Jump:


Users browsing this thread: 1 Guest(s)