3d text

SomaGnoma

Известный
Автор темы
429
148
Версия MoonLoader
.026-beta
Как сделать проверку, виден ли 3d текст или нет?
Есть такая штучка
Lua:
for i = 0, 2048 do
            if sampIs3dTextDefined(i) then
                text = sampGet3dTextInfoById(i)
                if text:find("Я негр") then
                 if текст виден then -- тут эту фичу вствить
                 -- код
                 end
                end
            end
end
 

P!NK.

Участник
68
54
Lua:
require 'lib.moonloader'
function main()
    while not isSampAvailable() do wait(0) end
   
    while true do
        wait(0)
        if emb then
            for a = 1, 2048 do
                if sampIs3dTextDefined(a) then
                    local string, color, vposX, vposY, vposZ, distance, ignoreWalls, playerId, vehicleId = sampGet3dTextInfoById(a)
                    local X, Y, Z = getCharCoordinates(PLAYER_PED)
                    local distances = getDistanceBetweenCoords2d(vposX, vposY, X, Y)
                    local wposX, wposY = convert3DCoordsToScreen(vposX, vposY, vposZ)
                    local px , py = convert3DCoordsToScreen(X, Y, Z)
                    local distance1 = string.format("%.0f", getDistanceBetweenCoords3d(vposX, vposY, vposZ, X, Y, Z))
                    if isPointOnScreen(vposX, vposY, vposZ, 0.0) and string.find(string, "Текст") then   
                    end
                end
            end       
        end
    end
end
Как-то так
 
  • Нравится
Реакции: xanndiane и SomaGnoma