15.01.2013, 03:29
Maybe you can modify this:
PHP код:
forward GetXYInFrontOfPlayer2(playerid, &Float, &Float:y, Float:distance, Float:angle);
public GetXYInFrontOfPlayer2(playerid, &Float, &Float:y, Float:distance, Float:angle) {
new Float:a;
GetPlayerPos(playerid, x, y, a);
GetPlayerFacingAngle(playerid, a);
if (GetPlayerVehicleID(playerid))
GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
a += angle;
x += (distance * floatsin(-a, degrees));
y += (distance * floatcos(-a, degrees));
}