Examples

Watermark + FPS

client.register_callback("on_paint", function()
    local fps = math.floor(client.get_fps())
    render.text(15, 15, "Lua | FPS: " .. tostring(fps), 255, 255, 255, 255)
end)

Enemy Counter

client.register_callback("on_paint", function()
    local local_pawn = entity.get_local_player()
    if local_pawn == 0 then return end

    local players = entity.get_players()
    local enemies = 0

    for _, p in pairs(players) do
        if entity.is_alive(p) and entity.is_enemy(p) then
            enemies = enemies + 1
        end
    end

    render.text(20, 40, "Enemies: " .. tostring(enemies), 255, 80, 120, 255)
end)

Chat Command Button

Última actualización

¿Te fue útil?