21.07.2013, 16:24
Add this somewhere in your code:
Credit to dice7.
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));
}