object spawns infront of me when in vehicle
#1

nvm fixed
Reply
#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
#3

use the etXYBehindPlayer(playerid, &Float, &Float:y, Float:distance)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)