MA[S]RIY Posted June 16, 2017 Share Posted June 16, 2017 السلام عليكم اوالا ابي اكواد التسجيل التلقائي ------ ثانيا كيف احط صوره ع زر = البوتون ------------- ثالثا كيف اخلي اليبل يكون لونه اسود ولما احط عليه سهم الماوس يكون لونه احمر اشيل السهم من عليه يرجع اسود وهكذا # ؟ Link to comment
Adham Posted June 16, 2017 Share Posted June 16, 2017 اولأ: التسجل التلقائي executeSQLQuery او db functions ثانيأ: من مود guieditor نفسه ثالثأ "onClientMouseEnter" guiLabelSetColor Link to comment
AHMED MOSTAFA Posted June 16, 2017 Share Posted June 16, 2017 تقدر تستعمل حفظ البيانات حق لوحة التسجيل عن طريق ملفات xml و وقت اللاعب يدخل سوي ارجاع للقيم الموجودة ( من ملف كلينت ) وارسلها بالترايجر لملف سيرفر اللي فيه امر التسجيل 1 Link to comment
coNolel Posted June 16, 2017 Share Posted June 16, 2017 طلبك الثالت لو تبيه دي إكس استعمل اليوزفل فنكشن function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end Link to comment
N3xT Posted June 16, 2017 Share Posted June 16, 2017 On 16/06/2017 at 17:31, coNolel said: طلبك الثالت لو تبيه دي إكس استعمل اليوزفل فنكشن function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end Expand ذا يتحقق من مكان الماوس ماله شغل بتغيير اللون 1 Link to comment
MR.StoRm Posted June 16, 2017 Share Posted June 16, 2017 On 16/06/2017 at 17:19, Deativated said: اولأ: التسجل التلقائي executeSQLQuery او db functions ثانيأ: من مود guieditor نفسه ثالثأ "onClientMouseEnter" guiLabelSetColor Expand + "onClientMouseLeave" Link to comment
MA[S]RIY Posted June 16, 2017 Author Share Posted June 16, 2017 طيب الطلب الثالث كيف تخلي لما الماوس يلمس الي بل او يخرج من الليل لو ممكن مثال # Link to comment
^iiEcoo'x_) Posted June 16, 2017 Share Posted June 16, 2017 addEventHandler( "onClientMouseEnter", getRootElement(), function(aX, aY) outputChatBox( "You're pointing at a GUI element at ("..tostring(aX)..", "..tostring(aY)..")") end ) Link to comment
coNolel Posted June 16, 2017 Share Posted June 16, 2017 On 16/06/2017 at 17:57, N3xT said: ذا يتحقق من مكان الماوس ماله شغل بتغيير اللون Expand الله عليك بس يعني ما يقدر يسوي متغير باللون ويغيره ؟ Link to comment
MA[S]RIY Posted June 16, 2017 Author Share Posted June 16, 2017 On 16/06/2017 at 19:56, #_iMr.[E]coo said: addEventHandler( "onClientMouseEnter", getRootElement(), function(aX, aY) outputChatBox( "You're pointing at a GUI element at ("..tostring(aX)..", "..tostring(aY)..")") end ) Expand اخي ذا مثال الويكي ابي مثال منك يكون بسيط وسهل Link to comment
Adham Posted June 16, 2017 Share Posted June 16, 2017 (edited) addEventHandler ( "onClientMouseEnter", resouceRoot, function ( ) if source == label then guiLabelSetColor ( label, 255, 255, 255 ) end end ) addEventHandler ( "onClientMouseLeave", resouceRoot, function ( ) if source == label then guiLabelSetColor ( label, 255, 255, 0 ) end end ) Edited June 16, 2017 by Deativated Link to comment
MA[S]RIY Posted June 17, 2017 Author Share Posted June 17, 2017 On 16/06/2017 at 23:52, Deativated said: addEventHandler ( "onClientMouseEnter", resouceRoot, function ( ) if source == label then guiLabelSetColor ( label, 255, 255, 255 ) end end ) addEventHandler ( "onClientMouseLeave", resouceRoot, function ( ) if source == label then guiLabelSetColor ( label, 255, 255, 0 ) end end ) Expand اولا مشكور علي ذا الطلب ^ ثانيا طلب وضع صوره ع زر تمام لاكن م تقدر تضغط ع الزر وش الحل ؟ Link to comment
Master_MTA Posted June 17, 2017 Share Posted June 17, 2017 function guiCreateButton(x,y,x1,y1,bla) local img=guicreatestaticimage(x,y,x1,y1,blabla) local lbl=guiCreateLabel(x,y,x1,y1,blalalala) return img end طبعا الكود غير صحيح لكن انا عطيتك فكره حاول بنفسك On 17/06/2017 at 05:36, MA[S]RIY said: اولا مشكور علي ذا الطلب ^ ثانيا طلب وضع صوره ع زر تمام لاكن م تقدر تضغط ع الزر وش الحل ؟ Expand Link to comment
MA[S]RIY Posted June 17, 2017 Author Share Posted June 17, 2017 معلش انا مو فاهم وش يعني return img ممكن احد يشرحها لي ؟ Link to comment
` Allawi Posted June 17, 2017 Share Posted June 17, 2017 On 17/06/2017 at 15:00, MA[S]RIY said: معلش انا مو فاهم وش يعني return img ممكن احد يشرحها لي ؟ Expand تعني إرجاع القيمة كمثال توضيحي function getPlayerName ( player ) return "Allawi" end addEventHandler ( "onPlayerChat", root, function ( message, type ) if ( type == 0 ) then cancelEvent ( ) outputChatBox ( getPlayerName ( source ) .. ": " .. message ) end end ) الأن هنا عندما تقوم بالكتابة في الشات يحضر لك إسم اللاعب ورسالته هنا وضعنا بدلاً من أن يضع إسم اللاعب يقوم بوضع إسم إختياري وهو "Allawi" إن شاء الله تكون فهمت .. Link to comment
MA[S]RIY Posted June 17, 2017 Author Share Posted June 17, 2017 On 17/06/2017 at 16:33, ` Allawi said: تعني إرجاع القيمة كمثال توضيحي function getPlayerName ( player ) return "Allawi" end addEventHandler ( "onPlayerChat", root, function ( message, type ) if ( type == 0 ) then cancelEvent ( ) outputChatBox ( getPlayerName ( source ) .. ": " .. message ) end end ) الأن هنا عندما تقوم بالكتابة في الشات يحضر لك إسم اللاعب ورسالته هنا وضعنا بدلاً من أن يضع إسم اللاعب يقوم بوضع إسم إختياري وهو "Allawi" إن شاء الله تكون فهمت .. Expand فهمت بس في شئ بسيط وش يعني ذا الكود if ( type == 0 ) then Link to comment
` Allawi Posted June 17, 2017 Share Posted June 17, 2017 On 17/06/2017 at 16:41, MA[S]RIY said: فهمت بس في شئ بسيط وش يعني ذا الكود if ( type == 0 ) then Expand هذا تحقق من نوع الرسالة وهو الارقمنت الثاني من حدث عند الكتابة في الشات وتوجد له 3 أنواع يمكنك قراءة الويكي لمعرفة المزيد onPlayerChat Link to comment
^iiEcoo'x_) Posted June 17, 2017 Share Posted June 17, 2017 موجود شرح بقسم شروحات البرمجة Link to comment
F_F Posted June 17, 2017 Share Posted June 17, 2017 كخبير في اللغة ساشرح لك الارقمنتات "onPlayerChat" message = الرسالة messagetype = نوع الرسالة اول نوع وهي رسالة عادية ثاني نوع : رسالة شخصية ثالث نوع : رسالة للفريق Link to comment
#Soking Posted June 17, 2017 Share Posted June 17, 2017 On 17/06/2017 at 21:42, F_F said: كخبير في اللغة ساشرح لك الارقمنتات "onPlayerChat" message = الرسالة messagetype = نوع الرسالة اول نوع وهي رسالة عادية ثاني نوع : رسالة شخصية ثالث نوع : رسالة للفريق Expand Link to comment
MA[S]RIY Posted June 18, 2017 Author Share Posted June 18, 2017 On 17/06/2017 at 07:30, Master_MTA said: function guiCreateButton(x,y,x1,y1,bla) local img=guicreatestaticimage(x,y,x1,y1,blabla) local lbl=guiCreateLabel(x,y,x1,y1,blalalala) return img end طبعا الكود غير صحيح لكن انا عطيتك فكره حاول بنفسك Expand سويت الكود لاكن الزر اختفي خالص اكنو مو موجود الكود function b1() log = guiCreateButton(187, 127, 88, 38,"", false, wnd) imgl = guiCreateStaticImage(187, 127, 88, 38, "gg.png", false, wnd) lbll =guiCreateLabelguiCreateLabel(187, 127, 88, 38, "Login", false, wnd) return imgl end ياريت حد يعدلو يخليه تمام #Edit: ابي مثل ذي Link to comment
Master_MTA Posted June 18, 2017 Share Posted June 18, 2017 function guiCreateButton(x,y,x1,y1,text,state,realative,png) local imgl = guiCreateStaticImage(x,y,x1,y1,png, state, realative) local lbll =guiCreateLabelguiCreateLabel(x+0.4,y,x1,y1, text, state, realative) return imgl end log = guiCreateButton(187, 127, 88, 38,"Login", false, wnd,'gg.png') ------------نجي للشرح ---------------187, 127, 88, 38,"Login", false, wnd الى هنا كانك سويت زر عادي -------------------------gg.pngذي الصوره اللي تبي تحطها مكان الزر On 18/06/2017 at 01:22, MA[S]RIY said: سويت الكود لاكن الزر اختفي خالص اكنو مو موجود الكود function b1() log = guiCreateButton(187, 127, 88, 38,"", false, wnd) imgl = guiCreateStaticImage(187, 127, 88, 38, "gg.png", false, wnd) lbll =guiCreateLabelguiCreateLabel(187, 127, 88, 38, "Login", false, wnd) return imgl end ياريت حد يعدلو يخليه تمام #Edit: ابي مثل ذي Expand بالتوفيق Link to comment
iMr.WiFi..! Posted June 18, 2017 Share Posted June 18, 2017 On 18/06/2017 at 02:38, Master_MTA said: function guiCreateButton(x,y,x1,y1,text,state,realative,png) local imgl = guiCreateStaticImage(x,y,x1,y1,png, state, realative) local lbll =guiCreateLabelguiCreateLabel(x+0.4,y,x1,y1, text, state, realative) return imgl end log = guiCreateButton(187, 127, 88, 38,"Login", false, wnd,'gg.png') ------------نجي للشرح ---------------187, 127, 88, 38,"Login", false, wnd الى هنا كانك سويت زر عادي -------------------------gg.pngذي الصوره اللي تبي تحطها مكان الزر بالتوفيق Expand في خطأ بسطر الثالث Link to comment
MA[S]RIY Posted June 18, 2017 Author Share Posted June 18, 2017 (edited) علي ما اظن كده صح لو غلط قول ؟ -- function guiCreateButton(x,y,x1,y1,text,state,realative,png) local imgl = guiCreateStaticImage(x,y,x1,y1,png, state, realative) local lbll =guiCreateLabel(x+0.4,y,x1,y1, text, state, realative) return imgl end log = guiCreateButton(187, 127, 88, 38,"Login", false, wnd,'gg.png') صح كده # ؟ Edited June 18, 2017 by MA[S]RIY Link to comment
Master_MTA Posted June 18, 2017 Share Posted June 18, 2017 On 18/06/2017 at 05:04, iMr.WiFi..! said: في خطأ بسطر الثالث Expand قصدك الرابع كررت الفنكشن بالخطا اعذروني +_+ 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