PaladinScrpt Posted November 1, 2020 Share Posted November 1, 2020 (edited) GUIEditor = { tab = {}, label = {}, checkbox = {}, edit = {}, gridlist = {}, window = {}, button = {}, memo = {} } function admin() wnd = guiCreateWindow(480, 240, 960, 600, "Admin-Panel v1.1 [ by PALADIN ] ", false) guiWindowSetSizable(wnd, false) TabNames = guiCreateTabPanel(9, 25, 941, 565, false,wnd) GUIEditor.tab[1] = guiCreateTab("Player info", TabNames) GUIEditor.tab[2] = guiCreateTab("Players", TabNames) GUIEditor.tab[3] = guiCreateTab("Fractions", TabNames) GUIEditor.tab[4] = guiCreateTab("Clans", TabNames) GUIEditor.label[1] = guiCreateLabel(20, 20, 250, 20, "Список кланов", false, GUIEditor.tab[4]) GUIEditor.gridlist[1] = guiCreateGridList(20, 40, 250, 250, false, GUIEditor.tab[4]) guiGridListAddColumn(GUIEditor.gridlist[1], "Название", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "Рейтинг", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "Члены", 0.3) GUIEditor.button[1] = guiCreateButton(20, 300, 250, 50, "Изменить рейтинг", false, GUIEditor.tab[4]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(20, 360, 250, 50, "Заблокировать клан", false, GUIEditor.tab[4]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") GUIEditor.button[3] = guiCreateButton(20, 420, 250, 50, "Удалить клан", false, GUIEditor.tab[4]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA") GUIEditor.label[2] = guiCreateLabel(290, 20, 250, 20, "Список членов клана", false, GUIEditor.tab[4]) GUIEditor.memo[1] = guiCreateMemo(630, 40, 300, 200, "", false, GUIEditor.tab[4]) GUIEditor.button[4] = guiCreateButton(630, 260, 300, 50, "Выгнать из банды", false, GUIEditor.tab[4]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA") GUIEditor.button[5] = guiCreateButton(630, 320, 300, 50, "Выгнать из клана", false, GUIEditor.tab[4]) guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFAAAAAA") GUIEditor.button[6] = guiCreateButton(630, 380, 300, 50, "Блокировка банд", false, GUIEditor.tab[4]) guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFAAAAAA") GUIEditor.gridlist[2] = guiCreateGridList(291, 41, 329, 471, false, GUIEditor.tab[4]) guiGridListAddColumn(GUIEditor.gridlist[2], "UID", 0.2) guiGridListAddColumn(GUIEditor.gridlist[2], "Имя", 0.2) guiGridListAddColumn(GUIEditor.gridlist[2], "Ранг", 0.2) guiGridListAddColumn(GUIEditor.gridlist[2], "Онлайн", 0.2) GUIEditor.tab[5] = guiCreateTab("Events", TabNames) GUIEditor.label[3] = guiCreateLabel(20, 20, 360, 25, "Название ивента:", false, GUIEditor.tab[5]) GUIEditor.edit[1] = guiCreateEdit(20, 45, 250, 25, "", false, GUIEditor.tab[5]) GUIEditor.label[4] = guiCreateLabel(20, 90, 360, 25, "Количество игроков:", false, GUIEditor.tab[5]) GUIEditor.edit[2] = guiCreateEdit(20, 115, 250, 25, "", false, GUIEditor.tab[5]) GUIEditor.label[5] = guiCreateLabel(20, 160, 360, 25, "Время работы телепорта (в секундах):", false, GUIEditor.tab[5]) GUIEditor.edit[3] = guiCreateEdit(20, 185, 250, 25, "", false, GUIEditor.tab[5]) GUIEditor.button[7] = guiCreateButton(20, 230, 250, 35, "Начать ивент", false, GUIEditor.tab[5]) guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FFAAAAAA") GUIEditor.button[8] = guiCreateButton(20, 270, 250, 35, "Завершить ивент", false, GUIEditor.tab[5]) guiSetProperty(GUIEditor.button[8], "NormalTextColour", "FFAAAAAA") GUIEditor.button[9] = guiCreateButton(20, 310, 250, 35, "Здоровье", false, GUIEditor.tab[5]) guiSetProperty(GUIEditor.button[9], "NormalTextColour", "FFAAAAAA") GUIEditor.button[10] = guiCreateButton(20, 350, 250, 35, "Броня", false, GUIEditor.tab[5]) guiSetProperty(GUIEditor.button[10], "NormalTextColour", "FFAAAAAA") GUIEditor.button[11] = guiCreateButton(20, 390, 250, 35, "Еда", false, GUIEditor.tab[5]) guiSetProperty(GUIEditor.button[11], "NormalTextColour", "FFAAAAAA") GUIEditor.button[12] = guiCreateButton(20, 430, 250, 35, "Заморозить", false, GUIEditor.tab[5]) guiSetProperty(GUIEditor.button[12], "NormalTextColour", "FFAAAAAA") GUIEditor.button[13] = guiCreateButton(20, 470, 250, 35, "Разморозить", false, GUIEditor.tab[5]) guiSetProperty(GUIEditor.button[13], "NormalTextColour", "FFAAAAAA") GUIEditor.gridlist[3] = guiCreateGridList(290, 20, 360, 485, false, GUIEditor.tab[5]) guiGridListAddColumn(GUIEditor.gridlist[3], "№", 0.3) guiGridListAddColumn(GUIEditor.gridlist[3], "userID", 0.3) guiGridListAddColumn(GUIEditor.gridlist[3], "Имя", 0.3) GUIEditor.label[6] = guiCreateLabel(666, 20, 265, 24, "Ctrl + ЛКМ чтобы выделить сразу несколько", false, GUIEditor.tab[5]) GUIEditor.button[14] = guiCreateButton(666, 55, 250, 35, "Убрать из ивента", false, GUIEditor.tab[5]) guiSetProperty(GUIEditor.button[14], "NormalTextColour", "FFAAAAAA") GUIEditor.button[15] = guiCreateButton(666, 100, 250, 35, "Обновить список", false, GUIEditor.tab[5]) guiSetProperty(GUIEditor.button[15], "NormalTextColour", "FFAAAAAA") GUIEditor.button[16] = guiCreateButton(666, 150, 250, 35, "Убрать выделение", false, GUIEditor.tab[5]) guiSetProperty(GUIEditor.button[16], "NormalTextColour", "FFAAAAAA") GUIEditor.button[17] = guiCreateButton(666, 200, 250, 35, "Выделить все", false, GUIEditor.tab[5]) guiSetProperty(GUIEditor.button[17], "NormalTextColour", "FFAAAAAA") GUIEditor.tab[6] = guiCreateTab("Banlist", TabNames) GUIEditor.label[7] = guiCreateLabel(20, 20, 60, 25, "Фильтр:", false, GUIEditor.tab[6]) GUIEditor.edit[4] = guiCreateEdit(80, 20, 150, 25, "", false, GUIEditor.tab[6]) GUIEditor.button[18] = guiCreateButton(260, 18, 100, 29, "Обновить", false, GUIEditor.tab[6]) guiSetProperty(GUIEditor.button[18], "NormalTextColour", "FFAAAAAA") GUIEditor.gridlist[4] = guiCreateGridList(20, 60, 500, 440, false, GUIEditor.tab[6]) guiGridListAddColumn(GUIEditor.gridlist[4], "UID", 0.3) guiGridListAddColumn(GUIEditor.gridlist[4], "Имя", 0.3) guiGridListAddColumn(GUIEditor.gridlist[4], "Истекает через", 0.3) GUIEditor.memo[2] = guiCreateMemo(530, 60, 240, 200, "", false, GUIEditor.tab[6]) GUIEditor.button[19] = guiCreateButton(590, 310, 120, 40, "Разбанить", false, GUIEditor.tab[6]) guiSetProperty(GUIEditor.button[19], "NormalTextColour", "FFAAAAAA") GUIEditor.tab[7] = guiCreateTab("Banlist Serial", TabNames) GUIEditor.label[8] = guiCreateLabel(20, 20, 130, 25, "Поиск по серийному:", false, GUIEditor.tab[7]) GUIEditor.edit[5] = guiCreateEdit(160, 20, 250, 25, "", false, GUIEditor.tab[7]) GUIEditor.button[20] = guiCreateButton(430, 18, 110, 29, "Найти", false, GUIEditor.tab[7]) guiSetProperty(GUIEditor.button[20], "NormalTextColour", "FFAAAAAA") GUIEditor.button[21] = guiCreateButton(550, 18, 110, 29, "Обновить", false, GUIEditor.tab[7]) guiSetProperty(GUIEditor.button[21], "NormalTextColour", "FFAAAAAA") GUIEditor.button[22] = guiCreateButton(680, 18, 110, 29, "Очистить поля", false, GUIEditor.tab[7]) guiSetProperty(GUIEditor.button[22], "NormalTextColour", "FFAAAAAA") GUIEditor.label[9] = guiCreateLabel(20, 60, 120, 25, "Бан по серийному:", false, GUIEditor.tab[7]) GUIEditor.edit[6] = guiCreateEdit(160, 60, 250, 25, "", false, GUIEditor.tab[7]) GUIEditor.button[23] = guiCreateButton(430, 58, 100, 29, "Заблокировать", false, GUIEditor.tab[7]) guiSetProperty(GUIEditor.button[23], "NormalTextColour", "FFAAAAAA") GUIEditor.button[24] = guiCreateButton(550, 58, 110, 29, "Разблокировать", false, GUIEditor.tab[7]) guiSetProperty(GUIEditor.button[24], "NormalTextColour", "FFAAAAAA") GUIEditor.gridlist[5] = guiCreateGridList(20, 100, 620, 400, false, GUIEditor.tab[7]) guiGridListAddColumn(GUIEditor.gridlist[5], "SERIAL", 0.1) guiGridListAddColumn(GUIEditor.gridlist[5], "DATE", 0.1) guiGridListAddColumn(GUIEditor.gridlist[5], "S", 0.1) guiGridListAddColumn(GUIEditor.gridlist[5], "S BAN", 0.1) guiGridListAddColumn(GUIEditor.gridlist[5], "ADMIN ID", 0.1) guiGridListAddColumn(GUIEditor.gridlist[5], "ADMIN NICK", 0.1) guiGridListAddColumn(GUIEditor.gridlist[5], "REASON", 0.1) GUIEditor.tab[8] = guiCreateTab("Accounts", TabNames) GUIEditor.tab[9] = guiCreateTab("Admins", TabNames) GUIEditor.gridlist[6] = guiCreateGridList(20, 20, 900, 450, false, GUIEditor.tab[9]) guiGridListAddColumn(GUIEditor.gridlist[6], "UserID", 0.1) guiGridListAddColumn(GUIEditor.gridlist[6], "Nickname", 0.1) guiGridListAddColumn(GUIEditor.gridlist[6], "Access Level", 0.1) guiGridListAddColumn(GUIEditor.gridlist[6], "Time", 0.1) guiGridListAddColumn(GUIEditor.gridlist[6], "Achiev", 0.1) guiGridListAddColumn(GUIEditor.gridlist[6], "Rating", 0.1) guiGridListAddColumn(GUIEditor.gridlist[6], "Payout", 0.1) guiGridListAddColumn(GUIEditor.gridlist[6], "Online", 0.1) GUIEditor.button[25] = guiCreateButton(2, 466, 189, 15, "", false, GUIEditor.gridlist[6]) guiSetProperty(GUIEditor.button[25], "NormalTextColour", "FFAAAAAA") GUIEditor.button[26] = guiCreateButton(20, 480, 150, 50, "Обнулить права", false, GUIEditor.tab[9]) guiSetProperty(GUIEditor.button[26], "NormalTextColour", "FFAAAAAA") GUIEditor.button[27] = guiCreateButton(200, 480, 150, 50, "Изменить права", false, GUIEditor.tab[9]) guiSetProperty(GUIEditor.button[27], "NormalTextColour", "FFAAAAAA") GUIEditor.button[28] = guiCreateButton(380, 480, 150, 50, "Изменить зарплату", false, GUIEditor.tab[9]) guiSetProperty(GUIEditor.button[28], "NormalTextColour", "FFAAAAAA") GUIEditor.button[29] = guiCreateButton(560, 480, 150, 50, "Обновить", false, GUIEditor.tab[9]) guiSetProperty(GUIEditor.button[29], "NormalTextColour", "FFAAAAAA") GUIEditor.tab[10] = guiCreateTab("General", TabNames) GUIEditor.checkbox[1] = guiCreateCheckBox(40, 20, 200, 30, "Отображать блипы игроков", false, false, GUIEditor.tab[10]) GUIEditor.checkbox[2] = guiCreateCheckBox(40, 50, 200, 30, "Отображать чат кланов", false, false, GUIEditor.tab[10]) GUIEditor.tab[11] = guiCreateTab("Reports", TabNames) GUIEditor.tab[12] = guiCreateTab("Faction reports", TabNames) GUIEditor.tab[13] = guiCreateTab("Work info", TabNames) end ) function open() triggerServerEvent("isVip",localPlayer) end bindKey("F2","down",open) addEvent("openWindowVip",true) addEventHandler("openWindowVip", root, function () if guiGetVisible(wnd) then guiSetVisible(wnd,false) showCursor(false) else guiSetVisible(wnd,true) showCursor(true) end end) Edited November 1, 2020 by PaladinScrpt Link to comment
DNL291 Posted November 1, 2020 Share Posted November 1, 2020 Topic moved to Russian section. @PaladinScrpt Link to comment
lime|sg Posted December 4, 2020 Share Posted December 4, 2020 (edited) У тебя инициализация элементов GUI находится внутри функции admin. Для начала, сделай инициализацию вне функции, либо запускай всю функцию, чтобы создать всё дерево элементов твоего окна (не советую, т.к. лучше создать всё один раз) PS: используй дебаг, чтобы отслеживать ошибки. Здесь, возможно, ещё и проблемы со скобками. Edited December 4, 2020 by lime|sg Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now