THE PRINCE Posted April 12, 2015 Share Posted April 12, 2015 ألسلام عليكم ورحمة الله وبركاته , كيفكم شباب عساكم بخير أبي فنكيشن او كود مع مثال وهو :- عند ما يضغط اللاعب على زر يفتح لوحة معينة ابي تجي حركة للوحة قبل ماتفتح مثلا تتوهج او تجي من الاسفل وتفتح كاملآ بالمنتصف أو حركات ثانية , رجاءا الرد لآني محتاج الكود بسرعة ! Link to comment
The Killer Posted April 12, 2015 Share Posted April 12, 2015 Event # 'onClientGUIClick' function # guiSetVisible interpolateBetween Link to comment
THE PRINCE Posted April 12, 2015 Author Share Posted April 12, 2015 أرجوآ وضع مثال على ذلك + أنا قصدي مو من يضغط اللاعب زر داخل أللوحة لأ أقصد مثلا انا حطيت لوحة تفتح اف 7 وأبي من اللاعب يدوس أف 7 تجي حركة للوحة عندماتنفتح Link to comment
The Killer Posted April 12, 2015 Share Posted April 12, 2015 bindKey guiSetVisible interpolateBetween Link to comment
THE PRINCE Posted April 12, 2015 Author Share Posted April 12, 2015 ممكن توضيح ( عمل كود * لوسمحت لآن ماعرف كيفية أستخدام اخر واحدة ) Link to comment
yazan Posted April 12, 2015 Share Posted April 12, 2015 Window = guiCreateWindow(383, 213, 681, 393, "", false) guiSetVisible (Window,false) function open() if guiGetVisible(Window) == false then guiSetVisible (Window, true) [size=150] guiMoveRightToCenter(Window) [/size] showCursor(true) else showCursor(false) guiSetVisible (Window,false) end end bindKey ("F2", "down", open) 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 Link to comment
THE PRINCE Posted April 12, 2015 Author Share Posted April 12, 2015 (edited) ......................................... ......................................... ......................................... Edited April 13, 2015 by Guest Link to comment
shwaeki Posted April 12, 2015 Share Posted April 12, 2015 شوف سطر 161 [size=150] guiMoveRightToCenter(INFORM_WND) [/size] استبدله ب guiMoveRightToCenter(INFORM_WND) Link to comment
THE PRINCE Posted April 12, 2015 Author Share Posted April 12, 2015 سويته ماتظهر أللوحة Link to comment
yazan Posted April 12, 2015 Share Posted April 12, 2015 (edited) امسح [/size] خخخخخخخ lua كامله ما فيها ذي الكلمه ض1 من المنتدى حطيطها من اجل تبين لك انه هذه ينحط مع الفتح guiMoveRightToCenter(INFORM_WND) كذا خليه edit GUIEditor = { label = {} } local screenW, screenH = guiGetScreenSize() INFORM_WND = guiCreateWindow((screenW - 459) / 2, (screenH - 526) / 2, 459, 526, "=[ معلومات اللاعب ]=", false) guiWindowSetSizable(INFORM_WND, false) guiSetAlpha(INFORM_WND, 0.95) guiSetVisible(INFORM_WND,false) GUIEditor.label[1] = guiCreateLabel(158, 41, 151, 26, "=[ السيريال الخاص بك ]=", false, INFORM_WND) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 0, 251, 255) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[1], "center") Serial_Copy = guiCreateButton(158, 86, 151, 32, "=[ Copy |#| نسخ ]=", false, INFORM_WND) guiSetProperty(Serial_Copy, "NormalTextColour", "FFFF0066") GUIEditor.label[2] = guiCreateLabel(148, 160, 171, 27, "=[ اسم الحساب ألخاص بك ]=", false, INFORM_WND) guiSetFont(GUIEditor.label[2], "default-bold-small") guiLabelSetColor(GUIEditor.label[2], 0, 251, 255) guiLabelSetHorizontalAlign(GUIEditor.label[2], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[2], "center") AccName_Copy = guiCreateButton(158, 225, 151, 32, "=[ Copy |#| نسخ ]=", false, INFORM_WND) guiSetProperty(AccName_Copy, "NormalTextColour", "FFFF0066") GUIEditor.label[3] = guiCreateLabel(158, 299, 151, 26, "=[ النك نيم الخاص بك ]=", false, INFORM_WND) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 0, 251, 255) guiLabelSetHorizontalAlign(GUIEditor.label[3], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[3], "center") NickName_Copy = guiCreateButton(158, 360, 151, 32, "=[ Copy |#| نسخ ]=", false, INFORM_WND) guiSetProperty(NickName_Copy, "NormalTextColour", "FFFF0066") GUIEditor.label[4] = guiCreateLabel(0, 402, 460, 15, "===========================================================================", false, INFORM_WND) guiLabelSetColor(GUIEditor.label[4], 215, 0, 0) GUIEditor.label[5] = guiCreateLabel(144, 417, 180, 29, "=[ Created by MR.GRAND ]=", false, INFORM_WND) guiSetFont(GUIEditor.label[5], "default-bold-small") guiLabelSetColor(GUIEditor.label[5], 0, 251, 255) guiLabelSetHorizontalAlign(GUIEditor.label[5], "center", false) Close_Button = guiCreateButton(158, 463, 151, 32, "=[ Close |#| إغلاق ]=", false,INFORM_WND) guiSetProperty(Close_Button, "NormalTextColour", "FFFF0066") Serial_EDIT = guiCreateEdit(1012, 281, 348, 30, "",false,INFORM_WND) guiSetText(Serial_EDIT,"" .. getPlayerSerial()) guiSetAlpha(Serial_EDIT, 0.00) guiEditSetReadOnly(Serial_EDIT, true) Acc__EDIT = guiCreateEdit(1012, 327, 348, 30, "",false,INFORM_WND) guiSetText ( Acc__EDIT,getElementData(localPlayer,"AccountName") ) guiSetAlpha(Acc__EDIT, 0.00) guiEditSetReadOnly(Acc__EDIT, true) NickName_EDIT = guiCreateEdit(1012, 372, 348, 30, "",false,INFORM_WND) guiSetText(NickName_EDIT,"" .. getPlayerName(localPlayer) ) guiSetAlpha(NickName_EDIT, 0.00) guiEditSetReadOnly(NickName_EDIT, true) addEventHandler( "onClientElementDataChange", root, function( dataName, OldValue ) if ( source and dataName == "AccountName" ) then guiGetText ( Acc__EDIT,getElementData(localPlayer,"AccountName") ) end end ) addEventHandler('onClientPlayerChangeNick', root, function(oldNick, newNick) guiSetText(NickName_EDIT,"" .. newNick ) end ) addEventHandler("onClientGUIClick",root, function () if source == Close_Button then if ( guiGetVisible(INFORM_WND) == false ) then showCursor(true) end guiSetVisible ( INFORM_WND, false ) showCursor(false) guiSetInputEnabled(false) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function() if ( source == NickName_Copy ) then local text = guiGetText ( NickName_EDIT ) setClipboard( text ) end end ) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == NickName_Copy ) then if ( isTimer ( TimerEnabled ) ) then return end guiSetEnabled(NickName_Copy, true) guiSetText ( source, "تم نسخ النك نيم" ) TimerEnabled = setTimer ( guiSetText, 3000, 1, source, "=[ Copy |#| نسخ ]=" ) guiSetEnabled(source, false) setTimer(guiSetEnabled, 3000, 1, NickName_Copy, true) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function() if ( source == Serial_Copy ) then local text = guiGetText ( Serial_EDIT ) setClipboard( text ) end end ) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == Serial_Copy ) then if ( isTimer ( TimerEnabled ) ) then return end guiSetEnabled(Serial_Copy, true) guiSetText ( source, "تم نسخ السيريال" ) TimerEnabled = setTimer ( guiSetText, 3000, 1, source, "=[ Copy |#| نسخ ]=" ) guiSetEnabled(source, false) setTimer(guiSetEnabled, 3000, 1, Serial_Copy, true) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function() if ( source == AccName_Copy ) then local text = guiGetText ( Acc__EDIT ) setClipboard( text ) end end ) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == AccName_Copy ) then if ( isTimer ( TimerEnabled ) ) then return end guiSetEnabled(AccName_Copy, true) guiSetText ( source, "تم نسخ الحساب" ) TimerEnabled = setTimer ( guiSetText, 3000, 1, source, "=[ Copy |#| نسخ ]=" ) guiSetEnabled(source, false) setTimer(guiSetEnabled, 3000, 1, AccName_Copy, true) end end ) addEventHandler( "onClientElementDataChange", root, function( dataName, OldValue ) if ( source and dataName == "AccountName" ) then guiSetText ( Acc__EDIT,getElementData(localPlayer,"AccountName") ) end end ) function open() guiSetVisible(INFORM_WND,not guiGetVisible(INFORM_WND)) showCursor(guiGetVisible(INFORM_WND)) guiMoveRightToCenter(INFORM_WND) end bindKey ("F2", "down", open) 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 Edited April 12, 2015 by Guest Link to comment
THE PRINCE Posted April 12, 2015 Author Share Posted April 12, 2015 طيب ممكن خدمة ؟ سويه لي الكود عندك فوق ظبطه وحطه هنا ... ورح اكون ممتن لك Link to comment
terreus Posted April 12, 2015 Share Posted April 12, 2015 طيب ممكن خدمة ؟سويه لي الكود عندك فوق ظبطه وحطه هنا ... ورح اكون ممتن لك ذذ قسم طلبات أكواد مو طلب أكود كاملة و تركيبها في مودك Link to comment
THE PRINCE Posted April 12, 2015 Author Share Posted April 12, 2015 تم تعديله واشتغل خلاص , مشكورين على جهودكم 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