24.10.2010, 20:54
I have try to make this:
forward GetXYInFrontOfPlayer2(playerid, &Float
, &Float:y, Float:distance);
public GetXYInFrontOfPlayer2(playerid, &Float
, &Float:y, Float:distance) {
new Float:a; GetPlayerPos(playerid, x, y, a); GetPlayerFacingAngle(playerid, a);
if (GetPlayerVehicleID(playerid)) { GetVehicleZAngle(GetPlayerVehicleID(playerid), a); }
x += 0.6;
x += (distance * floatsin(-a, degrees));
y += (distance * floatcos(-a, degrees)); }
If i look at N(orth) works, else not...
problem whit FacingAngle, please can you make a example code for a Point Front Side(Dx or Sx) of Player?
forward GetXYInFrontOfPlayer2(playerid, &Float

public GetXYInFrontOfPlayer2(playerid, &Float

new Float:a; GetPlayerPos(playerid, x, y, a); GetPlayerFacingAngle(playerid, a);
if (GetPlayerVehicleID(playerid)) { GetVehicleZAngle(GetPlayerVehicleID(playerid), a); }
x += 0.6;
x += (distance * floatsin(-a, degrees));
y += (distance * floatcos(-a, degrees)); }
If i look at N(orth) works, else not...
problem whit FacingAngle, please can you make a example code for a Point Front Side(Dx or Sx) of Player?