need help

Runbu73

Участник
Автор темы
118
3
the esp code works, but it ignores some players, I want it to render all players near me without ignoring anyone

Ícone Verificada pela comunidade






Lua:
for i = 0, sampGetMaxPlayerId() do
        if sampIsPlayerConnected(i) then
            local result, handlePed = sampGetCharHandleBySampPlayerId(i)
            local color_ped = sampGetPlayerColor(i)
            local a, r, g, b = explode_argb(color_ped)
            local color = join_argb(255, r, g, b)
            
            if result and doesCharExist(handlePed) and isCharOnScreen(handlePed) then
                local pos = {getCharCoordinates(PLAYER_PED)}
                local whpos = {getCharCoordinates(handlePed)}
                local x1, y1 = convert3DCoordsToScreen(pos[1], pos[2], pos[3])
                local x2, y2 = convert3DCoordsToScreen(whpos[1], whpos[2], whpos[3])
                
                if aim.CheckBox.teste80[0] then
                    renderDrawLine(x1, y1, x2, y2, 2, color)
                end
            end
        end
    end
end
 

MLycoris

На вид оружие массового семяизвержения
Проверенный
1,993
2,181
Lua:
for k, handle in pairs(getAllChars()) do
    local id = select(2, sampGetPlayerIdByCharHandle(handle))
    local color_ped = string.gsub(string.format("%X", sampGetPlayerColor(id)), "..(......)", "0xFF%1")
    if aim.CheckBox.teste80[0] and isCharOnScreen(handle) and handle ~= 1 then
        local x1, y1 = convert3DCoordsToScreen(getCharCoordinates(PLAYER_PED))
        local x2, y2 = convert3DCoordsToScreen(getCharCoordinates(handle))
        renderDrawLine(x1, y1, x2, y2, 2, color_ped)
    end
end