0 Üye ve 1 Ziyaretçi konuyu incelemekte.
2 panelinde acma foksiyonu aynı fonkiyonları degiş
İki panelden sadece 1 tanesinin kodlarını atarmısın ?
sx,sy = guiGetScreenSize()u = 370 -- panel uzunluğug = 432 -- panel genişliğiy = sy/2-u/2x = 0 - g - 1panelacikmi = 0skin = 1rainbow_arac_rengi_durumu = 0rainbow_far_rengi_durumu = 0rnk = "00CC00" -- başlık ve butonların rengi 0061FFrnk2 = "000000" -- arkaplan rengipanel = guiCreateStaticImage(x,y,g,u,"resim/panel.png",false)guiSetProperty(panel, "ImageColours", "tl:FF"..rnk2.." tr:FF"..rnk2.." bl:FF"..rnk2.." br:FF"..rnk2)baslik = guiCreateStaticImage(0,0,g,30,"resim/panel.png",false,panel)basliklbl = guiCreateLabel(0,0,g,30,"Premium Gaming Kaplama Panel",false,baslik)guiSetFont(basliklbl,"default-bold-small")guiLabelSetVerticalAlign(basliklbl,"center")guiLabelSetHorizontalAlign(basliklbl,"center")rainbowbtn = guiCreateStaticImage(20,80,160,25,"resim/buton.png",false,panel)rainbow_label = guiCreateLabel(0,0,160,25,"Rainbow Araç Rengi Aç",false,rainbowbtn)guiLabelSetVerticalAlign(rainbow_label,"center")guiLabelSetHorizontalAlign(rainbow_label,"center")guiSetFont(rainbow_label,"default-bold-small")rainbowfarbtn = guiCreateStaticImage(20,130,160,25,"resim/buton.png",false,panel)rainbowfar_label = guiCreateLabel(0,0,160,25,"Rainbow Far Rengi Aç",false,rainbowfarbtn)guiLabelSetVerticalAlign(rainbowfar_label,"center")guiLabelSetHorizontalAlign(rainbowfar_label,"center")guiSetFont(rainbowfar_label,"default-bold-small")cizgi = guiCreateStaticImage(200,40,4,320,"resim/buton.png",false,panel)skinresmi = guiCreateStaticImage(220,50,192,192,"skinimg/"..skin..".jpg",false,panel)skin_once = guiCreateStaticImage(220,252,64,25,"resim/buton.png",false,panel)skin_once_label = guiCreateLabel(0,0,64,25,"Önceki",false,skin_once)guiLabelSetVerticalAlign(skin_once_label,"center")guiLabelSetHorizontalAlign(skin_once_label,"center")guiSetFont(skin_once_label,"default-bold-small")suanki_skin = guiCreateLabel(284,252,64,25,skin.."/20",false,panel)guiLabelSetVerticalAlign(suanki_skin,"center")guiLabelSetHorizontalAlign(suanki_skin,"center")guiSetFont(suanki_skin,"default-bold-small")skin_sonra = guiCreateStaticImage(348,252,64,25,"resim/buton.png",false,panel)skin_sonra_label = guiCreateLabel(0,0,64,25,"Sonraki",false,skin_sonra)guiLabelSetVerticalAlign(skin_sonra_label,"center")guiLabelSetHorizontalAlign(skin_sonra_label,"center")guiSetFont(skin_sonra_label,"default-bold-small")skin_kullan = guiCreateStaticImage(220,290,192,25,"resim/buton.png",false,panel)skin_kullan_label = guiCreateLabel(0,0,192,25,"Skini Kullan",false,skin_kullan)guiLabelSetVerticalAlign(skin_kullan_label,"center")guiLabelSetHorizontalAlign(skin_kullan_label,"center")guiSetFont(skin_kullan_label,"default-bold-small")skin_sifirla = guiCreateStaticImage(220,325,192,25,"resim/buton.png",false,panel)skin_sifirla_label = guiCreateLabel(0,0,192,25,"Skini Sıfırla",false,skin_sifirla)guiLabelSetVerticalAlign(skin_sifirla_label,"center")guiLabelSetHorizontalAlign(skin_sifirla_label,"center")guiSetFont(skin_sifirla_label,"default-bold-small")-- SKINlocal urltexture = {}addEvent("skinuygula",true)addEventHandler("skinuygula",root,function(id,veh,player,textures) if urltexture[player] and not tonumber(id) then shader = dxCreateShader("skinimg/skin.fx") dxSetShaderValue(shader, "Tex0", urltexture[player]) for i,texturename in ipairs(textures) do engineApplyShaderToWorldTexture(shader, texturename,veh) end elseif not urltexture[player] and tonumber(id) then shader = dxCreateShader("skinimg/skin.fx") texture= dxCreateTexture("skinimg/"..id..".jpg") dxSetShaderValue(shader, "Tex0", texture) for i,texturename in ipairs(textures) do engineApplyShaderToWorldTexture(shader, texturename,veh) end endend)-- CHEETAH MODtxd = engineLoadTXD ( "skinimg/cheetah.txd" )engineImportTXD ( txd, 415 )dff = engineLoadDFF ( "skinimg/cheetah.dff" )engineReplaceModel ( dff, 415 )-- MOUSE & CLICKaddEventHandler("onClientGUIClick",root,function() if source == rainbow_label then if rainbow_arac_rengi_durumu == 0 then addEventHandler("onClientRender",root,rainboww) guiSetText(rainbow_label,"Rainbow Araç Rengi Kapat") rainbow_arac_rengi_durumu = 1 else removeEventHandler("onClientRender",root,rainboww) guiSetText(rainbow_label,"Rainbow Araç Rengi Aç") rainbow_arac_rengi_durumu = 0 end elseif source == rainbowfar_label then if rainbow_far_rengi_durumu == 0 then addEventHandler("onClientRender",root,rainbowfarr) rainbowfar[source] = 1 guiSetText(rainbowfar_label,"Rainbow Far Rengi Kapat") rainbow_far_rengi_durumu = 1 else removeEventHandler("onClientRender",root,rainbowfarr) guiSetText(rainbowfar_label,"Rainbow Far Rengi Aç") rainbow_far_rengi_durumu = 0 end elseif source == fix_label then triggerServerEvent("fixflip",localPlayer) guiSetVisible(fixbtn,false) setTimer(fixbekleme,15000,1) elseif source == skin_once_label then if skin > 1 then skin = skin - 1 guiStaticImageLoadImage(skinresmi,"skinimg/"..skin..".jpg") guiSetText(suanki_skin,skin.."/20") end elseif source == skin_sonra_label then if skin < 20 then skin = skin + 1 guiStaticImageLoadImage(skinresmi,"skinimg/"..skin..".jpg") guiSetText(suanki_skin,skin.."/20") end elseif source == skin_kullan_label then triggerServerEvent("skinkullan",localPlayer,skin) elseif source == skin_sifirla_label then triggerServerEvent("skinkullan",localPlayer,0) endend)function fixbekleme() guiSetVisible(fixbtn,true)end-- RAINBOWrainbowarac = {}function rainboww() local vehicle = getPedOccupiedVehicle(localPlayer) if vehicle then local r,g,b = getVehicleColor(vehicle,true) if not rainbowarac[source] then rainbowarac[source] = 0 return end if rainbowarac[source] == 0 then if r < 250 then r = r + 5 if r > 255 then r = 250 end else rainbowarac[source] = 1 end end if rainbowarac[source] == 1 then if g < 250 then g = g + 5 else rainbowarac[source] = 2 end elseif rainbowarac[source] == 2 then if b < 255 then if r > 0 then if r > 4 then r = r - 5 else r = r + 5 end else r = 0 end b = b + 5 if b > 255 then b = 255 end else rainbowarac[source] = 3 end elseif rainbowarac[source] == 3 then if g > 0 then if r > 0 then if r < 5 then r = r - 1 else r = r - 5 end else r = 0 end if g < 5 then g = g - 1 else g = g - 5 end if g < 0 then g = 0 end else rainbowarac[source] = 4 end elseif rainbowarac[source] == 4 then if b > 0 then if b < 3 then b = b - 5 else b = b - 5 end if b < 0 then b = 0 end else b = 0 rainbowarac[source] = 0 end end triggerServerEvent("aracrenkdegis",localPlayer,vehicle,r,g,b) endendrainbowfar = {}function rainbowfarr() local vehicle = getPedOccupiedVehicle(localPlayer) if vehicle then if not rainbowfar[source] then rainbowfar[source] = 0 return end local rf,gf,bf = getVehicleHeadLightColor(vehicle,true) if rainbowfar[source] == 0 then if rf<250 then rf = rf+3 if rf>255 then rf = 250 end else rainbowfar[source] = 1 end end if rainbowfar[source] == 1 then if gf<250 then gf = gf+3 else rainbowfar[source] = 2 end elseif rainbowfar[source] == 2 then if bf<255 then if rf>0 then if rf < 3 then rf = rf - 1 else rf = rf - 3 end else rf = 0 end bf = bf+3 if bf>255 then bf=255 end else rainbowfar[source] = 3 end elseif rainbowfar[source] == 3 then if gf > 0 then if rf > 0 then if rf < 3 then rf = rf - 1 else rf = rf - 3 end else rf = 0 end if gf < 3 then gf = gf - 1 else gf = gf - 3 end if gf < 0 then gf = 0 end else rainbowfar[source] = 4 end elseif rainbowfar[source] == 4 then if bf > 0 then if bf < 3 then bf = bf - 1 else bf = bf - 3 end if bf < 0 then bf = 0 end else bf = 0 rainbowfar[source] = 0 end end triggerServerEvent("farrenkdegis",localPlayer,vehicle,rf,gf,bf) endend-- BINDKEY & ANIMATIONfunction kay() if x < sx/2-g/2 then x = x + ((sx/2)-x)/g*40 end if x > sx/2-g/2 then showCursor(true) end guiSetPosition(panel,x,y,false)endfunction yazi() if x < 0 - g then removeEventHandler("onClientRender",root,yazi) else showCursor(false) x = x - ((sx/2)-x)/g*80 end guiSetPosition(panel,x,y,false)endaddEvent("panelBind_Pre",true)addEventHandler("panelBind_Pre",root,function() if panelacikmi == 0 then panelacikmi = 1 addEventHandler("onClientRender",root,kay) removeEventHandler("onClientRender",root,yazi) else panelacikmi = 0 addEventHandler("onClientRender",root,yazi) removeEventHandler("onClientRender",root,kay) endend)
grup = "Everyone" -- paneli açabilecek acl grububind = "G" -- paneli açma kapama tuşu--RAİNBOW ARAÇ RENGİaddEvent("aracrenkdegis",true)addEventHandler("aracrenkdegis",root,function(veh,r,g,b) setVehicleColor(veh,r,g,b)end)-- RAİNBOW FAR RENGİ addEvent("farrenkdegis",true)addEventHandler("farrenkdegis",root,function(vehf,rf,gf,bf) setVehicleHeadLightColor(vehf,rf,gf,bf)end)-- TAMİR VE FLİPaddEvent("fixflip",true)addEventHandler("fixflip",root,function() local arac = getPedOccupiedVehicle(source) if arac then fixVehicle(arac) local rotX, rotY, rotZ = getElementRotation(arac) setElementRotation(arac,0,0,rotZ) outputChatBox(getPlayerName(source).." #FFFFFFVIP Panel'den aracını tamir ettirdi.",root,255,255,255,true) else outputChatBox("Sadece araçtayken aracını tamir ettirebilirsin!",source,255,0,0,false) endend)-- SKİN ALMA VE UYGULAMA addEvent("skinkullan",true)addEventHandler("skinkullan",root,function(skin) local hesap = getPlayerAccount(source) setAccountData(hesap,"skin",skin) skinac()end)function skinac() for _, player in ipairs(getElementsByType("player")) do local acc = getPlayerAccount(player) if not isGuestAccount(acc) then local driving, vehicle = isPedDrivingVehicle ( player ) if driving then local skin = getAccountData(acc,"skin") if skin then setVehicleColor(vehicle,255,255,255) triggerClientEvent(root,"skinuygula",source,skin,vehicle,source,getSkinTextures()) end end end endend-- BINDKEYfunction panelBind(player) triggerClientEvent(player, "panelBind_Pre", player)endfunction bindPanel(player) local account = getPlayerAccount(player) if not isGuestAccount(account) then if aclGetGroup(grup) then local account_name = getAccountName(account) if isObjectInACLGroup("user."..account_name, aclGetGroup(grup)) then bindKey(player, bind, "down", panelBind) end else outputChatBox(grup.." adlı acl grubu bulunamadı.") end endendfunction denetle() if aclGetGroup(grup) then for _, player in ipairs(getElementsByType("player")) do local account = getPlayerAccount(player) if not isGuestAccount(account) then local account_name = getAccountName(account) if isObjectInACLGroup("user."..account_name, aclGetGroup(grup)) then bindKey(player, bind, "down", panelBind) end end end else outputChatBox(grup.." adlı acl grubu bulunamadı.") endendaddEventHandler("onResourceStart",resourceRoot,denetle)addEventHandler("onPlayerLogin", root, function() bindPanel(source)end)addEventHandler("onPlayerLogout", root, function(acc) local hesap_adi = getAccountName(acc) if isObjectInACLGroup("user."..hesap_adi, aclGetGroup(grup)) then unbindKey(source, bind, "down", panelBind) endend)-- HER EL BAŞI OTOMATİK UYGULAMAfunction elbasi() skinac()endaddEventHandler("onResourceStart",resourceRoot,elbasi)addEventHandler("onPlayerVehicleEnter",root,elbasi)-- GEREKLİ FONKSİYONLAR (ELLEME)function getSkinTextures() if ayar("ayar15") == "default" then return {"map","vehiclegrunge256"} elseif ayar("ayar15") ~= "default" and type(fromJSON(ayar("ayar15"))) == "table" then return fromJSON(ayar("ayar15")) else return {"map","vehiclegrunge256"} endendfunction ayar(value) if tonumber(get(value)) == nil then return tostring(get(value)) else return tonumber(get(value)) endendfunction isPedDrivingVehicle(ped) assert(isElement(ped) and (getElementType(ped) == "ped" or getElementType(ped) == "player"), "Bad argument @ isPedDrivingVehicle [ped/player expected, got " .. tostring(ped) .. "]") local isDriving = isPedInVehicle(ped) and getVehicleOccupant(getPedOccupiedVehicle(ped)) == ped return isDriving, isDriving and getPedOccupiedVehicle(ped) or nilend