Skip to content

Fae1337/midnight-lua-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

SCP:SL Lua API Documentation

Скрипты размещаются в папке Мои документы / scpsl / lua. Перезагрузите скрипты кнопкой RELOAD во вкладке меню LUA.[1]

Callback Functions

Чит автоматически вызывает эти функции.

function on_gui()
  -- Рисование текста, текстур и GUI-элементов
  -- Логику, поиск целей и расчёты перенесите в on_update
end
function on_update()
  -- Расчёты, поиск целей для аимбота, математика
  -- Рисование здесь не работает!
end

SCREEN Class

  • c_screen.get_mouse_position(){x: INT, y: INT}
  • c_screen.is_mouse_click()boolean
  • c_screen.resolution(){width: INT, height: INT, center_x: INT, center_y: INT}
  • c_screen.world_to_screen(vec3){x: INT, y: INT, is_on_screen: boolean}[1]

GUI Class

  • c_gui.label(x, y, width, height, text){x: INT, y: INT}
  • c_gui.line(x, y, x2, y2, {r, g, b, a}, thickness)nil
    Пример: c_gui.line(30, 30, 160, 160, {255, 255, 255, 255}, 2.0)
  • c_gui.text_align(align) (значения: align_upper_left, align_upper_center, align_upper_right, align_middle_left, align_middle_center, align_middle_right, align_lower_left, align_lower_center, align_lower_right)
  • c_gui.texture(texture_or_null, x, y, width, height, color, border_radius, border_width, is_alpha_channel)

Примеры текстур:

-- Прямоугольник с заливкой
c_gui.texture(nil, 200, 200, 50, 50, {0, 1, 0, 1}, {15, 15, 15, 15}, {15, 15, 15, 15}, false)

-- Прямоугольник без заливки
c_gui.texture(nil, 200, 200, 50, 50, {0, 1, 0, 1}, {3, 3, 3, 3}, {2, 2, 2, 2}, false)

-- Круг без заливки
c_gui.texture(nil, 200, 200, 50, 50, {0, 1, 0, 1}, {50, 50, 50, 50}, {2, 2, 2, 2}, true)

CAMERA Class

  • c_camera.get_position(){x: INT, y: INT, z: INT}
  • c_camera.set_fov(float)
  • c_camera.look_at({x, y, z}, float) — поворот камеры с плавностью[1]

PLAYER Class

  • c_player.list() → таблица игроков
  • c_player.target_list() → таблица целей для аимбота
  • c_player.has_aim_target()boolean

Player Methods/Properties

  • player:get_position(){x, y, z}
  • player:get_cloud_position(){x, y, z}
  • player:is_friend()boolean
  • player:set_friend(boolean)boolean
  • Свойства: name, visible, model_visible, health, max_health, armor, max_armor, netid, is_local
  • player.role → таблица роли (id, name, color {r,g,b,a}, color_hex, is_alive, is_scp, is_human)

Role List

role_undefined, role_173, role_class_d, role_spectator, role_106, role_ntf_scientist,
role_049, role_scientist, role_079, role_chaos_conscript, role_096, role_0492,
role_ntf_sergeant, role_ntf_captain, role_ntf_private, role_tutorial, role_guard,
role_939, role_custom, role_chaos_rifleman, role_chaos_repressor, role_chaos_marauder,
role_overwatch, role_filmmaker, role_3114, role_flamingo, role_alphaflamingo, role_zombieflamingo

ITEM Class

  • c_item.list() → таблица предметов
  • Свойства: position, icon, item_id

MENU Class

  • c_menu.get_position(int){x, y, width, height}
  • c_menu.register_category(ln_table) → категория
  • category:register_box(ln_table) → бокс
  • box:register_feature(int_uid, ln_table, e_bool, e_checkbox, int_min, int_max, int_default)

Константы: e_bool, e_int, e_float, e_color; e_checkbox, e_slider, e_dropbox, e_colorpicker, e_label, e_button; e_en, e_ru, e_cn[1]

LANGUAGE Class

  • c_ln.register_new() → таблица
  • item:set(e_en, "text")

INPUT Class

  • c_input.get_key(int) → число

IL2CPP Class

  • c_il2cpp.find_method(class_name, namespace, method_name, paramcount = -1) → указатель
    Пример: c_il2cpp.find_method("Texture", "UnityEngine", ".ctor", -1)

TEXTURE Class

  • c_texture.create("name", width, height) → таблица
  • c_texture.set_poster(texture_table)
  • Свойства/методы: width, height, texture (pointer), set_pixel(x, y, color), apply()

Ожидайте обновлений.[1]

1 2 3 4 5 6 7 8 9 10

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published