03.01.2019, 12:01
Get the X and Y 2 units in front of a player:
Get the X and Y 2 units behind a player:
Код:
new Float:x, Float:y, Float:z, Float:a; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, a); x += floatsin(-a, degrees) * 2.0; y += floatcos(-a, degrees) * 2.0;
Код:
new Float:x, Float:y, Float:z, Float:a; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, a); a = a < 180.0 ? a + 180.0 : a - 180.0; x += floatsin(-a, degrees) * 2.0; y += floatcos(-a, degrees) * 2.0;

