-
Posts
96 -
Joined
-
Last visited
kokoseda's Achievements
Punk-@ss B*tch (12/54)
5
Reputation
-
I need a script to allow weapons in a specific position in a map ( like LV Airport ) and it's color is red. other areas can't use weapons.
-
I need to fix this problem.. when i drive in the car
-
I want to remove this fence and a lot of unselectable objects.. how?
-
I need a script to allow weapons in a specific position in a map ( like LV Airport ) and it's color is red. other areas can't use weapons.
-
Hello I have a search box problem you can see it on the video The problem : the code: n_nova = { {"البنك [✈]",1481.08887,-1762.94910,18.7957}, {"مهمة البنك [✈]",589.76153,-1243.05187,17.92252}, {"مرقى [✈]",-2045.40332, -3135.07373, 4.99000}, {"مسبح [✈]",-3374.37329, -2100.28369, 5.00000 }, {"المدينة الصناعية [✈]",2762.0681152344, -2389.3217773438, 13.6328125}, {"الشاطئ [✈]",253.8177947998, -1810.9669189453, 4.3108253479004}, {"المرقـص [✈]",-3294.71924, -2298.75537, 5.00000 }, {"الورشـة [✈]",-3136.55054,-2222.82227,5.05153}, {"ساحة القتال [✈]",-2918.34180, -2726.62793, 9.89688}, {"شارع الطويل [✈]",-3258.67212,-3006.19702 , 5.00000}, {"شارع التطويف [✈]",-2318.91064,-3086.81518, 5.00000}, {"شارع العوشزية [✈]",-496.6276550293, 591.74462890625, 17.019058227539}, {"شارع الفروسيه [✈]",2878.1115722656, -1110.029296875, 10.882762908936}, {"شارع المحطة [✈]",-1311.6459960938, 2674.9191894531, 50.064270019531}, {"شارع الدخل [✈]",1332.46301,-1412.89074,13.54520}, {"شارع الحفريات [✈]",-2935.8588867188, -1368.9516601563, 11.714294433594}, {"شارع البستان [✈]",2491.12109375, -1667.4482421875, 13.34375}, {"تطعيس [✈]",-2461.22387,-2946.62255 , 5.00000}, {"الدائري [✈]",1792.79541,2393.04248 ,7.90996}, {"النخـيل [✈]",2068.72119, 907.06708, 8.17013}, {"الـشرقي [✈]",1054.6721191406,2729.0747070313 ,14.15293}, {"الـغربي [✈]",1187.9227294922, 1354.2520751953, 8.7430381774902}, {"الــغروب [✈]",662.55310058594, 1936.7479248047, 5.5052728652954}, {"الجسر المعلق [✈]",-2665.73437,1404.73669,55.8125}, {"معرض السيارات [✈]",-1661.35559,1211.80078,7.25}, {"مقر الجيش [✈]",83.86812,1920.88134,17.73764}, {"المطار الاول ( 1 ) [✈]",1396.12707,-2469.34716,13.55468}, {"المطار الثاني ( 2 ) [✈]",-1666.00500,-155.27819,14.14843}, {"المطار الثالث ( 3 ) [✈]",1504.62731,1158.70458,10.8125}, {"مطار الجيش ( 4 ) [✈]",427.59286,2530.47485,16.63177}, } GUIEditor = { gridlist = {}, window = {}, button = {}, edit = {} } local screenW, screenH = guiGetScreenSize() wnd = guiCreateWindow((screenW - 362) / 2, (screenH - 559) / 2, 362, 559, "الانتقالات", false) guiWindowSetSizable(wnd, false) guiSetVisible(wnd,false) n_ova = guiCreateButton(106, 491, 150, 58, "انتقال", false, wnd) g_nova = guiCreateGridList(35, 92, 290, 373, false, wnd) guiGridListAddColumn(g_nova, "#", 0.9) B7th = guiCreateEdit(35, 43, 290, 34, "", false, wnd) bindKey("F4","down", function () if guiGetVisible(wnd) then guiSetVisible(wnd,false) showCursor(false) else guiSetVisible(wnd,true) showCursor(true) end end ) addEventHandler( "onClientGUIChanged", B7th, function() guiGridListClear( g_nova ) local Text = guiGetText( source ) for _, Table in ipairs( n_nova ) do if ( string.find( Table[1], Text, 1, true ) ) then local Row = guiGridListAddRow( g_nova ) guiGridListSetItemText( g_nova, Row, 1, Table[1], false, false ) guiGridListSetItemData( g_nova, Row, 1, Table[2] ) guiGridListSetItemColor( g_nova, Row, 1,0, 144, 255) end end end ) --------------------------------------- for i,ha in ipairs(n_nova) do local row = guiGridListAddRow(g_nova) guiGridListSetItemText(g_nova,row,1,ha[1],false,false) guiGridListSetItemData(g_nova,row,1,{ha[2],ha[3],ha[4]}) end addEventHandler("onClientGUIClick",root, function () local sel = guiGridListGetSelectedItem(g_nova) if source == n_ova then if sel ~= -1 then local x,y,z = unpack(guiGridListGetItemData(g_nova,sel,1)) setElementPosition(localPlayer,x,y,z) else outputChatBox("* ألــرجآء اختيار مكآن للآنتقال اليه",255,0,0) end end end )
-
GUIEditor = { button = {}, window = {}, label = {} } local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow((screenW - 468) / 2, (screenH - 348) / 2, 468, 348, "التحكم بالسيارة", false) guiWindowSetSizable(GUIEditor.window[1], false) FarolOff = guiCreateButton(257, 63, 83, 35, "إيقاف", false, GUIEditor.window[1]) MotorOff = guiCreateButton(257, 141, 83, 35, "إيقاف", false, GUIEditor.window[1]) FarolOn = guiCreateButton(360, 63, 83, 35, "تشغيل", false, GUIEditor.window[1]) MotorOn = guiCreateButton(360, 141, 83, 35, "تشغيل", false, GUIEditor.window[1]) Capoo = guiCreateScrollBar(22, 57, 194, 19, true, false, GUIEditor.window[1]) PortaEsquedra1f = guiCreateScrollBar(22, 102, 194, 19, true, false, GUIEditor.window[1]) PortaDireita1 = guiCreateScrollBar(22, 152, 194, 19, true, false, GUIEditor.window[1]) PortaEsquedra2 = guiCreateScrollBar(22, 201, 194, 19, true, false, GUIEditor.window[1]) PortaDireita2 = guiCreateScrollBar(22, 252, 194, 19, true, false, GUIEditor.window[1]) PortaMalas = guiCreateScrollBar(22, 305, 194, 19, true, false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(79, 34, 85, 19, "الكبوت", false, GUIEditor.window[1]) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[1], "center") GUIEditor.label[2] = guiCreateLabel(79, 83, 85, 19, "الباب - يسار", false, GUIEditor.window[1]) guiLabelSetHorizontalAlign(GUIEditor.label[2], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[2], "center") GUIEditor.label[3] = guiCreateLabel(79, 131, 85, 19, "الباب - يمين", false, GUIEditor.window[1]) guiLabelSetHorizontalAlign(GUIEditor.label[3], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[3], "center") GUIEditor.label[4] = guiCreateLabel(74, 181, 95, 20, "الباب - خلف يسار", false, GUIEditor.window[1]) guiLabelSetHorizontalAlign(GUIEditor.label[4], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[4], "center") GUIEditor.label[5] = guiCreateLabel(79, 286, 85, 19, "الشنطة", false, GUIEditor.window[1]) guiLabelSetHorizontalAlign(GUIEditor.label[5], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[5], "center") GUIEditor.label[6] = guiCreateLabel(74, 230, 95, 20, "الباب - خلف يمين", false, GUIEditor.window[1]) guiLabelSetHorizontalAlign(GUIEditor.label[6], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[6], "center") GUIEditor.button[1] = guiCreateButton(267, 210, 172, 38, "فك الصدام الامامي", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(267, 267, 172, 38, "فك الصدام الخلفي", false, GUIEditor.window[1]) GUIEditor.label[7] = guiCreateLabel(308, 34, 85, 19, "النور", false, GUIEditor.window[1]) guiLabelSetHorizontalAlign(GUIEditor.label[7], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[7], "center") GUIEditor.label[8] = guiCreateLabel(308, 112, 85, 19, "المحرك", false, GUIEditor.window[1]) guiLabelSetHorizontalAlign(GUIEditor.label[8], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[8], "center")
-
Where is the professionals?
-
Hello I want to make my gui script colorful like my Gui Freeroam menu.. I have used this code to make my freeroam colorful like this genelGuiTablo = {} --guiCreateWindow wtablo = {} --guiCreateButton btablo = {} --guiCreateGridList Ltablo = {} --guiCreateMemo mtablo = {} --guiCreateEdit etablo = {} function resimOlustur(isim) if fileExists(isim.."png") then return isim.."png" end local texture = dxCreateTexture(1,1) local pixels = dxGetTexturePixels(texture) local r,g,b,a = 155,155,155,155 dxSetPixelColor(pixels,0,0,r,g,b,a) dxSetTexturePixels(texture, pixels) local pxl = dxConvertPixels(dxGetTexturePixels(texture),"png") local nImg = fileCreate(isim..".png") fileWrite(nImg,pxl) fileClose(nImg) return isim..".png" end function renkVer(resim,hex) guiSetProperty(resim,"ImageColours","tl:FF"..hex.." tr:FF"..hex.." bl:FF"..hex.." br:FF"..hex) end _guiCreateWindow = guiCreateWindow function guiCreateWindow(x,y,g,u,yazi,relative,parent,renk1,renk2,renk3,renk4,kapatkutu) wsayi = #wtablo +1 if not renk1 or string.len(renk1) > 6 then renk1 = "ED7717" -- window renk üst taraf // window top color end if not renk2 or string.len(renk2) > 6 then renk2 = "ED7717" -- window renk alt taraf // window bottom color end if not renk3 or string.len(renk3) > 6 then renk3 = "131314" -- baslik renk // window header back color end if not renk4 or string.len(renk4) > 6 then renk4 = "1883D7" -- window kenar çizgi // window outline color end if relative then px,pu = guiGetSize(parent,false) x,y,g,u = x*px,y*pu,g*px,u*pu relative = false end if not wtablo[wsayi] then wtablo[wsayi] = {} end --arkaResim wtablo[wsayi].resim = guiCreateStaticImage(x,y,g,u,resimOlustur("test"),relative,parent) renkVer(wtablo[wsayi].resim,renk1) guiSetProperty(wtablo[wsayi].resim,"ImageColours","tl:FF"..renk1.." tr:FF"..renk1.." bl:FF"..renk2.." br:FF"..renk2.."") --baslıkArka wtablo[wsayi].basarka = guiCreateStaticImage(0,0,g,20, resimOlustur("test"), false, wtablo[wsayi].resim) renkVer(wtablo[wsayi].basarka,renk3) --kenarlar wtablo[wsayi].kenarlar = { ordaUst = guiCreateStaticImage(0,0,g,1,resimOlustur("test"), false, wtablo[wsayi].resim), ortaAlt = guiCreateStaticImage(0,u-1,g,1,resimOlustur("test"), false, wtablo[wsayi].resim), sol = guiCreateStaticImage(0,0,1,u,resimOlustur("test"), false, wtablo[wsayi].resim), sag = guiCreateStaticImage(g-1,0,1,u,resimOlustur("test"), false, wtablo[wsayi].resim) } for i,v in pairs(wtablo[wsayi].kenarlar) do renkVer(v,renk4) guiSetProperty(v, "AlwaysOnTop", "True") guiSetAlpha(v, 0.4) end --baslıkLabel wtablo[wsayi].label = guiCreateLabel((g/2)-((string.len(yazi)*8)/2),0,(string.len(yazi)*8),20, yazi, false, wtablo[wsayi].basarka) guiSetFont(wtablo[wsayi].label, "default-bold-small") guiLabelSetHorizontalAlign(wtablo[wsayi].label, "center") guiLabelSetVerticalAlign(wtablo[wsayi].label, "center") return wtablo[wsayi].resim end _guiCreateButton = guiCreateButton function guiCreateButton(x,y,g,u,yazi,relative,parent,renk1,renk2) bsayi = #btablo +1 if not btablo[bsayi] then btablo[bsayi] = {} end if not renk1 or string.len(renk1) > 6 then --renk = math.random(999999) renk1 = "ff0000" -- genel buton rengi // button back color end if not renk2 or string.len(renk2) > 6 then renk2 = "FFFFFF" -- buton kenar rengi // button outline color end --arkaResim if relative then px,pu = guiGetSize(parent,false) x,y,g,u = x*px,y*pu,g*px,u*pu relative = false end btablo[bsayi].resim = guiCreateStaticImage(x,y,g,u,resimOlustur("test"),relative,parent) renkVer(btablo[bsayi].resim,renk1) --kenarlar btablo[bsayi].kenarlar = { ortaUst = guiCreateStaticImage(0,0,g,1,resimOlustur("test"), relative, btablo[bsayi].resim), ortaAlt = guiCreateStaticImage(0,u-1,g,1,resimOlustur("test"), relative, btablo[bsayi].resim), sol = guiCreateStaticImage(0,0,1,u,resimOlustur("test"), relative, btablo[bsayi].resim), sag = guiCreateStaticImage(g-1,0,1,u,resimOlustur("test"), relative, btablo[bsayi].resim) } for i,v in pairs(btablo[bsayi].kenarlar) do renkVer(v,renk2) guiSetAlpha(v, 0.4) end --label btablo[bsayi].label = guiCreateLabel(0,0,g,u,yazi,relative,btablo[bsayi].resim) guiLabelSetHorizontalAlign(btablo[bsayi].label, "center") guiLabelSetVerticalAlign(btablo[bsayi].label, "center") guiSetFont(btablo[bsayi].label, "default-bold-small") genelGuiTablo[btablo[bsayi].label] = btablo[bsayi].kenarlar return btablo[bsayi].label end _guiCreateGridList = guiCreateGridList function guiCreateGridList(x,y,g,u,relative,parent,kenarrenk) Ssayi = #Ltablo +1 if not kenarrenk or string.len(kenarrenk) > 6 then kenarrenk = "1883D7" -- gridlist kenar renk // gridlist outline color end if not Ltablo[Ssayi] then Ltablo[Ssayi] = {} end if relative then px,pu = guiGetSize(parent,false) x,y,g,u = x*px,y*pu,g*px,u*pu end local relative = false Ltablo[Ssayi].resim = guiCreateLabel(x,y,g,u, "", relative, parent) Ltablo[Ssayi].liste = _guiCreateGridList(-8,-8,g+10, u+10,false, Ltablo[Ssayi].resim) Ltablo[Ssayi].kenarlar = { ortaUst = guiCreateStaticImage(0,0,g,1,resimOlustur("test"), false, Ltablo[Ssayi].resim), ortaAlt = guiCreateStaticImage(0,u-1,g,1,resimOlustur("test"), false, Ltablo[Ssayi].resim), sol = guiCreateStaticImage(0,0,1,u,resimOlustur("test"), false, Ltablo[Ssayi].resim), sag = guiCreateStaticImage(g-1,0,1,u,resimOlustur("test"), false, Ltablo[Ssayi].resim)} genelGuiTablo[Ltablo[Ssayi].liste] = Ltablo[Ssayi].kenarlar for i,v in pairs(Ltablo[Ssayi].kenarlar) do renkVer(v,kenarrenk) guiSetProperty(v, "AlwaysOnTop", "True") guiSetAlpha(v, 0.4) end return Ltablo[Ssayi].liste end _guiCreateEdit = guiCreateEdit function guiCreateEdit(x,y,g,u,yazi,relative,parent,kenarrenk) esayi = #etablo +1 if not kenarrenk or string.len(kenarrenk) > 6 then kenarrenk = "1883D7" -- edit kenar renk // edit outline color end if not etablo[esayi] then etablo[esayi] = {} end if relative then px,pu = guiGetSize(parent,false) x,y,g,u = x*px,y*pu,g*px,u*pu end local relative = false etablo[esayi].resim = guiCreateLabel(x,y,g,u, "", relative, parent) etablo[esayi].edit = _guiCreateEdit(-7,-5,g+15, u+8,yazi,false, etablo[esayi].resim) etablo[esayi].kenarlar = { ortaUst = guiCreateStaticImage(0,0,g,1,resimOlustur("test"), false, etablo[esayi].resim), ortaAlt = guiCreateStaticImage(0,u-1,g,1,resimOlustur("test"), false, etablo[esayi].resim), sol = guiCreateStaticImage(0,0,1,u,resimOlustur("test"), false, etablo[esayi].resim), sag = guiCreateStaticImage(g-1,0,1,u,resimOlustur("test"), false, etablo[esayi].resim) } genelGuiTablo[etablo[esayi].edit] = etablo[esayi].kenarlar for i,v in pairs(etablo[esayi].kenarlar) do renkVer(v,kenarrenk) guiSetProperty(v, "AlwaysOnTop", "True") guiSetAlpha(v, 0.4) end return etablo[esayi].edit end _guiCreateMemo = guiCreateMemo function guiCreateMemo(x,y,g,u,yazi,relative,parent,kenarrenk) msayi = #mtablo +1 if not kenarrenk or string.len(kenarrenk) > 6 then kenarrenk = "1883D7" -- memo kenar renk // memo outline color end if not mtablo[msayi] then mtablo[msayi] = {} end if relative then px,pu = guiGetSize(parent,false) x,y,g,u = x*px,y*pu,g*px,u*pu end local relative = false mtablo[msayi].resim = guiCreateLabel(x,y,g,u, "", relative, parent) mtablo[msayi].memo = _guiCreateMemo(-5,-10,g+15, u+10, yazi,false, mtablo[msayi].resim) mtablo[msayi].kenarlar = { ortaUst = guiCreateStaticImage(0,0,g,1,resimOlustur("test"), false, mtablo[msayi].resim), ortaAlt = guiCreateStaticImage(0,u-1,g,1,resimOlustur("test"), false, mtablo[msayi].resim), sol = guiCreateStaticImage(0,0,1,u,resimOlustur("test"), false, mtablo[msayi].resim), sag = guiCreateStaticImage(g-1,0,1,u,resimOlustur("test"), false, mtablo[msayi].resim)} genelGuiTablo[mtablo[msayi].memo] = mtablo[msayi].kenarlar for i,v in pairs(mtablo[msayi].kenarlar) do renkVer(v,kenarrenk) guiSetProperty(v, "AlwaysOnTop", "True") guiSetAlpha(v, 0.4) end return mtablo[msayi].memo end --edit,gridlst,buton,memo mouse addEventHandler("onClientMouseEnter", resourceRoot, function() for i,v in pairs(genelGuiTablo) do if source == i then for i,v in pairs(v) do guiSetAlpha(v, 1) end end end end) addEventHandler("onClientMouseLeave", resourceRoot, function() for i,v in pairs(genelGuiTablo) do if source == i then for i,v in pairs(v) do guiSetAlpha(v, 0.4) end end end end) function butonmu(label) for i,v in pairs(btablo) do if v.label == label then return i end end return false end function penceremi(resim) for i,v in pairs(wtablo) do if v.resim == resim then return i end end return false end function editmi(edit) for i,v in pairs(etablo) do if v.edit == edit then return i end end return false end function gridlistmi(liste) for i,v in pairs(Ltablo) do if v.liste == liste then return i end end return false end function memomu(memo) for i,v in pairs(mtablo) do if v.memo == memo then return i end end return false end function basliklabelmi(label) for i,v in pairs(wtablo) do if v.label == label then return i end end return false end function baslikmi(element) for i,v in pairs(wtablo) do if v.basarka == element or wtablo[basliklabelmi(element)] and v.label == element then return i end end return false end --basinca olan ufalma // anim when click basili = {} addEventHandler("onClientGUIMouseDown", resourceRoot, function() if butonmu(source) then if basili[source] then return end basili[source] = true local g,u = guiGetSize(source, false) local x,y = guiGetPosition(source, false) guiSetPosition(source, x+2,y+2, false) guiSetSize(source, g-4,u-4, false) end end) addEventHandler("onClientGUIMouseUp", resourceRoot, function() if butonmu(source) then if not basili[source] then for i,v in pairs(basili) do if v == true then source = i break end end end if not basili[source] then return end basili[source] = nil local g,u = guiGetSize(source, false) local x,y = guiGetPosition(source, false) guiSetPosition(source, x-2,y-2, false) guiSetSize(source, g+4,u+4, false) else for i,v in pairs(basili) do if v == true then source = i break end end if butonmu(source) then basili[source] = nil local g,u = guiGetSize(source, false) local x,y = guiGetPosition(source, false) guiSetPosition(source, x-2,y-2, false) guiSetSize(source, g+4,u+4, false) end end end) function basiliBirak() for i,v in pairs(basili) do if v == true then source = i break end end if butonmu(source) then basili[source] = nil local g,u = guiGetSize(source, false) local x,y = guiGetPosition(source, false) guiSetPosition(source, x-2,y-2, false) guiSetSize(source, g+4,u+4, false) end end addEventHandler("onClientClick", root, function(button, durum, _, _, _, _, _, tiklanan) if durum == "up" then if tiklanan then local element = getElementType(tiklanan) if not string.find(element, "gui-") then basiliBirak() end else basiliBirak() end end end) --panel taşıma // window drag and move addEventHandler( "onClientGUIMouseDown", resourceRoot,function ( btn, x, y ) if btn == "left" and baslikmi(source) then local source = wtablo[baslikmi(source)].resim clickedElement = source local elementPos = { guiGetPosition( source, false ) } offsetPos = { x - elementPos[ 1 ], y - elementPos[ 2 ] }; end end) addEventHandler( "onClientGUIMouseUp", resourceRoot,function ( btn, x, y ) if btn == "left" and baslikmi(source) then clickedElement = nil end end) addEventHandler( "onClientCursorMove", getRootElement( ),function ( _, _, x, y ) if clickedElement then guiSetPosition( clickedElement, x - offsetPos[ 1 ], y - offsetPos[ 2 ], false ) end end) --diğer funclar // other funcs _guiGetPosition = guiGetPosition function guiGetPosition(element,relative) if butonmu(element) then local sira = butonmu(element) local x,y = _guiGetPosition(btablo[sira].resim, relative) return x,y else local x,y = _guiGetPosition(element, relative) return x,y end end _guiSetPosition = guiSetPosition function guiSetPosition(element,x,y,relative) if butonmu(element) then local sira = butonmu(element) _guiSetPosition(btablo[sira].resim, x,y, relative) else _guiSetPosition(element,x,y,relative) end end _guiGetSize = guiGetSize function guiGetSize(element,relative) if butonmu(element) then local sira = butonmu(element) local g,u = _guiGetSize(btablo[sira].resim, relative) return g,u else local g,u = _guiGetSize(element, relative) return g,u end end _guiSetSize = guiSetSize function guiSetSize(element,g,u,relative) if butonmu(element) then local sira = butonmu(element) _guiSetSize(btablo[sira].resim, g,u, false) _guiSetSize(btablo[sira].label, g,u, false) --sağ kenar çizgi _guiSetPosition(btablo[sira].kenarlar.sag, g-1, 0, false) _guiSetSize(btablo[sira].kenarlar.sag, 1,u, false) --alt kenar çizgi _guiSetPosition(btablo[sira].kenarlar.ortaAlt, 0, u-1, false) _guiSetSize(btablo[sira].kenarlar.ortaAlt, g,1, false) elseif penceremi(element) then local sira = penceremi(element) _guiSetSize(wtablo[sira].resim, g,u, false) --sağ kenar çizgi _guiSetPosition(wtablo[sira].kenarlar.sag, g-1, 0, false) _guiSetSize(wtablo[sira].kenarlar.sag, 1,u, false) --alt kenar çizgi _guiSetPosition(wtablo[sira].kenarlar.ortaAlt, 0, u-1, false) _guiSetSize(wtablo[sira].kenarlar.ortaAlt, g,1, false) --baslik _guiSetSize(wtablo[sira].basarka, g,20, false) --kapat _guiSetPosition(wtablo[sira].kapatArka, g-25,1, false) --label local yazi = guiGetText(wtablo[sira].label) _guiSetPosition(wtablo[sira].label, (g/2)-((string.len(yazi)*8)/2),0, false) _guiSetSize(wtablo[sira].label,(string.len(yazi)*8),20, false) guiLabelSetHorizontalAlign(wtablo[sira].label, "center") guiLabelSetVerticalAlign(wtablo[sira].label, "center") end end _guiSetText = guiSetText function guiSetText(element, yazi) if penceremi(element) then local sira = penceremi(element) local g,u = guiGetSize(wtablo[sira].resim,false) guiSetPosition(wtablo[sira].label,(g/2)-((string.len(yazi)*8)/2),0, false) guiSetSize(wtablo[sira].label, (string.len(yazi)*8),20, false) guiLabelSetHorizontalAlign(wtablo[sira].label, "center") guiLabelSetVerticalAlign(wtablo[sira].label, "center") _guiSetText(wtablo[sira].label, yazi) else _guiSetText(element, yazi) end end _guiGetText = guiGetText function guiGetText(element) if penceremi(element) then local sira = penceremi(element) local yazi = _guiGetText(wtablo[sira].label) return yazi else local yazi = _guiGetText(element) return yazi end end _guiSetEnabled = guiSetEnabled function guiSetEnabled(element, bool) if butonmu(element) then if bool == false then guiSetAlpha(btablo[butonmu(element)].resim,0.5) _guiSetEnabled(element, bool) else guiSetAlpha(btablo[butonmu(element)].resim,1) _guiSetEnabled(element, bool) end else _guiSetEnabled(element, bool) end end _guiSetVisible = guiSetVisible function guiSetVisible(element, bool) if butonmu(element) then local sira = butonmu(element) _guiSetVisible(btablo[sira].resim, bool) else _guiSetVisible(element, bool) end end _destroyElement = destroyElement function destroyElement(element) if butonmu(element) then local sira = butonmu(element) _destroyElement(btablo[sira].resim) btablo[sira] = nil elseif editmi(element) then local sira = editmi(element) _destroyElement(etablo[sira].resim) etablo[sira] = nil elseif gridlistmi(element) then local sira = gridlistmi(element) _destroyElement(Ltablo[sira].resim) Ltablo[sira] = nil elseif memomu(element) then local sira = memomu(element) _destroyElement(mtablo[sira].resim) mtablo[sira] = nil else _destroyElement(element) end end _guiWindowSetSizable = guiWindowSetSizable function guiWindowSetSizable(element, bool) if getElementType(element) ~= "gui-window" then return false else _guiWindowSetSizable(element, bool) end end Now how to make this script colorful like the FR Gui ??
-
Hello I want to make the scroll bar hide/show with bind key I did it with the dx window with this code: local Botao = "F7" function OpenPainel() if Painelstt == false then addEventHandler("onClientRender", getRootElement(), PainelDc) Painelstt = true showCursor(true) else removeEventHandler("onClientRender", getRootElement(), PainelDc) Painelstt = false showCursor(false) end end bindKey(Botao, "down", OpenPainel) What about the scroll bar like : GUIEditor.scrollbar[3] = guiCreateScrollBar(750, 540, 180, 23, true, false) What's the codes?
-
I want to make the grid list in center local screenH, screenW = guiGetScreenSize() local x, y = (screenH/1366), (screenW/768) local Font = dxCreateFont("gfx/Roboto-Condensed.ttf", 13) ---<< Criando a fonte .. local Botao = "F4" --<<<<< Coloque o Botão que irá abrir o painel entre as "aspas".. --------- function PainelDc() dxDrawRectangle(761, 322, 399, 436, tocolor(254, 0, 0, 123), false) dxDrawRectangle(761, 322, 399, 40, tocolor(240, 157, 13, 123), false) dxDrawText("الانتقالات", 841, 325, 1073, 356, tocolor(255, 255, 255, 255), 1.00, "default", "center", "center", false, false, false, false, false) dxDrawRectangle(891, 700, 144, 43, tocolor(240, 157, 13, 123), false) dxDrawText("انتقال", 891, 700, 1035, 743, tocolor(255, 255, 255, 255), 1.00, "default", "center", "center", false, false, false, false, false) guiSetVisible(grid,false) grid = guiCreateGridList(804, 406, 317, 274, false) guiGridListAddColumn(grid, "1", 0.9) guiGridListAddRow(grid) guiGridListSetItemText(grid, 0, 1, "-", false, false) end --------------- Painelstt = false --<<<< Status do painel(PainelDc) function OpenPainel() --<<<<< Todo if significa == se for .. if Painelstt == false then --<<<< Verifica se o painel está fechado e logo após o abre e poe seu status como true(aberto) addEventHandler("onClientRender", getRootElement(), PainelDc) Painelstt = true showCursor(true) else --<<<< else(significa o contrario) se não for .. removeEventHandler("onClientRender", getRootElement(), PainelDc) Painelstt = false showCursor(false) end end bindKey(Botao, "down", OpenPainel)---<<<< Adicionando a Bind(tecla) que irá abrir o Painel! function isCursorOnElement( posX, posY, width, height ) --<< Funçao que verifica a posiçao do Cursor (mouse) if isCursorShowing( ) then local mouseX, mouseY = getCursorPosition( ) local clientW, clientH = guiGetScreenSize( ) local mouseX, mouseY = mouseX * clientW, mouseY * clientH if ( mouseX > posX and mouseX < ( posX + width ) and mouseY > posY and mouseY < ( posY + height ) ) then return true end end return false end
-
4 ايام ولا يوجد أي حلول
-
سويت جديد وحطيت البزيشن بالنص لكن ياخي المشكله ان الأشياء الثانيه مثلا التكست كيف اخليه بالنص , ولو بسوي تكست ثاني وخليته بالنص يصيروا مدموجين ولا اقدر احركهم لو حركتهم راح السيت بزشن
-
إلى الآن ما انحلت المشكلة معقوله 3 ايام ومافيه اي حل