хелп плиз

undergroundssssss

Новичок
Автор темы
27
1
Версия MoonLoader
.026-beta
хотел сделать так, чтобы к челу с определенным айди в зоне стрима крепился текст, но ничего не случается
Lua:
for i = 0, sampGetMaxPlayerId() do
    if sampIsPlayerConnected(i) then
        local result, cped = sampGetCharHandleBySampPlayerId(i)
        local plCol = '0xFF'..string.format('%06X', bit.band(sampGetPlayerColor(i), 0xFFFFFF))
        if result then
            if doesCharExist(cped) and isCharOnScreen(cped) then
                if i == fix_var["fnum"] then
                    sampCreate3dText("Цель", plCol, 0, 1, 0, 100, true, i)
                end
            end
        end
    end
end
 

MLycoris

На вид оружие массового семяизвержения
Проверенный
1,981
2,191
осталось привязать проверку по ид
Lua:
local font = renderCreateFont('TimesNewRoman', 9, 5)
function main()
    while true do wait(0)

        for k, handle in pairs(getAllChars()) do
            if isCharOnScreen(handle) and handle ~= 1 then
                local id = select(2, sampGetPlayerIdByCharHandle(handle))
                local color_ped = string.gsub(string.format("%X", sampGetPlayerColor(id)), "..(......)", "0xFF%1")   
                local x, y = convert3DCoordsToScreen(getCharCoordinates(handle))
                renderFontDrawText(font, 'Цель', x, y, color_ped)
            end
        end
        
    end
end