[CODE]
newTask
(
function
(
)
while
true
do
wait
(
100
)
local
closestPlayer
,
closestDistance
=
nil
,
math
.
huge
local
botPosX
,
botPosY
=
getBotPosition
(
)
for
id
,
player
in
pairs
(
getAllPlayers
(
)
)
do
if
id
~=
getBotId
(
)
and
player
.
exist
and
player
.
nick
~=
"Mato_Rindo"
then
local
distance
=
getDistanceBetweenCoords3d
(
player
.
position
.
x
,
player
.
position
.
y
,
player
.
position
.
z
,
getBotPosition
(
)
)
if
distance