29.10.2010, 13:41
pawn Код:
GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
GetPlayerPos(playerid, x, y, Angle);
GetPlayerFacingAngle(playerid, Angle);
if (GetPlayerVehicleID(playerid))
{
GetVehicleZAngle(GetPlayerVehicleID(playerid), Angle);
}
x += (distance * floatsin(-Angle, degrees));
y += (distance * floatcos(-Angle, degrees));
}
To take the X, Y 20 in front of the player, with the PlayerFacing Angle or VehicleZAngle.
good luck

