0 Üye ve 1 Ziyaretçi konuyu incelemekte.
Belki konuyla alakalı değil ama buton isimleri oldukça saçma ve komik olmuş (Eminim, Emin Değilim)
Sanırım markeri clientte tetiklemiş. Client kodlarını atarsan yardımcı olacagım.
local markerler = { -- {x,y,z -1.1,tip,büyüklük,renk1 or r,renk2 or g,renk3 or b,sefaflik or alpha}, {-1392.029296875, -73.3203125, 14.1484375 -1.1,"cylinder", 1, 0, 0, 0, 0}, element = {}, renk = {0,0,0}, saniye = 10000, kac_defa = 1,}local panel_durum = "nil" -- :)local uyuyor = ""local anim1 = 2local olay = "nil"addEventHandler("onClientResourceStart", root, function() for i,v in ipairs(markerler) do local marker = createMarker(unpack(markerler[i])) table.insert(markerler.element, marker) addEventHandler("onClientMarkerHit",marker,olay1) addEventHandler("onClientMarkerLeave",marker,olay2) end end)function olay1() addEventHandler("onClientRender",root,render) panel_durum = "panel" showCursor(true) button_durum = true button_durum = trueendfunction eminim()removeEventHandler("onClientRender",root,render)addEventHandler("onClientRender",root,render_yazi)anim1 = 1olay = "devam"durum = truebutton_durum = falsefadeCamera(false, 1.0, unpack(markerler.renk))showChat(false)setTimer(function() fadeCamera(true,1) removeEventHandler("onClientRender",root,render) removeEventHandler("onClientRender",root,render_yazi) showChat(true) showCursor(false) anim1 = 2 yazi_durum = false outputChatBox(getPlayerName(localPlayer).." #ff0000Günaydın Asker.",255,255,255,true) durum = false button_durum = true uyuyor = "" end,markerler.saniye,markerler.kac_defa)endfunction emin_degilim() removeEventHandler("onClientRender",root,render) fadeCamera(true,1) showCursor(false) panel_durum = "nil" durum = false --button_durum = falseendfunction olay2() removeEventHandler("onClientRender",root,render) fadeCamera(true,1) showCursor(false) --button_durum = falseendlocal yazi_tipi = dxCreateFont("font.ttf",15)local screenW,screenH = guiGetScreenSize()g,u = 302,120px,py = screenW/2-g/2 ,screenH/2-u/2function render() if panel_durum == "panel" then panel_olustur(px,py,g,u," Uyku Sistemi",tocolor(170, 22, 173,255),[[ Uyumak istediğinize eminmisiniz? ]]) button_olustur("Uyu",px+22,py+60,250,22,60, 160, 35,yazi_tipi) button_olustur("Uyuma",px+22,py+90,250,22,165, 8, 8,yazi_tipi) endendfunction render_yazi() if olay == "devam" then anim1 = anim1 + 1 if(anim1<40)then uyuyor = "UYUYOR." end if(anim1>80)then uyuyor = "UYUYOR.." if(anim1>90)then uyuyor = "UYUYOR..." end end end dxDrawText(uyuyor, 0 - 1, 362 - 1, 1360 - 1, 407 - 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "bottom", false, false, false, true, false) dxDrawText(uyuyor, 0 + 1, 362 - 1, 1360 + 1, 407 - 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "bottom", false, false, false, true, false) dxDrawText(uyuyor, 0 - 1, 362 + 1, 1360 - 1, 407 + 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "bottom", false, false, false, true, false) dxDrawText(uyuyor, 0 + 1, 362 + 1, 1360 + 1, 407 + 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "bottom", false, false, false, true, false) dxDrawText(uyuyor, (screenW - 1360) / 2, (screenH - 45) / 2, ((screenW - 1360) / 2) + 1360, ( (screenH - 45) / 2) + 45, tocolor(254, 254, 254, 255), 2.00, "default-bold", "center", "bottom", false, false, false, true, false) dxDrawRectangle(screenW - 337 - 10, (screenH - 20) / 2, 337, 20, tocolor(10,10,10, 187), false) dxDrawText("#ffffff Uyanmak isterseniz #cc0000'space' #fffffftuşuna basınız.", screenW - 337 - 10, (screenH - 20) / 2, (screenW - 337 - 10) + 337, ( (screenH - 20) / 2) + 20, tocolor(255, 255, 255, 255), 0.7,yazi_tipi, "center", "center", false, false, false, true, false)endfunction panel_olustur(x,y,w,h,yazi,renk,bilgi) dxDrawRectangle(x,y,w,h,tocolor(0,0,0,180)) dxDrawRectangle(x,y,w,25,tocolor(0,0,0,120)) dxDrawRectangle(x,y+25,w,1,renk) dxDrawText(yazi,x,y,w+x,y+25,tocolor(255,255,255,255),0.8,yazi_tipi,"center","center") dxDrawText(bilgi,x,y+55,w+x,y+25,tocolor(255,255,255,255),0.6,yazi_tipi,"center","center")endfunction button_olustur(yazi,x,y,w,h,r,g,b,font) if isInSlot(x, y, w, h) then dxDrawRectangle(x, y, w, h,tocolor(r,g,b,120)); --dxDrawText(yazi,x-1,y-1,w+x,25+y,tocolor(0,0,0,255),0.7,font,"center","center",false,false,false,true) dxDrawText(yazi,x,y,w+x,22+y,tocolor(255,255,255,255),0.7,font,"center","center",false,false,false,true) -- çizgiler dxDrawRectangle(x,y,w,1,tocolor(0,0,0,255)) dxDrawRectangle(x,y+h,w,1,tocolor(0,0,0,255)) dxDrawRectangle(x,y,1,h,tocolor(0,0,0,255)) dxDrawRectangle(x+w-1,y,1,h,tocolor(0,0,0,255)) else dxDrawRectangle(x, y, w, h,tocolor(r,g,b,200)); --dxDrawText(yazi,x-1,y-1,w+x,20+y,tocolor(0,0,0,255),0.7,font,"center","center",false,false,false,true) dxDrawText(yazi,x,y,w+x,22+y,tocolor(255,255,255,255),0.7,font,"center","center",false,false,false,true) -- çizgiler dxDrawRectangle(x,y,w,1,tocolor(0,0,0,255)) dxDrawRectangle(x,y+h,w,1,tocolor(0,0,0,255)) dxDrawRectangle(x,y,1,h,tocolor(0,0,0,255)) dxDrawRectangle(x+w-1,y,1,h,tocolor(0,0,0,255)) endendfunction inBox(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 endendfunction isInSlot(xS,yS,wS,hS) if(isCursorShowing()) then XY = {guiGetScreenSize()} local cursorX, cursorY = getCursorPosition() cursorX, cursorY = cursorX*XY[1], cursorY*XY[2] if(inBox(xS,yS,wS,hS, cursorX, cursorY)) then return true else return false end end end--/ tıklama işlemi /--function tiklama_olay(button,state) if button_durum == true then if button == "left" and state == "down" and panel_durum == "panel" then --* misafir girdi *-- if isInSlot(px+22,py+60,250,22) and panel_durum == "panel" then -- eminim eminim() return end if isInSlot(px+22,py+90,250,22) and panel_durum == "panel" then emin_degilim() return end end end endaddEventHandler("onClientClick",root,tiklama_olay)--// TUŞ OLAYI //--function tus(tus,pres)if durum == true then if tus == "space" or pres == "down" then fadeCamera(true,1) removeEventHandler("onClientRender",root,render) removeEventHandler("onClientRender",root,render_yazi) showChat(true) showCursor(false) outputChatBox(getPlayerName(localPlayer).." #ff0000Günaydın Asker.",255,255,255,true) anim1 = 2 yazi_durum = false durum = false uyuyor = "" end endendaddEventHandler("onClientKey",root,tus)local pickup = createPickup(-1392.029296875, -73.3203125, 14.1484375, 3, 1272, 1)
Linki görebilmek için Kayıt olun yada Giriş yapın. marker yerine Linki görebilmek için Kayıt olun yada Giriş yapın. ve Linki görebilmek için Kayıt olun yada Giriş yapın. kullanabilirsincol oluştururken radius 2 felan yaparsan marker ile eş değer oluraynı yere marker da oluşturabilirsin görüntü açısından fakat onClientMarkerHit yerine onClientColShapeHit kullanırsan daha sağlıklı olucaktıreğğ bu arada sistem ile bi kaç yorum/öneride buluncamNe kadar uyulcağını sistem içinden belirlemek yerine uyucak kişi seçebilir.Panelin ortasına bi Linki görebilmek için Kayıt olun yada Giriş yapın. oluşturabilirsin. scrollPaneli oynattıkça kaç saat uyucağı panelde bir yere yazdırılır. (örnek:Linki görebilmek için Kayıt olun yada Giriş yapın.)oyuncu uyumadan önceki oyun saatini bi değişkene koyabilirsin. ne kadar saat seçmişse uyumadan önceki saate + yapıp oyuncunun oyun saatini ona göre ayarlarsan daha gerçeksi bir şey çıkabilir ortaya.Her saat 1 saniyeye eşit olaiblir. Her geçen saniyede scrollbar pozisyonnu eksiltebilirsinÖrnek bir video atıcam. Söylediklerim o zaman kafanda canlanıcaktır3:05 saniyeSpoiler for Hiden:
local markerler = { -- {x,y,z -1.1,tip,büyüklük,renk1 or r,renk2 or g,renk3 or b,sefaflik or alpha}, {-1392.029296875, -73.3203125, 14.1484375 -1.1,"cylinder", 1, 0, 0, 0, 0}, element = {}, renk = {0,0,0}, saniye = 10000, kac_defa = 1,}local panel_durum = "nil" -- :)local uyuyor = ""local anim1 = 2local olay = "nil"addEventHandler("onClientResourceStart", root, function() for i,v in ipairs(markerler) do local marker = createMarker(unpack(markerler[i])) table.insert(markerler.element, marker) addEventHandler("onClientMarkerHit",marker,olay1) addEventHandler("onClientMarkerLeave",marker,olay2) end end)function olay1(markere_giren) if markere_giren == localPlayer then -- eğer markere giren localPlayer yani sensen paneli tek sana göster. addEventHandler("onClientRender",root,render) panel_durum = "panel" showCursor(true) button_durum = true button_durum = true endendfunction eminim()removeEventHandler("onClientRender",root,render)addEventHandler("onClientRender",root,render_yazi)anim1 = 1olay = "devam"durum = truebutton_durum = falsefadeCamera(false, 1.0, unpack(markerler.renk))showChat(false)setTimer(function() fadeCamera(true,1) removeEventHandler("onClientRender",root,render) removeEventHandler("onClientRender",root,render_yazi) showChat(true) showCursor(false) anim1 = 2 yazi_durum = false outputChatBox(getPlayerName(localPlayer).." #ff0000Günaydın Asker.",255,255,255,true) durum = false button_durum = true uyuyor = "" end,markerler.saniye,markerler.kac_defa)endfunction emin_degilim() removeEventHandler("onClientRender",root,render) fadeCamera(true,1) showCursor(false) panel_durum = "nil" durum = false --button_durum = falseendfunction olay2() removeEventHandler("onClientRender",root,render) fadeCamera(true,1) showCursor(false) --button_durum = falseendlocal yazi_tipi = dxCreateFont("font.ttf",15)local screenW,screenH = guiGetScreenSize()g,u = 302,120px,py = screenW/2-g/2 ,screenH/2-u/2function render() if panel_durum == "panel" then panel_olustur(px,py,g,u," Uyku Sistemi",tocolor(170, 22, 173,255),[[ Uyumak istediğinize eminmisiniz? ]]) button_olustur("Uyu",px+22,py+60,250,22,60, 160, 35,yazi_tipi) button_olustur("Uyuma",px+22,py+90,250,22,165, 8, 8,yazi_tipi) endendfunction render_yazi() if olay == "devam" then anim1 = anim1 + 1 if(anim1<40)then uyuyor = "UYUYOR." end if(anim1>80)then uyuyor = "UYUYOR.." if(anim1>90)then uyuyor = "UYUYOR..." end end end dxDrawText(uyuyor, 0 - 1, 362 - 1, 1360 - 1, 407 - 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "bottom", false, false, false, true, false) dxDrawText(uyuyor, 0 + 1, 362 - 1, 1360 + 1, 407 - 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "bottom", false, false, false, true, false) dxDrawText(uyuyor, 0 - 1, 362 + 1, 1360 - 1, 407 + 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "bottom", false, false, false, true, false) dxDrawText(uyuyor, 0 + 1, 362 + 1, 1360 + 1, 407 + 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "bottom", false, false, false, true, false) dxDrawText(uyuyor, (screenW - 1360) / 2, (screenH - 45) / 2, ((screenW - 1360) / 2) + 1360, ( (screenH - 45) / 2) + 45, tocolor(254, 254, 254, 255), 2.00, "default-bold", "center", "bottom", false, false, false, true, false) dxDrawRectangle(screenW - 337 - 10, (screenH - 20) / 2, 337, 20, tocolor(10,10,10, 187), false) dxDrawText("#ffffff Uyanmak isterseniz #cc0000'space' #fffffftuşuna basınız.", screenW - 337 - 10, (screenH - 20) / 2, (screenW - 337 - 10) + 337, ( (screenH - 20) / 2) + 20, tocolor(255, 255, 255, 255), 0.7,yazi_tipi, "center", "center", false, false, false, true, false)endfunction panel_olustur(x,y,w,h,yazi,renk,bilgi) dxDrawRectangle(x,y,w,h,tocolor(0,0,0,180)) dxDrawRectangle(x,y,w,25,tocolor(0,0,0,120)) dxDrawRectangle(x,y+25,w,1,renk) dxDrawText(yazi,x,y,w+x,y+25,tocolor(255,255,255,255),0.8,yazi_tipi,"center","center") dxDrawText(bilgi,x,y+55,w+x,y+25,tocolor(255,255,255,255),0.6,yazi_tipi,"center","center")endfunction button_olustur(yazi,x,y,w,h,r,g,b,font) if isInSlot(x, y, w, h) then dxDrawRectangle(x, y, w, h,tocolor(r,g,b,120)); --dxDrawText(yazi,x-1,y-1,w+x,25+y,tocolor(0,0,0,255),0.7,font,"center","center",false,false,false,true) dxDrawText(yazi,x,y,w+x,22+y,tocolor(255,255,255,255),0.7,font,"center","center",false,false,false,true) -- çizgiler dxDrawRectangle(x,y,w,1,tocolor(0,0,0,255)) dxDrawRectangle(x,y+h,w,1,tocolor(0,0,0,255)) dxDrawRectangle(x,y,1,h,tocolor(0,0,0,255)) dxDrawRectangle(x+w-1,y,1,h,tocolor(0,0,0,255)) else dxDrawRectangle(x, y, w, h,tocolor(r,g,b,200)); --dxDrawText(yazi,x-1,y-1,w+x,20+y,tocolor(0,0,0,255),0.7,font,"center","center",false,false,false,true) dxDrawText(yazi,x,y,w+x,22+y,tocolor(255,255,255,255),0.7,font,"center","center",false,false,false,true) -- çizgiler dxDrawRectangle(x,y,w,1,tocolor(0,0,0,255)) dxDrawRectangle(x,y+h,w,1,tocolor(0,0,0,255)) dxDrawRectangle(x,y,1,h,tocolor(0,0,0,255)) dxDrawRectangle(x+w-1,y,1,h,tocolor(0,0,0,255)) endendfunction inBox(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 endendfunction isInSlot(xS,yS,wS,hS) if(isCursorShowing()) then XY = {guiGetScreenSize()} local cursorX, cursorY = getCursorPosition() cursorX, cursorY = cursorX*XY[1], cursorY*XY[2] if(inBox(xS,yS,wS,hS, cursorX, cursorY)) then return true else return false end end end--/ tıklama işlemi /--function tiklama_olay(button,state) if button_durum == true then if button == "left" and state == "down" and panel_durum == "panel" then --* misafir girdi *-- if isInSlot(px+22,py+60,250,22) and panel_durum == "panel" then -- eminim eminim() return end if isInSlot(px+22,py+90,250,22) and panel_durum == "panel" then emin_degilim() return end end end endaddEventHandler("onClientClick",root,tiklama_olay)--// TUŞ OLAYI //--function tus(tus,pres)if durum == true then if tus == "space" or pres == "down" then fadeCamera(true,1) removeEventHandler("onClientRender",root,render) removeEventHandler("onClientRender",root,render_yazi) showChat(true) showCursor(false) outputChatBox(getPlayerName(localPlayer).." #ff0000Günaydın Asker.",255,255,255,true) anim1 = 2 yazi_durum = false durum = false uyuyor = "" end endendaddEventHandler("onClientKey",root,tus)local pickup = createPickup(-1392.029296875, -73.3203125, 14.1484375, 3, 1272, 1)[/quote]
Çok mantıklı zamanın olunca yapmaya çalışıcağım.Mesaj Birleştirildi: [time]27 Şubat 2019, 21:56:20[/time]Buyur; sadece sen girince açılır panel zaman buldukca sistemi geliştiricem.Gerek,tasarım konusundan gerekse işlev.Kodlocal markerler = { -- {x,y,z -1.1,tip,büyüklük,renk1 or r,renk2 or g,renk3 or b,sefaflik or alpha}, {-1392.029296875, -73.3203125, 14.1484375 -1.1,"cylinder", 1, 0, 0, 0, 0}, element = {}, renk = {0,0,0}, saniye = 10000, kac_defa = 1,}local panel_durum = "nil" -- :)local uyuyor = ""local anim1 = 2local olay = "nil"addEventHandler("onClientResourceStart", root, function() for i,v in ipairs(markerler) do local marker = createMarker(unpack(markerler[i])) table.insert(markerler.element, marker) addEventHandler("onClientMarkerHit",marker,olay1) addEventHandler("onClientMarkerLeave",marker,olay2) end end)function olay1(markere_giren) if markere_giren == localPlayer then -- eğer markere giren localPlayer yani sensen paneli tek sana göster. addEventHandler("onClientRender",root,render) panel_durum = "panel" showCursor(true) button_durum = true button_durum = true endendfunction eminim()removeEventHandler("onClientRender",root,render)addEventHandler("onClientRender",root,render_yazi)anim1 = 1olay = "devam"durum = truebutton_durum = falsefadeCamera(false, 1.0, unpack(markerler.renk))showChat(false)setTimer(function() fadeCamera(true,1) removeEventHandler("onClientRender",root,render) removeEventHandler("onClientRender",root,render_yazi) showChat(true) showCursor(false) anim1 = 2 yazi_durum = false outputChatBox(getPlayerName(localPlayer).." #ff0000Günaydın Asker.",255,255,255,true) durum = false button_durum = true uyuyor = "" end,markerler.saniye,markerler.kac_defa)endfunction emin_degilim() removeEventHandler("onClientRender",root,render) fadeCamera(true,1) showCursor(false) panel_durum = "nil" durum = false --button_durum = falseendfunction olay2() removeEventHandler("onClientRender",root,render) fadeCamera(true,1) showCursor(false) --button_durum = falseendlocal yazi_tipi = dxCreateFont("font.ttf",15)local screenW,screenH = guiGetScreenSize()g,u = 302,120px,py = screenW/2-g/2 ,screenH/2-u/2function render() if panel_durum == "panel" then panel_olustur(px,py,g,u," Uyku Sistemi",tocolor(170, 22, 173,255),[[ Uyumak istediğinize eminmisiniz? ]]) button_olustur("Uyu",px+22,py+60,250,22,60, 160, 35,yazi_tipi) button_olustur("Uyuma",px+22,py+90,250,22,165, 8, 8,yazi_tipi) endendfunction render_yazi() if olay == "devam" then anim1 = anim1 + 1 if(anim1<40)then uyuyor = "UYUYOR." end if(anim1>80)then uyuyor = "UYUYOR.." if(anim1>90)then uyuyor = "UYUYOR..." end end end dxDrawText(uyuyor, 0 - 1, 362 - 1, 1360 - 1, 407 - 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "bottom", false, false, false, true, false) dxDrawText(uyuyor, 0 + 1, 362 - 1, 1360 + 1, 407 - 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "bottom", false, false, false, true, false) dxDrawText(uyuyor, 0 - 1, 362 + 1, 1360 - 1, 407 + 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "bottom", false, false, false, true, false) dxDrawText(uyuyor, 0 + 1, 362 + 1, 1360 + 1, 407 + 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "bottom", false, false, false, true, false) dxDrawText(uyuyor, (screenW - 1360) / 2, (screenH - 45) / 2, ((screenW - 1360) / 2) + 1360, ( (screenH - 45) / 2) + 45, tocolor(254, 254, 254, 255), 2.00, "default-bold", "center", "bottom", false, false, false, true, false) dxDrawRectangle(screenW - 337 - 10, (screenH - 20) / 2, 337, 20, tocolor(10,10,10, 187), false) dxDrawText("#ffffff Uyanmak isterseniz #cc0000'space' #fffffftuşuna basınız.", screenW - 337 - 10, (screenH - 20) / 2, (screenW - 337 - 10) + 337, ( (screenH - 20) / 2) + 20, tocolor(255, 255, 255, 255), 0.7,yazi_tipi, "center", "center", false, false, false, true, false)endfunction panel_olustur(x,y,w,h,yazi,renk,bilgi) dxDrawRectangle(x,y,w,h,tocolor(0,0,0,180)) dxDrawRectangle(x,y,w,25,tocolor(0,0,0,120)) dxDrawRectangle(x,y+25,w,1,renk) dxDrawText(yazi,x,y,w+x,y+25,tocolor(255,255,255,255),0.8,yazi_tipi,"center","center") dxDrawText(bilgi,x,y+55,w+x,y+25,tocolor(255,255,255,255),0.6,yazi_tipi,"center","center")endfunction button_olustur(yazi,x,y,w,h,r,g,b,font) if isInSlot(x, y, w, h) then dxDrawRectangle(x, y, w, h,tocolor(r,g,b,120)); --dxDrawText(yazi,x-1,y-1,w+x,25+y,tocolor(0,0,0,255),0.7,font,"center","center",false,false,false,true) dxDrawText(yazi,x,y,w+x,22+y,tocolor(255,255,255,255),0.7,font,"center","center",false,false,false,true) -- çizgiler dxDrawRectangle(x,y,w,1,tocolor(0,0,0,255)) dxDrawRectangle(x,y+h,w,1,tocolor(0,0,0,255)) dxDrawRectangle(x,y,1,h,tocolor(0,0,0,255)) dxDrawRectangle(x+w-1,y,1,h,tocolor(0,0,0,255)) else dxDrawRectangle(x, y, w, h,tocolor(r,g,b,200)); --dxDrawText(yazi,x-1,y-1,w+x,20+y,tocolor(0,0,0,255),0.7,font,"center","center",false,false,false,true) dxDrawText(yazi,x,y,w+x,22+y,tocolor(255,255,255,255),0.7,font,"center","center",false,false,false,true) -- çizgiler dxDrawRectangle(x,y,w,1,tocolor(0,0,0,255)) dxDrawRectangle(x,y+h,w,1,tocolor(0,0,0,255)) dxDrawRectangle(x,y,1,h,tocolor(0,0,0,255)) dxDrawRectangle(x+w-1,y,1,h,tocolor(0,0,0,255)) endendfunction inBox(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 endendfunction isInSlot(xS,yS,wS,hS) if(isCursorShowing()) then XY = {guiGetScreenSize()} local cursorX, cursorY = getCursorPosition() cursorX, cursorY = cursorX*XY[1], cursorY*XY[2] if(inBox(xS,yS,wS,hS, cursorX, cursorY)) then return true else return false end end end--/ tıklama işlemi /--function tiklama_olay(button,state) if button_durum == true then if button == "left" and state == "down" and panel_durum == "panel" then --* misafir girdi *-- if isInSlot(px+22,py+60,250,22) and panel_durum == "panel" then -- eminim eminim() return end if isInSlot(px+22,py+90,250,22) and panel_durum == "panel" then emin_degilim() return end end end endaddEventHandler("onClientClick",root,tiklama_olay)--// TUŞ OLAYI //--function tus(tus,pres)if durum == true then if tus == "space" or pres == "down" then fadeCamera(true,1) removeEventHandler("onClientRender",root,render) removeEventHandler("onClientRender",root,render_yazi) showChat(true) showCursor(false) outputChatBox(getPlayerName(localPlayer).." #ff0000Günaydın Asker.",255,255,255,true) anim1 = 2 yazi_durum = false durum = false uyuyor = "" end endendaddEventHandler("onClientKey",root,tus)local pickup = createPickup(-1392.029296875, -73.3203125, 14.1484375, 3, 1272, 1)
local markerler = { -- {x,y,z -1.1,tip,büyüklük,renk1 or r,renk2 or g,renk3 or b,sefaflik or alpha}, {-1392.029296875, -73.3203125, 14.1484375 -1.1,"cylinder", 1, 0, 0, 0, 0}, element = {}, renk = {0,0,0}, saniye = 10000, kac_defa = 1,}local panel_durum = "nil" -- :)local uyuyor = ""local anim1 = 2local olay = "nil"addEventHandler("onClientResourceStart", root, function() for i,v in ipairs(markerler) do local marker = createMarker(unpack(markerler[i])) table.insert(markerler.element, marker) addEventHandler("onClientMarkerHit",marker,olay1) addEventHandler("onClientMarkerLeave",marker,olay2) end end)function olay1(markere_giren) if markere_giren == localPlayer then -- eğer markere giren localPlayer yani sensen paneli tek sana göster. addEventHandler("onClientRender",root,render) panel_durum = "panel" showCursor(true) button_durum = true button_durum = true endendfunction eminim()removeEventHandler("onClientRender",root,render)addEventHandler("onClientRender",root,render_yazi)anim1 = 1olay = "devam"durum = truebutton_durum = falsefadeCamera(false, 1.0, unpack(markerler.renk))showChat(false)setTimer(function() fadeCamera(true,1) removeEventHandler("onClientRender",root,render) removeEventHandler("onClientRender",root,render_yazi) showChat(true) showCursor(false) anim1 = 2 yazi_durum = false outputChatBox(getPlayerName(localPlayer).." #ff0000Günaydın Asker.",255,255,255,true) durum = false button_durum = true uyuyor = "" end,markerler.saniye,markerler.kac_defa)endfunction emin_degilim() removeEventHandler("onClientRender",root,render) fadeCamera(true,1) showCursor(false) panel_durum = "nil" durum = false --button_durum = falseendfunction olay2() removeEventHandler("onClientRender",root,render) fadeCamera(true,1) showCursor(false) --button_durum = falseendlocal yazi_tipi = dxCreateFont("font.ttf",15)local screenW,screenH = guiGetScreenSize()g,u = 302,120px,py = screenW/2-g/2 ,screenH/2-u/2function render() if panel_durum == "panel" then panel_olustur(px,py,g,u," Uyku Sistemi",tocolor(170, 22, 173,255),[[ Uyumak istediğinize eminmisiniz? ]]) button_olustur("Uyu",px+22,py+60,250,22,60, 160, 35,yazi_tipi) button_olustur("Uyuma",px+22,py+90,250,22,165, 8, 8,yazi_tipi) endendfunction render_yazi() if olay == "devam" then anim1 = anim1 + 1 if(anim1<40)then uyuyor = "UYUYOR." end if(anim1>80)then uyuyor = "UYUYOR.." if(anim1>90)then uyuyor = "UYUYOR..." end end end dxDrawText(uyuyor, 0 - 1, 362 - 1, 1360 - 1, 407 - 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "bottom", false, false, false, true, false) dxDrawText(uyuyor, 0 + 1, 362 - 1, 1360 + 1, 407 - 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "bottom", false, false, false, true, false) dxDrawText(uyuyor, 0 - 1, 362 + 1, 1360 - 1, 407 + 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "bottom", false, false, false, true, false) dxDrawText(uyuyor, 0 + 1, 362 + 1, 1360 + 1, 407 + 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "bottom", false, false, false, true, false) dxDrawText(uyuyor, (screenW - 1360) / 2, (screenH - 45) / 2, ((screenW - 1360) / 2) + 1360, ( (screenH - 45) / 2) + 45, tocolor(254, 254, 254, 255), 2.00, "default-bold", "center", "bottom", false, false, false, true, false) dxDrawRectangle(screenW - 337 - 10, (screenH - 20) / 2, 337, 20, tocolor(10,10,10, 187), false) dxDrawText("#ffffff Uyanmak isterseniz #cc0000'space' #fffffftuşuna basınız.", screenW - 337 - 10, (screenH - 20) / 2, (screenW - 337 - 10) + 337, ( (screenH - 20) / 2) + 20, tocolor(255, 255, 255, 255), 0.7,yazi_tipi, "center", "center", false, false, false, true, false)endfunction panel_olustur(x,y,w,h,yazi,renk,bilgi) dxDrawRectangle(x,y,w,h,tocolor(0,0,0,180)) dxDrawRectangle(x,y,w,25,tocolor(0,0,0,120)) dxDrawRectangle(x,y+25,w,1,renk) dxDrawText(yazi,x,y,w+x,y+25,tocolor(255,255,255,255),0.8,yazi_tipi,"center","center") dxDrawText(bilgi,x,y+55,w+x,y+25,tocolor(255,255,255,255),0.6,yazi_tipi,"center","center")endfunction button_olustur(yazi,x,y,w,h,r,g,b,font) if isInSlot(x, y, w, h) then dxDrawRectangle(x, y, w, h,tocolor(r,g,b,120)); --dxDrawText(yazi,x-1,y-1,w+x,25+y,tocolor(0,0,0,255),0.7,font,"center","center",false,false,false,true) dxDrawText(yazi,x,y,w+x,22+y,tocolor(255,255,255,255),0.7,font,"center","center",false,false,false,true) -- çizgiler dxDrawRectangle(x,y,w,1,tocolor(0,0,0,255)) dxDrawRectangle(x,y+h,w,1,tocolor(0,0,0,255)) dxDrawRectangle(x,y,1,h,tocolor(0,0,0,255)) dxDrawRectangle(x+w-1,y,1,h,tocolor(0,0,0,255)) else dxDrawRectangle(x, y, w, h,tocolor(r,g,b,200)); --dxDrawText(yazi,x-1,y-1,w+x,20+y,tocolor(0,0,0,255),0.7,font,"center","center",false,false,false,true) dxDrawText(yazi,x,y,w+x,22+y,tocolor(255,255,255,255),0.7,font,"center","center",false,false,false,true) -- çizgiler dxDrawRectangle(x,y,w,1,tocolor(0,0,0,255)) dxDrawRectangle(x,y+h,w,1,tocolor(0,0,0,255)) dxDrawRectangle(x,y,1,h,tocolor(0,0,0,255)) dxDrawRectangle(x+w-1,y,1,h,tocolor(0,0,0,255)) endendfunction inBox(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 endendfunction isInSlot(xS,yS,wS,hS) if(isCursorShowing()) then XY = {guiGetScreenSize()} local cursorX, cursorY = getCursorPosition() cursorX, cursorY = cursorX*XY[1], cursorY*XY[2] if(inBox(xS,yS,wS,hS, cursorX, cursorY)) then return true else return false end end end--/ tıklama işlemi /--function tiklama_olay(button,state) if button_durum == true then if button == "left" and state == "down" and panel_durum == "panel" then --* misafir girdi *-- if isInSlot(px+22,py+60,250,22) and panel_durum == "panel" then -- eminim eminim() return end if isInSlot(px+22,py+90,250,22) and panel_durum == "panel" then emin_degilim() return end end end endaddEventHandler("onClientClick",root,tiklama_olay)--// TUŞ OLAYI //--function tus(tus,pres)if durum == true then if tus == "space" or pres == "down" then fadeCamera(true,1) removeEventHandler("onClientRender",root,render) removeEventHandler("onClientRender",root,render_yazi) showChat(true) showCursor(false) outputChatBox(getPlayerName(localPlayer).." #ff0000Günaydın Asker.",255,255,255,true) anim1 = 2 yazi_durum = false durum = false uyuyor = "" end endendaddEventHandler("onClientKey",root,tus)local pickup = createPickup(-1392.029296875, -73.3203125, 14.1484375, 3, 1272, 1)