--[[ Developers: Query (darecky02@gmail.com) Resource : ac-dashboard Corypight(c) 2018 Query Note (PL): Nie moĹĽesz kopiować i udostÄ™pniać tego kodu bez mojej zgody. Zasoby zezwolone na uĹĽycie dla serwera AttractiveRPG i autora zasobu - Query . Nie stosowanie siÄ™ do notki w zasobie moĹĽe skoĹ„czyć siÄ™ procedurÄ… sÄ…dowÄ…. ]] local tick=getTickCount() local tick2=getTickCount() local sw, sh=guiGetScreenSize() local w, h=(sw/1680), (sh/1050) local font=dxCreateFont("f.ttf", 14) local fontt=dxCreateFont("f.ttf", 32) local finfo = dxCreateFont("f.ttf", 15) local finfo2 = dxCreateFont("f.ttf", 12) local finfo3 = dxCreateFont("f.ttf", 10) local navigation=false local nav1=false local nav2=false local nav3=false local nav4=false tabelaaut={} tabelapunish={} selected={} selected.info=false selected.punish=false selected.cars=false selected.settings=false function isMouseIn(psx,psy,pssx,pssy,abx,aby) if not isCursorShowing() then return end cx,cy=getCursorPosition() cx,cy=cx*sw,cy*sh if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then return true,cx,cy else return false end end addEventHandler("onClientRender", getRootElement(), function() if navigation == true then local a2=interpolateBetween(0, 0, 0, 255, 0, 0, (getTickCount()-tick2)/500, "Linear") dxDrawImage(431*w, 243*h, 800*w, 500*h, "i/bg.png", 0, 0, 0, tocolor(255, 255, 255, a2), false) exports["srpg-blurr"]:dxDrawBluredRectangle(0, 0, sw, sh, tocolor( 120, 120, 120, a2), false) dxDrawImage(431*w, 243*h, 800*w, 500*h, "i/bg.png", 0, 0, 0, tocolor(255, 255, 255, a2), false) if nav1 == true then dxDrawImage(458*w, 290*h, 90*w, 83*h, "i/icons/infohover.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) else dxDrawImage(458*w, 290*h, 90*w, 83*h, "i/icons/info.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end if nav2 == true then dxDrawImage(468*w, 402*h, 70*w, 87*h, "i/icons/punishhover.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) else dxDrawImage(468*w, 402*h, 70*w, 87*h, "i/icons/punish.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end if nav3 == true then dxDrawImage(468*w, 525*h, 68*w, 73*h, "i/icons/carshover.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) else dxDrawImage(468*w, 525*h, 68*w, 73*h, "i/icons/cars.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end if nav4 == true then dxDrawImage(458*w, 625*h, 96*w, 87*h, "i/icons/settingshover.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) else dxDrawImage(458*w, 625*h, 96*w, 87*h, "i/icons/settings.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) --end end if selected.info == true then local name=getPlayerName(localPlayer):gsub("#%x%x%x%x%x%x","") local uid=getElementData(localPlayer,"player:uid") or "BĹ‚Ä…d" local bankmony=getElementData(localPlayer,"player:bankmoney") or "BĹ‚Ä…d" local przegtime=getElementData(localPlayer,"player:online") or "BĹ‚Ä…d" local reput=getElementData(localPlayer,"player:reputation") or "BĹ‚Ä…d" local sesja=getElementData(localPlayer,"player:online") or "BĹ‚Ä…d" local id=getElementData(localPlayer,"id") or "BĹ‚Ä…d" local lvl=getElementData(localPlayer,"player:level") or "BĹ‚Ä…d" if lvl == 1 then rangaa="Support" elseif lvl == 2 then rangaa="Moderator" elseif lvl == 3 then rangaa="Administrator" elseif lvl == 4 then rangaa="ZarzÄ…d" elseif not getElementData(localPlayer,"player:admin") then rangaa="Gracz" end if getElementData(localPlayer,"player:license:pjA") == 1 then pjA="Tak" else pjA="Nie" end if getElementData(localPlayer,"player:license:pjB") == 1 then pjB="Tak" else pjB="Nie" end if getElementData(localPlayer,"player:license:pjC") == 1 then pjC="Tak" else pjC="Nie" end if getElementData(localPlayer,"player:premium") == true then premka="Tak" else premka="Nie" end if getElementData(localPlayer,"player:kartabankowa") == 1 then kartab="Tak" else kartab="Nie" end local lvl=getElementData(localPlayer,"player:admin") if getElementData(localPlayer,"player:admin") then if lvl == 1 then rangaa="Supporter" elseif lvl == 2 then rangaa="Moderator" elseif lvl == 3 then rangaa="Administrator" elseif lvl == 4 then rangaa="ZarzÄ…d" end else rangaa="Gracz" end dxDrawText("Informacje", 775*w, 269*h, 1005*w, 313*h, tocolor(255, 255, 255, 255), 1.00*w, finfo, "center", "center", false, false, false, false, false) dxDrawText("TwĂłj nick: "..name, 805*w, 313*h, 980*w, 347*h, tocolor(255, 255, 255, 255), 1.00*w, finfo2, "center", "center", false, false, false, false, false) --lewa strona dxDrawImage(620*w, 376*h, 233*w, 32*h, "i/bar.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(620*w, 413*h, 233*w, 32*h, "i/bar.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(620*w, 450*h, 233*w, 32*h, "i/bar.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(620*w, 487*h, 233*w, 32*h, "i/bar.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(620*w, 524*h, 233*w, 32*h, "i/bar.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(620*w, 561*h, 233*w, 32*h, "i/bar.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) --prawa strona dxDrawImage(950*w, 376*h, 233*w, 32*h, "i/bar.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(950*w, 413*h, 233*w, 32*h, "i/bar.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(950*w, 450*h, 233*w, 32*h, "i/bar.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(950*w, 487*h, 233*w, 32*h, "i/bar.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(950*w, 524*h, 233*w, 32*h, "i/bar.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(950*w, 561*h, 233*w, 32*h, "i/bar.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) --lewa strona dxDrawText("UID: "..uid, 636*w, 377*h, 853*w, 408*h, tocolor(255, 255, 255, 255), 1.00*w, finfo3, "left", "center", false, false, false, true, false) dxDrawText("PieniÄ…dze w banku: "..bankmony, 636*w, 414*h, 853*w, 445*h, tocolor(255, 255, 255, 255), 1.00*w, finfo3, "left", "center", false, false, false, true, false) dxDrawText("Prawa jazdy kat.A: "..pjA, 636*w, 451*h, 853*w, 482*h, tocolor(255, 255, 255, 255), 1.00*w, finfo3, "left", "center", false, false, false, true, false) dxDrawText("Prawa jazdy kat.B: "..pjB, 636*w, 488*h, 853*w, 519*h, tocolor(255, 255, 255, 255), 1.00*w, finfo3, "left", "center", false, false, false, true, false) dxDrawText("Prawa jazdy kat.C: "..pjC, 636*w, 525*h, 853*w, 556*h, tocolor(255, 255, 255, 255), 1.00*w, finfo3, "left", "center", false, false, false, true, false) dxDrawText("Karta bankowa: "..kartab, 636*w, 562*h, 1183*w, 593*h, tocolor(255, 255, 255, 255), 1.00*w, finfo3, "left", "center", false, false, false, true, false) --prawa strona dxDrawText("ID: "..id, 966*w, 377*h, 1183*w, 408*h, tocolor(255, 255, 255, 255), 1.00*w, finfo3, "left", "center", false, false, false, true, false) dxDrawText("Przegrany czas: "..przegtime.." Minut", 966*w, 414*h, 1183*w, 445*h, tocolor(255, 255, 255, 255), 1.00*w, finfo3, "left", "center", false, false, false, true, false) dxDrawText("Czas aktualnej sesji: "..sesja.." Minut", 966*w, 451*h, 1183*w, 482*h, tocolor(255, 255, 255, 255), 1.00*w, finfo3, "left", "center", false, false, false, true, false) dxDrawText("Status premium: "..premka, 966*w, 488*h, 1183*w, 519*h, tocolor(255, 255, 255, 255), 1.00*w, finfo3, "left", "center", false, false, false, true, false) dxDrawText("Ranga: "..rangaa, 966*w, 525*h, 1183*w, 556*h, tocolor(255, 255, 255, 255), 1.00*w, finfo3, "left", "center", false, false, false, true, false) dxDrawText("Reputacja: "..reput, 966*w, 562*h, 1183*w, 593*h, tocolor(255, 255, 255, 255), 1.00*w, finfo3, "left", "center", false, false, false, true, false) end if selected.punish == true then dxDrawText("Lista twoich kar", 775*w, 269*h, 1005*w, 313*h, tocolor(255, 255, 255, 255), 1.00*w, finfo, "center", "center", false, false, false, false, false) for i, v in ipairs(tabelapunish) do local sx=(24*h)*(i-1) dxDrawText("Typ: "..v[1].." #FFFFFFPowód:"..v[2].." #FFFFFFData: "..v[3], 710*w, 339*h+sx, 1076*w, 357*h, tocolor(255, 255, 255, 255), 1.00*w, finfo3, "center", "center", false, false, false, true, false) end end if selected.cars == true then dxDrawText("Twoje pojazdy", 775*w, 269*h, 1005*w, 313*h, tocolor(255, 255, 255, 255), 1.00*w, finfo, "center", "center", false, false, false, false, false) for i, v in ipairs(tabelaaut) do local sx=(24*h)*(i-1) local uid=getElementData(localPlayer,"player:uid") local lokacja="N/A" if v[3] == 1 then lokacja="Przechowalnia" else for k,veh in ipairs(getElementsByType("vehicle")) do local vid=getElementData(veh,"vehicle:id") if vid and vid == v[2] then local x,y,z=getElementPosition(veh) lokacja=getZoneName(x,y,z,true)..", "..getZoneName(x,y,z,false) end end end dxDrawText("Model: "..v[1].." #FFFFFFID: "..v[2].." #FFFFFFLokacja: "..lokacja.."", 710*w, 339*h+sx, 1076*w, 357*h, tocolor(255, 255, 255, 255), 1.00*w, finfo3, "center", "center", false, false, false, true, false) end end if selected.settings == true then dxDrawText("", 775*w, 269*h, 1005*w, 313*h, tocolor(255, 255, 255, 255), 1.00*w, finfo, "center", "center", false, false, false, false, false) --dxDrawText("WiadomoĹ›ci prywatne", 375*w, 469*h, 1005*w, 313*h, tocolor(255, 255, 255, 255), 1.00*w, finfo, "center", "center", false, false, false, false, false) --dxDrawText("Shader HDR", 375*w, 669*h, 1005*w, 313*h, tocolor(255, 255, 255, 255), 1.00*w, finfo, "center", "center", false, false, false, false, false) --dxDrawText("Woda", 375*w, 869*h, 1005*w, 313*h, tocolor(255, 255, 255, 255), 1.00*w, finfo, "center", "center", false, false, false, false, false) --dxDrawText("Licznik FPS", 375*w, 1069*h, 1005*w, 313*h, tocolor(255, 255, 255, 255), 1.00*w, finfo, "center", "center", false, false, false, false, false) end end) addEvent("dashboard:getCars", true) addEventHandler("dashboard:getCars", root, function(result) if not result then return end for i,v in pairs(result) do table.insert(tabelaaut, {getVehicleNameFromModel(v["model"]), v["id"],v["parking"]}) end end) addEvent("dashboard:setPunish", true) addEventHandler("dashboard:setPunish", root, function(result) if not result then return end for i,v in pairs(result) do if #tabelapunish > 31 then table.remove(tabelapunish, 1) end table.insert(tabelapunish, {v["type"], v["reason"], v["time"]}) end end) addEventHandler("onClientClick", getRootElement(), function(btn,state) if navigation and btn == "left" and state == "down" then if isMouseIn(458*w, 290*h, 90*w, 83*h) then if nav1 == true then return end if nav2 == true or nav3 == true then nav2=false nav3=false or nav4==false selected.punish=false selected.cars=false end nav1=true selected.info=true elseif isMouseIn(468*w, 402*h, 70*w, 87*h) then if nav2 == true then return end if nav1 == true or nav3 == true or nav4 == false then nav1=false nav3=false selected.info=false selected.cars=false end nav2=true selected.punish=true tabelapunish=nil tabelapunish={} triggerServerEvent("dashboard:getPunish", localPlayer) elseif isMouseIn(468*w, 525*h, 68*w, 73*h) then if nav3 == true then return end if nav1 == true or nav2 == true or nav4 == false then nav1=false nav2=false selected.info=false selected.punish=false end nav3=true tabelaaut=nil tabelaaut={} selected.cars=true triggerServerEvent("dashboard:getCars", localPlayer) elseif isMouseIn(458*w, 625*h, 96*w, 87*h) then if nav4 == true then return end if nav1 == true or nav2 == true or nav3== true then nav1=false nav2=false selected.info=false selected.punish=false end nav4=true selected.settings=true selected.punish=false selected.info=false selected.cars=false end end end) bindKey("f2", "down", function() --if not getElementData(localPlayer, "zalogowany") then return end if navigation == false then if nav1 == true or nav2 == true or nav3 == true or nav4==true then nav2=false nav3=false nav4=false selected.punish=false selected.cars=false selected.settings=false end showCursor(true) navigation=true nav1=true selected.info=true else if nav1 == true or nav2 == true or nav3 == true or nav4==true then nav1=false nav2=false nav3=false nav4=false selected.info=false selected.punish=false selected.cars=false selected.settings=false end showCursor(false) navigation=false end end)