function main()
while not isSampAvailable() do wait(0) end
sampRegisterChatCommand('detali', function()
renderWindow[0] = not renderWindow[0]
end)
while true do
wait(0)
if flooderH[0] then
local ress = Search3Dtext(4.0, "碾 恸彗溧 � 汔疣�")
if ress then
setGameKeyState(18, 255)
wait(0)
setGameKeyState(18, 0)
end
end
end
end
function Search3Dtext(radius, patern)
x,y,z = getCharCoordinates(playerPed)
local result = false
for id = 0, 2048 do
if sampIs3dTextDefined(id) then
local text2, _, posX2, posY2, posZ2 = sampGet3dTextInfoById(id)
if getDistanceBetweenCoords3d(x, y, z, posX2, posY2, posZ2) < radius then
if string.len(patern) ~= 0 then
if string.match(text2, patern, 0) ~= nil then result = true end
else
result = true
end
if result then
text = text2
posX = posX2
posY = posY2
posZ = posZ2
radius = getDistanceBetweenCoords3d(x, y, z, posX, posY, posZ)
end
end
end
end
return result, text
end