^#Dream Posted August 21, 2014 Share Posted August 21, 2014 السسلآم عليكم انا جرب فنكشن بو حق تحريك النافذه من اليسار الى الوسطط سويت باول الملف 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,200,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 وتحت صناعة النافذهه guiMoveLeftToCenter ( wnd ) بس لو شغلت السكربت النافذه بالوسط ماتجي من اليسار الى الوسط Link to comment
xX|KeMo|Xx Posted August 21, 2014 Share Posted August 21, 2014 شوف المثال حقه وسوي مثله انت مو موضح شيء https://wiki.multitheftauto.com/wiki/Gu ... ftToCenter او اطرح كود النافذه ومتى تبيها تشتغل .. Link to comment
xX|KeMo|Xx Posted August 21, 2014 Share Posted August 21, 2014 طيب جرب هذا الكود كنت مسويه من مدهـ اتوقع من اليمين للنص function movetocenter(move_window) local kemo = 0 local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(move_window,false) local x = (screenW-windowW)/2 + 1000 local y = (screenH-windowH)/2 guiSetPosition(move_window,x,y,false) guiSetVisible(move_window,true) setTimer(function() kemo = kemo + 50 guiSetPosition(move_window,x-kemo ,y,false) end,50, 20) end movetocenter(wind) بدال wind نافذتك Link to comment
^#Dream Posted August 21, 2014 Author Share Posted August 21, 2014 الله يعطيك العافيةة زبط 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