middlematt
12.12.2016, 16:44
Данная функция не выполняется, а именно вызывает значение 0
stock GetPlayerDistanceToPlayer(playerid, targetid, Float: distance)
{
if (0 == IsPlayerConnected(targetid))
return 0;
static
Float: _position_x,
Float: _position_y,
Float: _position_z
;
GetPlayerPos(targetid, _position_x, _position_y, _position_z);
if (!IsPlayerInRangeOfPoint(playerid, distance, _position_x, _position_y, _position_z)
&& GetPlayerVirtualWorld(playerid) != GetPlayerVirtualWorld(targetid)
&& GetPlayerInterior(playerid) != GetPlayerInterior(playerid))
return 0;
return 1;
}
stock GetPlayerDistanceToPlayer(playerid, targetid, Float: distance)
{
if (0 == IsPlayerConnected(targetid))
return 0;
static
Float: _position_x,
Float: _position_y,
Float: _position_z
;
GetPlayerPos(targetid, _position_x, _position_y, _position_z);
if (!IsPlayerInRangeOfPoint(playerid, distance, _position_x, _position_y, _position_z)
&& GetPlayerVirtualWorld(playerid) != GetPlayerVirtualWorld(targetid)
&& GetPlayerInterior(playerid) != GetPlayerInterior(playerid))
return 0;
return 1;
}