Team,Jordan Posted July 4, 2015 Share Posted July 4, 2015 لاهنتم ابي كود يخلي الوحه تجي من فوق تنززل لي من تحت من زر يعني ادا ضغطت اف5 تجي لوحه من فوق Link to comment
iMr.Dawix~# Posted July 5, 2015 Share Posted July 5, 2015 بسم الله الرحمن الرحيم Client gui library لتحريك الواجهه من فوق لـ الوسط استخدم الكود هذا TimeGuiSetTopC = { } function guiMoveTopToCenter(gui) if getElementData(gui,"HelhGui") == false then setElementData(gui,"HelhGui",true) local s1,s2=guiGetScreenSize() local w1,w2=guiGetSize(gui,false) local x,y = (s1-w1)/2,(s2-w2)/2 guiSetPosition(gui,x,-w2,false) TimeGuiSetTopC[gui] = setTimer(guiMoveTopToCenter,50,0,gui) end local a,b=guiGetScreenSize() local w1,w2=guiGetSize(gui,false) local x,y = (a-w1)/2,(b-w2)/2 local x1,y1 = guiGetPosition ( gui, false) if (y1 >= y) then killTimer(TimeGuiSetTopC[gui]) setElementData(gui,"HelhGui",false) else guiSetPosition(gui,x1,(y1+10),false) end end لتحريك الواجهه لـ اليمين لـ الوسط استخدم الكود هذا TimeGuiSetRightC = { } function guiMoveRightToCenter(gui) if getElementData(gui,"HelhGui") == false then setElementData(gui,"HelhGui",true) local s1,s2=guiGetScreenSize() local w1,w2=guiGetSize(gui,false) local x,y = (s1-w1)/2,(s2-w2)/2 guiSetPosition(gui,-x,y,false) TimeGuiSetRightC[gui] = setTimer(guiMoveRightToCenter,50,0,gui) end local a,b=guiGetScreenSize() local w1,w2=guiGetSize(gui,false) local x,y = (a-w1)/2,(b-w2)/2 local x1,y1 = guiGetPosition ( gui, false) if (x1 >= x) then killTimer(TimeGuiSetRightC[gui]) setElementData(gui,"HelhGui",false) else guiSetPosition(gui,x1+10,y,false) end end لتحريك الواجهه من تحت لـ الوسط استخدم الكود هذا TimeGuiSetDownC = { } function guiMoveDownToCenter(gui) if getElementData(gui,"HelhGui") == false then setElementData(gui,"HelhGui",true) local s1,s2=guiGetScreenSize() local w1,w2=guiGetSize(gui,false) local x,y = (s1-w1)/2,(s2-w2)/2 guiSetPosition(gui,x,(w2*4),false) TimeGuiSetDownC[gui] = setTimer(guiMoveDownToCenter,50,0,gui) end local a,b=guiGetScreenSize() local w1,w2=guiGetSize(gui,false) local x,y = (a-w1)/2,(b-w2)/2 local x1,y1 = guiGetPosition ( gui, false) if (y1 <= y) then killTimer(TimeGuiSetDownC[gui]) setElementData(gui,"HelhGui",false) else guiSetPosition(gui,x1,(y1-10),false) end end لتحريك الواجهه لليسار لـ الوسط استخدم الكود هذا TimeGuiSetLeftC = { } function guiMoveLeftToCenter(gui) if getElementData(gui,"HelhGui") == false then setElementData(gui,"HelhGui",true) local s1,s2=guiGetScreenSize() local w1,w2=guiGetSize(gui,false) local x,y = (s1-w1)/2,(s2-w2)/2 guiSetPosition(gui,(w1*4),(y),false) TimeGuiSetLeftC[gui] = setTimer(guiMoveLeftToCenter,50,0,gui) end local a,b=guiGetScreenSize() local w1,w2=guiGetSize(gui,false) local x,y = (a-w1)/2,(b-w2)/2 local x1,y1 = guiGetPosition ( gui, false) if (x1 <= x) then killTimer(TimeGuiSetLeftC[gui]) setElementData(gui,"HelhGui",false) else guiSetPosition(gui,(x1-10),y1,false) end end ----------------------------------------------------- مثآل TimeGuiSetLeftC = { } function guiMoveLeftToCenter(gui) if getElementData(gui,"HelhGui") == false then setElementData(gui,"HelhGui",true) local s1,s2=guiGetScreenSize() local w1,w2=guiGetSize(gui,false) local x,y = (s1-w1)/2,(s2-w2)/2 guiSetPosition(gui,(w1*4),(y),false) TimeGuiSetLeftC[gui] = setTimer(guiMoveLeftToCenter,50,0,gui) end local a,b=guiGetScreenSize() local w1,w2=guiGetSize(gui,false) local x,y = (a-w1)/2,(b-w2)/2 local x1,y1 = guiGetPosition ( gui, false) if (x1 <= x) then killTimer(TimeGuiSetLeftC[gui]) setElementData(gui,"HelhGui",false) else guiSetPosition(gui,(x1-10),y1,false) end end addEventHandler( "onClientResourceStart",resourceRoot, function ( startedRes ) myWindow = guiCreateWindow ( 0, 0, 0.3, 0.3, "Booo", true ) myLabel = guiCreateLabel ( 0.2,0.2,0.3, 0.3, "u Love Me ?",true,myWindow) guiMoveLeftToCenter(myWindow) end ) Link to comment
Mr.Ronaldo Posted July 13, 2015 Share Posted July 13, 2015 (edited) bindKey("زر فتح النافذه", "down", function() if isMove then return end if guiGetVisible( window ) then -- تغيير window لاسم النافذه guiSetVisible(window, false) showCursor(false) else guiSetPosition(window, -700, 200, false) guiSetVisible(window, true) showCursor(true) if isTimer(Time) then return end Time = setTimer(function() local x, y = guiGetPosition(window, false) guiSetPosition(window, x + 13, y, false)-- يمكنك تعديلها لجعلها تنزل من فوق للوسط عن طريق تعديل (Y) end, 50, 50) isWindowMove(true) setTimer(isWindowMove, 100, 1, false) end end ) Edited July 13, 2015 by Guest Link to comment
Jupi Posted July 13, 2015 Share Posted July 13, 2015 bindKey("زر فتح النافذه", "down", function() if isMove then return end if guiGetVisible( window ) then -- تغيير window لاسم النافذه guiSetVisible(window, false) showCursor(false) else if getElementInterior(localPlayer) == 0 and getElementDimension(localPlayer) == 0 then guiSetPosition(window, -700, 200, false) guiSetVisible(window, true) showCursor(true) if isTimer(Time) then return end Time = setTimer(function() local x, y = guiGetPosition(window, false) guiSetPosition(window, x + 13, y, false)-- يمكنك تعديلها لجعلها تنزل من فوق للوسط عن طريق تعديل (Y) end, 50, 50) isWindowMove(true) setTimer(isWindowMove, 100, 1, false) end end end ) سؤال للاخ MR.R كودك احسه هريسة =_= وش دخل الInterior و Dimnsion في كود فتح نافذة Link to comment
MoDeR2014 Posted July 13, 2015 Share Posted July 13, 2015 bindKey("زر فتح النافذه", "down", function() if isMove then return end if guiGetVisible( window ) then -- تغيير window لاسم النافذه guiSetVisible(window, false) showCursor(false) else if getElementInterior(localPlayer) == 0 and getElementDimension(localPlayer) == 0 then guiSetPosition(window, -700, 200, false) guiSetVisible(window, true) showCursor(true) if isTimer(Time) then return end Time = setTimer(function() local x, y = guiGetPosition(window, false) guiSetPosition(window, x + 13, y, false)-- يمكنك تعديلها لجعلها تنزل من فوق للوسط عن طريق تعديل (Y) end, 50, 50) isWindowMove(true) setTimer(isWindowMove, 100, 1, false) end end end ) سؤال للاخ MR.R كودك احسه هريسة =_= وش دخل الInterior و Dimnsion في كود فتح نافذة يتحقق منهم انهم اذا كانو 0 تفتح له اللوحه بس اكيد هو جايبه نسخ لصق عشان الي طلب الكود ما طلب لا تحقق ولا شي بس طلب تحريك النافذه Link to comment
Jupi Posted July 13, 2015 Share Posted July 13, 2015 bindKey("زر فتح النافذه", "down", function() if isMove then return end if guiGetVisible( window ) then -- تغيير window لاسم النافذه guiSetVisible(window, false) showCursor(false) else if getElementInterior(localPlayer) == 0 and getElementDimension(localPlayer) == 0 then guiSetPosition(window, -700, 200, false) guiSetVisible(window, true) showCursor(true) if isTimer(Time) then return end Time = setTimer(function() local x, y = guiGetPosition(window, false) guiSetPosition(window, x + 13, y, false)-- يمكنك تعديلها لجعلها تنزل من فوق للوسط عن طريق تعديل (Y) end, 50, 50) isWindowMove(true) setTimer(isWindowMove, 100, 1, false) end end end ) سؤال للاخ MR.R كودك احسه هريسة =_= وش دخل الInterior و Dimnsion في كود فتح نافذة يتحقق منهم انهم اذا كانو 0 تفتح له اللوحه بس اكيد هو جايبه نسخ لصق عشان الي طلب الكود ما طلب لا تحقق ولا شي بس طلب تحريك النافذه فاهم الكود انا بس السؤال هو وش فادتهم هنا ~_~ طيب لو واحد جوا بيت مثلا و يبي يفتح اللوحة Link to comment
Mr.Ronaldo Posted July 13, 2015 Share Posted July 13, 2015 ما لاحظتها ههه اسف + تم التعديل Link to comment
Jupi Posted July 13, 2015 Share Posted July 13, 2015 ما لاحظتها ههه اسف + تم التعديل كمان سؤال هو انت اللي مسوي ذا الكود Link to comment
Mr.Ronaldo Posted July 13, 2015 Share Posted July 13, 2015 ما لاحظتها ههه اسف + تم التعديل كمان سؤال هو انت اللي مسوي ذا الكود انا بجي اساعد الرجال لكن ما بجي مشان تسألني انا الى مسوي الكود او لا -__- Link to comment
TAPL Posted July 13, 2015 Share Posted July 13, 2015 ما لاحظتها ههه اسف + تم التعديل كمان سؤال هو انت اللي مسوي ذا الكود انا بجي اساعد الرجال لكن ما بجي مشان تسألني انا الى مسوي الكود او لا -__- ذولا مو معرفين من وين جبتهم isMove isWindowMove تساعد بكود انت نفسك مو فاهمه Link to comment
b11 Posted July 13, 2015 Share Posted July 13, 2015 TimeGuiSetLeftC = { } function guiMoveLeftToCenter(gui) if getElementData(gui,"HelhGui") == false then setElementData(gui,"HelhGui",true) local s1,s2=guiGetScreenSize() local w1,w2=guiGetSize(gui,false) local x,y = (s1-w1)/2,(s2-w2)/2 guiSetPosition(gui,(w1*4),(y),false) TimeGuiSetLeftC[gui] = setTimer(guiMoveLeftToCenter,50,0,gui) end local a,b=guiGetScreenSize() local w1,w2=guiGetSize(gui,false) local x,y = (a-w1)/2,(b-w2)/2 local x1,y1 = guiGetPosition ( gui, false) if (x1 <= x) then killTimer(TimeGuiSetLeftC[gui]) setElementData(gui,"HelhGui",false) else guiSetPosition(gui,(x1-10),y1,false) end end addEventHandler( "onClientResourceStart",resourceRoot, function ( startedRes ) myWindow = guiCreateWindow ( 0, 0, 0.3, 0.3, "Booo", true ) -- لوحة myLabel = guiCreateLabel ( 0.2,0.2,0.3, 0.3, "u Love Me ?",true,myWindow) -- لبل تجربه ضض guiMoveLeftToCenter(myWindow) -- ذذ لازم تضعه يوم تضع الكوود لي فوق end ) ذذ كوًد افضل ’ Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now