10.01.2018, 21:12
PHP код:
stock GetXYInBackOfPlayer(const playerid, &Float:x, &Float:y, const Float:distance)
{
new Float:a;
GetPlayerPos(playerid, x, y, a);
GetPlayerFacingAngle(playerid, a);
if (IsPlayerInAnyVehicle(playerid))
{
new vid=GetPlayerVehicleID(playerid);
if (vid > 0 && vid < SS[NumberOfVehicles])GetVehicleZAngle(vid, a);
}
x -= (distance * floatsin(-a, degrees));
y -= (distance * floatcos(-a, degrees));
}