Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local showLogin = false
- local showPanel = false
- local loggedIn = false
- local admins = {}
- local adminrangs = {"Admin 1", "Admin 2", "Admin 3", "Admin 4", "Admin 5", "FőAdmin", "SzuperAdmin", "Tulajdonos", "Fejlesztő", "VezérFejlesztő", "Rendszergazda"}
- local admincolors = {"#acd373", "#acd373", "#acd373", "#acd373", "#acd373", "#EFAD5F", "#630460", "#ED1C24", "#32B3EF", "#32B3EF", "#ca5454"}
- local selectedAdmin = 0
- local selectedProvisions = 0
- local clickCount = false
- local bans = {}
- function getBansClient(table)
- if (table) then
- bans = {}
- bans = table
- end
- end
- addEvent("getBansClient", true)
- addEventHandler("getBansClient", getRootElement(), getBansClient)
- local kicks = {}
- function getKicksClient(table)
- if (table) then
- kicks = {}
- kicks = table
- end
- end
- addEvent("getKicksClient", true)
- addEventHandler("getKicksClient", getRootElement(), getKicksClient)
- local jails = {}
- function getJailsClient(table)
- if (table) then
- jails = {}
- jails = table
- end
- end
- addEvent("getJailsClient", true)
- addEventHandler("getJailsClient", getRootElement(), getJailsClient)
- local maxShow = 8
- local scrollingData = 0
- local font = dxCreateFont("files/Roboto.ttf", 16)
- local fontg = guiCreateFont("files/Roboto.ttf", 13)
- local scSz = {guiGetScreenSize()}
- local box = {400, 180}
- local boxPosition = {(scSz[1]/2)-(box[1]/2), (scSz[2]/2-box[2]/2)}
- local panel = {1000, 630}
- local panelPosition = {(scSz[1]/2)-(panel[1]/2), (scSz[2]/2-panel[2]/2)}
- function checkCursor()
- if not guiGetInputEnabled() and not isMTAWindowActive() and isCursorShowing( ) then
- return true
- else
- return false
- end
- end
- function drawLoginPanel()
- if showLogin then
- roundedRectangle(boxPosition[1], boxPosition[2], box[1], box[2], tocolor(0,0,0,180))
- dxDrawRectangle(boxPosition[1],boxPosition[2], box[1], 30, tocolor(0,0,0,180))
- dxDrawText("#ffffffSan#acd373MTA #598ED7- Admin #ffffff- Bejelentkezés", boxPosition[1]+5, boxPosition[2]+3, 0, 0, tocolor(255, 255, 255, 255),0.8,font,"left","top", false, false, false, true)
- if isInSlot(boxPosition[1]+box[1]-30, boxPosition[2]+3, 20, 20) then
- dxDrawImage(boxPosition[1]+box[1]-30, boxPosition[2]+4, 20, 20, "files/cancel.png", 0,0,0, tocolor(202,84,84,200))
- --dxDrawText("#ca5454X", boxPosition[1]+box[1]-13, boxPosition[2]+1, 20, 20, tocolor(255, 255, 255, 255),0.7,font,"left","top", false, false, false, true)
- else
- dxDrawImage(boxPosition[1]+box[1]-30, boxPosition[2]+4, 20, 20, "files/cancel.png", 0,0,0, tocolor(255,255,255,200))
- --dxDrawText("#ffffffX", boxPosition[1]+box[1]-13, boxPosition[2]+1, 20, 20, tocolor(255, 255, 255, 255),0.7,font,"left","top", false, false, false, true)
- end
- dxDrawText("Felhasználónév:", boxPosition[1]+5, boxPosition[2]+47, 0, 0, tocolor(255, 255, 255, 255),0.8,font,"left","top", false, false, false, true)
- dxDrawText("Jelszó:", boxPosition[1]+5, boxPosition[2]+97, 0, 0, tocolor(255, 255, 255, 255),0.8,font,"left","top", false, false, false, true)
- dxDrawRectangle(boxPosition[1]+167, boxPosition[2]+37, 225, 35, tocolor(99,99,99,200))
- dxDrawRectangle(boxPosition[1]+167, boxPosition[2]+87, 225, 35, tocolor(99,99,99,200))
- if isInSlot(boxPosition[1]+87,boxPosition[2]+137, 225, 35) then
- dxDrawRectangle(boxPosition[1]+87,boxPosition[2]+137, 225, 35, tocolor(89,142,215, 190))
- dxDrawText("Bejelentkezés", boxPosition[1]+127,boxPosition[2]+140, 190, 30, tocolor(0,0,0,200),1,font,"left","top", false, false, false, true)
- else
- dxDrawRectangle(boxPosition[1]+87,boxPosition[2]+137, 225, 35, tocolor(89,142,215, 170))
- dxDrawText("Bejelentkezés", boxPosition[1]+127,boxPosition[2]+140, 190, 30, tocolor(0,0,0,200),1,font,"left","top", false, false, false, true)
- end
- end
- end
- addEventHandler("onClientRender", getRootElement(), drawLoginPanel)
- function drawAdminPanel()
- if showPanel then
- roundedRectangle(panelPosition[1], panelPosition[2], panel[1], panel[2], tocolor(0,0,0,180))
- dxDrawRectangle(panelPosition[1],panelPosition[2], panel[1], 30, tocolor(0,0,0,180))
- dxDrawText("#ffffffSan #acd373MTA #598ED7- Adminpanel", panelPosition[1]+5, panelPosition[2]+3, 0, 0, tocolor(255, 255, 255, 255),0.8,font,"left","top", false, false, false, true)
- if isInSlot(panelPosition[1]+panel[1]-30, panelPosition[2]+3, 20, 20) then
- dxDrawImage(panelPosition[1]+panel[1]-30, panelPosition[2]+4, 20, 20, "files/cancel.png", 0,0,0, tocolor(202,84,84,200))
- else
- dxDrawImage(panelPosition[1]+panel[1]-30, panelPosition[2]+4, 20, 20, "files/cancel.png", 0,0,0, tocolor(255,255,255,200))
- end
- if loggedIn then
- dxDrawRectangle(panelPosition[1]+5, panelPosition[2]+70, 495, 25, tocolor(0,0,0,200))
- dxDrawRectangle(panelPosition[1]+5, panelPosition[2]+95, 490, 25, tocolor(0,0,0,130))
- dxDrawRectangle(panelPosition[1]+5, panelPosition[2]+120, 490, 25, tocolor(0,0,0,155))
- dxDrawRectangle(panelPosition[1]+5, panelPosition[2]+145, 490, 25, tocolor(0,0,0,130))
- dxDrawRectangle(panelPosition[1]+5, panelPosition[2]+170, 490, 25, tocolor(0,0,0,155))
- dxDrawRectangle(panelPosition[1]+5, panelPosition[2]+195, 490, 25, tocolor(0,0,0,130))
- dxDrawRectangle(panelPosition[1]+5, panelPosition[2]+220, 490, 25, tocolor(0,0,0,155))
- dxDrawRectangle(panelPosition[1]+5, panelPosition[2]+245, 490, 25, tocolor(0,0,0,130))
- dxDrawRectangle(panelPosition[1]+495, panelPosition[2]+95, 5, 175, tocolor(0,0,0,255))
- dxDrawText("Adminnév", panelPosition[1]+7, panelPosition[2]+74, 607, 20, tocolor(89,142,215, 240), 0.7, font,"left","top",false,false,false,true)
- dxDrawText("Admin szint", panelPosition[1]+100, panelPosition[2]+74, 607, 20, tocolor(89,142,215, 240), 0.7, font,"left","top",false,false,false,true)
- dxDrawRectangle(panelPosition[1]+500, panelPosition[2]+70, 495, 25, tocolor(0,0,0,200))
- dxDrawRectangle(panelPosition[1]+500, panelPosition[2]+95, 490, 25, tocolor(0,0,0,130))
- dxDrawRectangle(panelPosition[1]+500, panelPosition[2]+120, 490, 25, tocolor(0,0,0,155))
- dxDrawRectangle(panelPosition[1]+500, panelPosition[2]+145, 490, 25, tocolor(0,0,0,130))
- dxDrawRectangle(panelPosition[1]+500, panelPosition[2]+170, 490, 25, tocolor(0,0,0,155))
- dxDrawRectangle(panelPosition[1]+500, panelPosition[2]+195, 490, 25, tocolor(0,0,0,130))
- dxDrawRectangle(panelPosition[1]+500, panelPosition[2]+220, 490, 25, tocolor(0,0,0,155))
- dxDrawRectangle(panelPosition[1]+500, panelPosition[2]+245, 490, 25, tocolor(0,0,0,130))
- dxDrawRectangle(panelPosition[1]+990, panelPosition[2]+95, 5, 175, tocolor(0,0,0,255))
- if selectedProvisions == 1 then
- dxDrawText("ID", panelPosition[1]+502, panelPosition[2]+74, 607, 20, tocolor(89,142,215, 240), 0.7, font,"left","top",false,false,false,true)
- dxDrawText("Játékos", panelPosition[1]+565, panelPosition[2]+74, 607, 20, tocolor(89,142,215, 240), 0.7, font,"left","top",false,false,false,true)
- dxDrawText("Indok", panelPosition[1]+750, panelPosition[2]+74, 607, 20, tocolor(89,142,215, 240), 0.7, font,"left","top",false,false,false,true)
- for k, v in ipairs(bans) do
- if v[6] == getElementData(selectedAdmin, "dbid") then
- dxDrawText("#ffffff" .. v[1], panelPosition[1]+502, panelPosition[2]+74+25*k, 607, 20, tocolor(89,142,215, 240), 0.7, font,"left","top",false,false,false,true)
- dxDrawText("#ffffff" .. v[9], panelPosition[1]+565, panelPosition[2]+74+25*k, 607, 20, tocolor(89,142,215, 240), 0.7, font,"left","top",false,false,false,true)
- dxDrawText("#ffffff" .. v[7], panelPosition[1]+750, panelPosition[2]+74+25*k, 607, 20, tocolor(89,142,215, 240), 0.7, font,"left","top",false,false,false,true)
- end
- end
- elseif selectedProvisions == 2 then
- dxDrawText("ID", panelPosition[1]+502, panelPosition[2]+74, 607, 20, tocolor(89,142,215, 240), 0.7, font,"left","top",false,false,false,true)
- dxDrawText("Játékos", panelPosition[1]+565, panelPosition[2]+74, 607, 20, tocolor(89,142,215, 240), 0.7, font,"left","top",false,false,false,true)
- dxDrawText("Indok", panelPosition[1]+750, panelPosition[2]+74, 607, 20, tocolor(89,142,215, 240), 0.7, font,"left","top",false,false,false,true)
- for k, v in ipairs(kicks) do
- if v[3] == getElementData(selectedAdmin, "dbid") then
- dxDrawText("#ffffff" .. v[1], panelPosition[1]+502, panelPosition[2]+74+25*k, 607, 20, tocolor(89,142,215, 240), 0.7, font,"left","top",false,false,false,true)
- dxDrawText("#ffffff" .. v[7], panelPosition[1]+565, panelPosition[2]+74+25*k, 607, 20, tocolor(89,142,215, 240), 0.7, font,"left","top",false,false,false,true)
- dxDrawText("#ffffff" .. v[4], panelPosition[1]+750, panelPosition[2]+74+25*k, 607, 20, tocolor(89,142,215, 240), 0.7, font,"left","top",false,false,false,true)
- end
- end
- elseif selectedProvisions == 3 then
- dxDrawText("ID", panelPosition[1]+502, panelPosition[2]+74, 607, 20, tocolor(89,142,215, 240), 0.7, font,"left","top",false,false,false,true)
- dxDrawText("Játékos", panelPosition[1]+565, panelPosition[2]+74, 607, 20, tocolor(89,142,215, 240), 0.7, font,"left","top",false,false,false,true)
- dxDrawText("Indok", panelPosition[1]+750, panelPosition[2]+74, 607, 20, tocolor(89,142,215, 240), 0.7, font,"left","top",false,false,false,true)
- dxDrawText("Hossz", panelPosition[1]+900, panelPosition[2]+74, 607, 20, tocolor(89,142,215, 240), 0.7, font,"left","top",false,false,false,true)
- for k, v in ipairs(jails) do
- if v[7] == getElementData(selectedAdmin, "char:anick") then
- dxDrawText("#ffffff" .. v[1], panelPosition[1]+502, panelPosition[2]+74+25*k, 607, 20, tocolor(89,142,215, 240), 0.7, font,"left","top",false,false,false,true)
- dxDrawText("#ffffff" .. v[8], panelPosition[1]+565, panelPosition[2]+74+25*k, 607, 20, tocolor(89,142,215, 240), 0.7, font,"left","top",false,false,false,true)
- dxDrawText("#ffffff" .. v[4], panelPosition[1]+750, panelPosition[2]+74+25*k, 607, 20, tocolor(89,142,215, 240), 0.7, font,"left","top",false,false,false,true)
- dxDrawText("#ffffff" .. v[5] .. " perc", panelPosition[1]+900, panelPosition[2]+74+25*k, 607, 20, tocolor(89,142,215, 240), 0.7, font,"left","top",false,false,false,true)
- end
- end
- end
- dxDrawRectangle(panelPosition[1], panelPosition[2]+315, panel[1], 30, tocolor(0,0,0,155))
- if selectedAdmin == 0 then
- dxDrawText("Nincs kiválasztva", panelPosition[1]+panel[1]/2-dxGetTextWidth("Nincs kiválasztva", 0.8, font)/2, panelPosition[2]+320, 607, 20, tocolor(255,255,255,255), 0.8, font)
- else
- dxDrawText("" .. getElementData(selectedAdmin, "char:anick") .. " adatai", panelPosition[1]+panel[1]/2-dxGetTextWidth("" .. getElementData(selectedAdmin, "char:anick") .. " adatai", 0.8, font)/2, panelPosition[2]+320, 607, 20, tocolor(255,255,255,255), 0.8, font)
- end
- local adminGather = 0
- for k,v in ipairs(admins) do
- if (k > scrollingData and adminGather < maxShow) then
- adminGather = adminGather + 1
- dxDrawText("#ffffff" .. getElementData(v[1], "char:anick") .. "", panelPosition[1]+7, panelPosition[2]+74+25*adminGather, 607, 20, tocolor(89,142,215, 240), 0.7, font,"left","top",false,false,false,true)
- dxDrawText("#ffffff" .. adminrangs[getElementData(v[1], "acc:admin")] .. "", panelPosition[1]+100, panelPosition[2]+74+25*adminGather, 607, 20, tocolor(89,142,215, 240), 0.7, font,"left","top",false,false,false,true)
- end
- end
- if selectedAdmin ~= 0 then
- dxDrawText("#ffffffAdminnick: #acd373" .. getElementData(selectedAdmin, "char:anick") .. "", panelPosition[1]+7, panelPosition[2]+365, 607, 20, tocolor(89,142,215, 240), 0.8, font,"left","top",false,false,false,true)
- dxDrawText("#ffffffJátszott percek: #acd373" .. getElementData(selectedAdmin, "char:playedTime") .. " perc", panelPosition[1]+7, panelPosition[2]+430, 607, 20, tocolor(89,142,215, 240), 0.8, font,"left","top",false,false,false,true)
- dxDrawText("#ffffffAdminduty percek: #acd373" .. getElementData(selectedAdmin, "char:name") .. " perc", panelPosition[1]+7, panelPosition[2]+445, 607, 20, tocolor(89,142,215, 240), 0.8, font,"left","top",false,false,false,true)
- if isInSlot(panelPosition[1]+80,panelPosition[2]+410, 55, 20) then
- dxDrawRectangle(panelPosition[1]+80,panelPosition[2]+410, 55, 20, tocolor(89,142,215, 190))
- dxDrawText("BANjai", panelPosition[1]+80,panelPosition[2]+410, 55, 20, tocolor(0,0,0,240),0.8, font,"left","top", false, false, false, true)
- if getKeyState("mouse1") and not clickCount then
- selectedProvisions = 1
- bans = {}
- triggerServerEvent("getBansServer", root)
- clickCounter()
- end
- else
- dxDrawRectangle(panelPosition[1]+80,panelPosition[2]+410, 55, 20, tocolor(89,142,215, 170))
- dxDrawText("BANjai", panelPosition[1]+80,panelPosition[2]+410, 55, 20, tocolor(0,0,0,240),0.8,font,"left","top", false, false, false, true)
- end
- if isInSlot(panelPosition[1]+140,panelPosition[2]+410, 57, 20) then
- dxDrawRectangle(panelPosition[1]+140,panelPosition[2]+410, 57, 20, tocolor(89,142,215, 190))
- dxDrawText("KICKjei", panelPosition[1]+140,panelPosition[2]+410, 57, 20, tocolor(0,0,0,240),0.8, font,"left","top", false, false, false, true)
- if getKeyState("mouse1") and not clickCount then
- selectedProvisions = 2
- kicks = {}
- triggerServerEvent("getKicksServer", root)
- clickCounter()
- end
- else
- dxDrawRectangle(panelPosition[1]+140,panelPosition[2]+410, 57, 20, tocolor(89,142,215, 170))
- dxDrawText("KICKjei", panelPosition[1]+140,panelPosition[2]+410, 57, 20, tocolor(0,0,0,240),0.8,font,"left","top", false, false, false, true)
- end
- if isInSlot(panelPosition[1]+200,panelPosition[2]+410, 57, 20) then
- dxDrawRectangle(panelPosition[1]+200,panelPosition[2]+410, 57, 20, tocolor(89,142,215, 190))
- dxDrawText("JAILjai", panelPosition[1]+200,panelPosition[2]+410, 57, 20, tocolor(0,0,0,240),0.8, font,"left","top", false, false, false, true)
- if getKeyState("mouse1") and not clickCount then
- selectedProvisions = 3
- jails = {}
- triggerServerEvent("getJailsServer", root)
- clickCounter()
- end
- else
- dxDrawRectangle(panelPosition[1]+200,panelPosition[2]+410, 57, 20, tocolor(89,142,215, 170))
- dxDrawText("JAILjai", panelPosition[1]+200,panelPosition[2]+410, 57, 20, tocolor(0,0,0,240),0.8,font,"left","top", false, false, false, true)
- end
- end
- end
- end
- end
- addEventHandler("onClientRender", getRootElement(), drawAdminPanel)
- function clickCounter()
- clickCount = true
- setTimer(function()
- clickCount = false
- end, 500, 1)
- end
- function OnClick(button, state, x,y)
- if showLogin then
- if button == "left" and state == "down" then
- if showLogin and isInSlot(boxPosition[1]+box[1]-30, boxPosition[2]+4, 20, 20) then
- showLogin = false
- setElementData(localPlayer, "toggleInterface", false)
- removeEventHandler("onClientRender", getRootElement(), drawLoginPanel)
- if isElement(username) then
- destroyElement(username)
- end
- if isElement(usernameedit) then
- destroyElement(usernameedt)
- end
- if isElement(password) then
- destroyElement(password)
- end
- if isElement(passwordedit) then
- destroyElement(passwordedit)
- end
- admins = nil
- elseif showLogin and isInSlot(boxPosition[1]+87,boxPosition[2]+137, 225, 35) then
- validateAdminLogin()
- end
- end
- elseif showPanel then
- if button == "left" and state == "down" then
- if showPanel and isInSlot(panelPosition[1]+panel[1]-30, panelPosition[2]+3, 20, 20) then
- showPanel = false
- setElementData(localPlayer, "toggleInterface", false)
- removeEventHandler("onClientRender", getRootElement(), drawAdminPanel)
- admins = {}
- else
- end
- end
- end
- end
- addEventHandler("onClientClick", getRootElement(), OnClick)
- function OnClickSelect(button, state, x,y)
- if button == "left" and state == "down" then
- if showPanel then
- local adminGather = 0
- for k,v in ipairs(admins) do
- if (k > scrollingData and adminGather < maxShow) then
- adminGather = adminGather + 1
- if showPanel and (isInSlot(panelPosition[1]+7, panelPosition[2]+74+25*adminGather, 490, 25)) then
- selectedAdmin = v[1]
- --outputChatBox(getElementData(v[1], "anick"))
- end
- end
- end
- end
- end
- end
- addEventHandler("onClientClick", getRootElement(), OnClickSelect)
- function isInSlot(xS,yS,wS,hS)
- if(isCursorShowing()) then
- XY = {guiGetScreenSize()}
- local cursorX, cursorY = getCursorPosition()
- cursorX, cursorY = cursorX*XY[1], cursorY*XY[2]
- if(dobozbaVan(xS,yS,wS,hS, cursorX, cursorY)) then
- return true
- else
- return false
- end
- end
- end
- function dobozbaVan(dX, dY, dSZ, dM, eX, eY)
- if(eX >= dX and eX <= dX+dSZ and eY >= dY and eY <= dY+dM) then
- return true
- else
- return false
- end
- end
- function showAdminPanel()
- if loggedIn == false then
- showLogin = true
- showChat = false
- addEventHandler("onClientRender", getRootElement(), drawLoginPanel)
- username = guiCreateLabel(boxPosition[1]+170, boxPosition[2]+42, 225, 35, "", false)
- guiSetFont(username, fontg)
- usernameedit = guiCreateEdit(boxPosition[1]+167, boxPosition[2]+37, 225, 35, "", false)
- guiSetAlpha(usernameedit, 0)
- addEventHandler("onClientGUIChanged", usernameedit, function(element)
- guiSetText( username, guiGetText(usernameedit))
- end)
- password = guiCreateLabel(boxPosition[1]+170, boxPosition[2]+97, 225, 35, "", false)
- guiSetFont(password, fontg)
- passwordedit = guiCreateEdit(boxPosition[1]+167, boxPosition[2]+87, 225, 35, "", false)
- guiSetAlpha(passwordedit, 0)
- guiEditSetMasked(passwordedit, true)
- addEventHandler("onClientGUIChanged", passwordedit, function(element)
- jelszo = guiGetText(passwordedit)
- local passwordasd = "", 0
- for i=1,#jelszo do
- passwordasd = passwordasd .. "*"
- end
- guiSetText(password, passwordasd)
- end)
- else
- showPanel = true
- addEventHandler("onClientRender", getRootElement(), drawAdminPanel)
- triggerServerEvent("getBansServer", root)
- triggerServerEvent("getKicksServer", root)
- triggerServerEvent("getJailsServer", root)
- for k, v in ipairs(getElementsByType("player")) do
- if getElementData(v, "acc:admin") >= 1 then
- admins[#admins+1] = {v}
- end
- end
- end
- end
- addCommandHandler("adminpanel", showAdminPanel)
- function loginAdminClient ()
- showLogin = false
- showPanel = true
- addEventHandler("onClientRender", getRootElement(), drawAdminPanel)
- triggerServerEvent("getBansServer", root)
- triggerServerEvent("getKicksServer", root)
- triggerServerEvent("getJailsServer", root)
- --triggerServerEvent("sendMessageToPolice", root, "#ffffff" .. getPlayerName(localPlayer):gsub("_", " ") .. " #ca5454(" .. getVehiclePlateText(vehicle) .. ") #ffffffbejelentkezett az #598ED7MDCbe#ffffff.")
- loggedIn = true
- for k, v in ipairs(getElementsByType("player")) do
- if getElementData(v, "acc:admin") >= 1 then
- admins[#admins+1] = {v}
- end
- end
- removeEventHandler("onClientRender", getRootElement(), drawLoginPanel)
- if isElement(username) then
- destroyElement(username)
- end
- if isElement(usernameedit) then
- destroyElement(usernameedit)
- end
- if isElement(password) then
- destroyElement(password)
- end
- if isElement(passwordedit) then
- destroyElement(passwordedit)
- end
- end
- addEvent("loginAdminClient", true)
- addEventHandler("loginAdminClient", getRootElement(), loginAdminClient)
- function validateAdminLogin()
- if not isTimer(theTimer) then
- theTimer = setTimer(function() end, 10000, 1)
- if guiGetText(usernameedit) ~= "" and guiGetText(passwordedit) ~= "" then
- triggerServerEvent("adminLoginServer", localPlayer, guiGetText(usernameedit), guiGetText(passwordedit))
- else
- outputChatBox("fail")
- end
- end
- end
- function roundedRectangle(x, y, w, h, borderColor, bgColor, postGUI)
- if (x and y and w and h) then
- if (not borderColor) then
- borderColor = tocolor(0, 0, 0, 200);
- end
- if (not bgColor) then
- bgColor = borderColor;
- end
- --> Background
- dxDrawRectangle(x, y, w, h, bgColor, postGUI);
- --> Border
- dxDrawRectangle(x-2, y, 2, h+2, tocolor(0, 0, 0, 255), postGUI);
- dxDrawRectangle(x-2, y-2, w+4, 2, tocolor(0, 0, 0, 255), postGUI);
- dxDrawRectangle(x+w, y, 2, h, tocolor(0, 0, 0, 255), postGUI);
- dxDrawRectangle(x, y+h, w+2, 2, tocolor(0, 0, 0, 255), postGUI);
- end
- end
- bindKey("mouse_wheel_down", "down",
- function()
- if showPanel then
- if scrollingData < #admins - maxShow then
- scrollingData = scrollingData + 1
- end
- end
- end
- )
- bindKey("mouse_wheel_up", "down",
- function()
- if showPanel then
- if scrollingData > 0 then
- scrollingData = scrollingData - 1
- end
- end
- end
- )
- bindKey("mouse_wheel_down", "down",
- function()
- if showPanel and selectedProvision == 1 then
- if scrollingData < #bans - maxShowBtk then
- scrollingData = scrollingData + 1
- end
- end
- end
- )
- bindKey("mouse_wheel_up", "down",
- function()
- local vehicle = getPedOccupiedVehicle(localPlayer)
- if showPanel and selectedProvision == 1 then
- if scrollingData > 0 then
- scrollingData = scrollingData - 1
- end
- end
- end
- )
- bindKey("mouse_wheel_down", "down",
- function()
- if showPanel and selectedProvision == 2 then
- if scrollingData < #kicks - maxShow then
- scrollingData = scrollingData + 1
- end
- end
- end
- )
- bindKey("mouse_wheel_up", "down",
- function()
- if showPanel and selectedProvision == 2 then
- if scrollingData > 0 then
- scrollingData = scrollingData - 1
- end
- end
- end
- )
- bindKey("mouse_wheel_down", "down",
- function()
- if showPanel and selectedProvision == 3 then
- if scrollingData < #jails - maxShow then
- scrollingData = scrollingData + 1
- end
- end
- end
- )
- bindKey("mouse_wheel_up", "down",
- function()
- if showPanel and selectedProvision == 3 then
- if scrollingData > 0 then
- scrollingData = scrollingData - 1
- end
- end
- end
- )
Add Comment
Please, Sign In to add comment