Для более точного определения Z, лучше дополнить использованием MapAndreas.
PHP код:
stock PlayerBlink(playerid, Float:distance)
{
new
Float:x,
Float:y,
Float:z,
Float:angle;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, angle);
GetCoordsInFront(x, y, angle, distance, x, y);
SetPlayerPos(playerid, x, y, z);
}
PHP код:
stock GetCoordsInFront(Float:x, Float:y, Float:a, Float:distance, &Float:res_x, &Float:res_y)
{
res_x = x + (distance * floatsin(-a, degrees));
res_y = y + (distance * floatcos(-a, degrees));
}