02.04.2016, 10:53
You could try this stock function
Cr.Forum https://sampforum.blast.hk/showthread.php?tid=344951
Cr.******
Cr.Forum https://sampforum.blast.hk/showthread.php?tid=344951
Cr.******
pawn Код:
stock GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
// Created by ******
new Float:a;
GetPlayerPos(playerid, x, y, a);
GetPlayerFacingAngle(playerid, a);
if (GetPlayerVehicleID(playerid)) {
GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
}
x += (distance * floatsin(-a, degrees));
y += (distance * floatcos(-a, degrees));
}