Как использовать wait среди функции? Есть поток, но оно все равно не работает
Создание thr:
thr = lua_thread.create_suspended(txyz)
Функция:
function txyz(targetX,targetY,targetZ)
setCharCoordinates(PLAYER_PED, targetX, targetY, targetZ)
X, Y, Z = getCharCoordinates(PLAYER_PED)
if X>targetX-3 and X<targetX+3 and Y>targetY-3 and Y<targetY+3 then
thr:run()
wait(1000)
sampAddChatMessage("nnnnn", -1)
end
end