3DNAN_! Posted July 31, 2017 Share Posted July 31, 2017 السلام عليكم أنا بحاول أسوي مود عباره عن نظام أسئله بس في كود محتاجه وحاولت كثير بس ما قدرت اضبط المود والمود كله واقف علي الكود ده فأرجو مساعدتي أنا مسوي لوحه في 3 EDIT BOX وbutton الإديت بوكس الاولي برمجتها اني لما اكتب سؤال يظهر بالشات وكذلك الإديت بوكس رقم 3 برمجتها انه لما اضغط نفس الزر يطلع بالشات الذي يجاوب علي السؤال سوف يحصل علي المبلغ اللي انا حددته ------------------------------------------------------------------------------- المطلوب -------- بالنسبه للإديت بوكس الثانيه هيا اللي واقفه معي ابي اني لما اكتب فيها كلمه ( الجواب حق السؤال اللي بالخانه الأولي ) ما يظهر شئ بالشات ولاكن لو حد كتب بالشات الجواب اللي هو نفسه اللي انا كاتبه بالإديت بوكس حق الجواب يظهر بالشات إسم الاعب اللي كتب الإجابه الصح وأنه حصل علي المبلغ المحدد ويعطيه المبلغ المحدد اللي انا محدده بالإديت بوكس رقم 3 Link to comment
3DNAN_! Posted July 31, 2017 Author Share Posted July 31, 2017 منا عارف ان هنستخدم onPlayerChat بس المشكله ان الكود ده سيرفر وانا كنت شغال فيالكلينت ومش عارف اضبط الكود حاولت اني اضبطه بس ما ضبط وعملت تريجر بس ما عرفت اضبطها Link to comment
Mhmd.z Posted July 31, 2017 Share Posted July 31, 2017 4 minutes ago, 3DNAN_! said: منا عارف ان هنستخدم onPlayerChat بس المشكله ان الكود ده سيرفر وانا كنت شغال فيالكلينت ومش عارف اضبط الكود حاولت اني اضبطه بس ما ضبط وعملت تريجر بس ما عرفت اضبطها ورينا محاولتك Link to comment
3DNAN_! Posted August 1, 2017 Author Share Posted August 1, 2017 Client -------- GUIEditor = { button = {}, window = {}, edit = {}, label = {} } GUIEditor.window[1] = guiCreateWindow(213, 214, 580, 307, "Question Panel", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1],false) GUIEditor.label[1] = guiCreateLabel(477, 279, 93, 16, "Script by:3DNAN", false, GUIEditor.window[1]) GUIEditor.edit[1] = guiCreateEdit(78, 61, 427, 28, "", false, GUIEditor.window[1]) GUIEditor.label[2] = guiCreateLabel(250, 36, 82, 15, "قم بكتابة سؤالك", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 246, 6, 243) GUIEditor.label[3] = guiCreateLabel(256, 99, 66, 15, "جواب السؤال", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[3], 246, 6, 243) GUIEditor.edit[2] = guiCreateEdit(78, 124, 427, 28, "", false, GUIEditor.window[1]) GUIEditor.label[4] = guiCreateLabel(238, 162, 106, 15, "قم بتحديد مبلغ للرابح", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[4], 246, 6, 243) GUIEditor.edit[3] = guiCreateEdit(78, 187, 427, 28, "", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(368, 231, 137, 34, "Start", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF28F805") GUIEditor.button[2] = guiCreateButton(225, 231, 137, 34, "* Soon *", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF0DD6EE") GUIEditor.button[3] = guiCreateButton(78, 231, 137, 34, "X", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], "default-bold-small") guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFE0000") bindKey( "f3", "down", function() if guiGetVisible(GUIEditor.window[1]) then guiSetVisible( GUIEditor.window[1], false ) showCursor(false) else guiSetVisible( GUIEditor.window[1], true ) showCursor(true) end end ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor.button[3] then guiSetVisible( GUIEditor.window[1], false ) showCursor(false) end end ) addEventHandler ( "onClientGUIClick", root , function () if source == GUIEditor.button[1] then local Text = guiGetText ( GUIEditor.edit[1] ) outputChatBox( "#0099CC[ System - questions ] : #ff0000"..Text , 255 , 0 , 0 , true ) end end ) addEventHandler ( "onClientGUIClick", root , function () if source == GUIEditor.button[1] then local tex = guiGetText ( GUIEditor.edit[3] ) outputChatBox( "#0099CC[ System - questions ] : #ff0000The person who answers the question will get [ #0099cc"..tex.. " #ff0000] $" , 255 , 0 , 0 , true ) end end ) addEventHandler("onClientGUIClick", root, function() if source == money then local money = guiGetText( GUIEditor.edit[3] ) triggerServerEvent( "mm" , localPlayer , money ) end end ) server ----------- addEvent( "mm" , true ) addEventHandler( "mm" , source , function ( money ) givePlayerMoney( source , money ) outputChatBox("[ "getPlayerName(source).." ]#0099CC[ System - questions ] : #ff0000The person who answers the question will get [ #0099cc"..tex.. " #ff0000] $" , 255 , 0 , 0 , true ) end ) addEventHandler ( "onClientGUIClick", root , function () if source == GUIEditor.button[1] then ans = guiGetText ( GUIEditor.edit[2] ) end end ) addEventHandler ( "onPlayerChat" , root , function ( msg ) if msg == ..ans then outputChatBox ("#0099cc[ System - questions ] : #00ff00 Congratulation [ "..getPlayerName.." #00ff00] the answer "..ans , root , 255 , 0 , 0 , true ) givePlayerMoney ( source , ) end end ) تقريبا انا لغبت بعد ما كنت ماشي صح بس أنا عايز اضبط الكود ضروري Link to comment
|M.r|LooFe| Posted August 1, 2017 Share Posted August 1, 2017 هذا المود سبق وأنا صممته بعطيك كل اكواد ملف سيرفر وانت عدل يعني كود كامل بس انت عدل --سيرفر stat = false ans = nil rw = 0 addEvent("onStartAsking",true) addEventHandler("onStartAsking",root, function (gs,answer,rew) stat = true ans = answer rw = rew outputChatBox("## #0069c7the Question Is :#ffffff " .. gs,root,255,0,0,true) outputChatBox("## #0069c7Question Reward :#00ff00 " .. rew .. "$",root,255,0,0,true) end ) addEventHandler("onPlayerChat",root, function (msg) if stat == true then if msg == ans then givePlayerMoney(source,rw) outputChatBox("## #0069c7the Winner Is :#ff0000 " .. getPlayerName(source) .. " #0069c7And the Answer Was #ffffff( " .. ans .. " )",root,255,0,0,true) stat = false ans = nil rw = 0 end end end ) ولو تبي كلينت بعطيك 1 Link to comment
3DNAN_! Posted August 1, 2017 Author Share Posted August 1, 2017 يب ياريت تجيب الكلينت عشان افهم الكود منيح Link to comment
|M.r|LooFe| Posted August 1, 2017 Share Posted August 1, 2017 9 minutes ago, 3DNAN_! said: يب ياريت تجيب الكلينت عشان افهم الكود منيح يخوي كذا ما ينفع بس لازم تتعلم على الاكواد تفضل addEventHandler("onClientGUIClick",root, function () if source == ask then local gs = guiGetText(qus) local answer = guiGetText(ans) local raw = guiGetText(rw) if string.len(gs) > 0 and string.len(answer) > 0 and string.len(raw) > 0 and tonumber(raw) then triggerServerEvent("onStartAsking",localPlayer,gs,answer,raw) else outputChatBox("# Error In Details. Please Check Question Information",255,0,0) end end end ) 1 Link to comment
3DNAN_! Posted August 1, 2017 Author Share Posted August 1, 2017 [16:13:16] ERROR: Client (3DNAN_!) triggered serverside event onStartAsking, but event is not added serverside [DUP x2] ذا الكلام اللي طلع لما جرب الكود حقك Link to comment
|M.r|LooFe| Posted August 1, 2017 Share Posted August 1, 2017 1 hour ago, 3DNAN_! said: [16:13:16] ERROR: Client (3DNAN_!) triggered serverside event onStartAsking, but event is not added serverside [DUP x2] ذا الكلام اللي طلع لما جرب الكود حقك يخوي الكود صحيح انت مخربط بشي بكرا اصمملك الكلينت ربطهم لك مع الاكواد الان مو فاضي -- كلينت addEventHandler("onClientGUIClick",root, function () if source == ask then local gs = guiGetText(qus) local answer = guiGetText(ans) local raw = guiGetText(rw) if string.len(gs) > 0 and string.len(answer) > 0 and string.len(raw) > 0 and tonumber(raw) then triggerServerEvent("onAsking",localPlayer,gs,answer,raw) else outputChatBox("# Error In Details. Please Check Question Information",255,0,0) end end end ) --سيرفر stat = false ans = nil rw = 0 addEvent("onAsking",true) addEventHandler("onAsking",root, function (gs,answer,rew) stat = true ans = answer rw = rew outputChatBox("## #0069c7the Question Is :#ffffff " .. gs,root,255,0,0,true) outputChatBox("## #0069c7Question Reward :#00ff00 " .. rew .. "$",root,255,0,0,true) end ) addEventHandler("onPlayerChat",root, function (msg) if stat == true then if msg == ans then givePlayerMoney(source,rw) outputChatBox("## #0069c7the Winner Is :#ff0000 " .. getPlayerName(source) .. " #0069c7And the Answer Was #ffffff( " .. ans .. " )",root,255,0,0,true) stat = false ans = nil rw = 0 end end end ) المشكلة كانت في الترايقر اسمه لو ما نجح عدل اسم الترايقر Link to comment
3DNAN_! Posted August 1, 2017 Author Share Posted August 1, 2017 (edited) نفس الكلام وعدلته كذا مره يقول ان الترايجر موجود بالكلينت ومش موجود في نظاق السيرفر خذ حراحتك عادي لو مو فاضي اليوم هاته بكرا Edited August 1, 2017 by 3DNAN_! Link to comment
|M.r|LooFe| Posted August 1, 2017 Share Posted August 1, 2017 يخوي انا ساعدتك بالاكواد الاكواد صحيحة انت مو عارف تتستخدمكها انا يلي علي سويته غير هيك ما اقدر اصلا المفروض اعطيك فنكشنات بس لانه انا مصمم المود قبل شهر فحبيت اساعدك باكواده Link to comment
iMr.WiFi..! Posted August 1, 2017 Share Posted August 1, 2017 1 hour ago, 3DNAN_! said: نفس الكلام وعدلته كذا مره يقول ان الترايجر موجود بالكلينت ومش موجود في نظاق السيرفر خذ حراحتك عادي لو مو فاضي اليوم هاته بكرا أرسل الميتا وخلنا نشوف الاكواد ؛ وارسل الاكواد بعد التعديل Link to comment
Dr.Marco Posted August 1, 2017 Share Posted August 1, 2017 اخ عيني يمكن في مود منشور زي فكرتك استعين به Link to comment
3DNAN_! Posted August 2, 2017 Author Share Posted August 2, 2017 شكرا يا شباب الكود اشتغل بس أنا سويت غلطه بسيطه جدا لما عملت المتا أنا ببدأ خطوه بخطوه فعرفت المتا علي ملف الكلينت فقط والحين لما عرفت ملف السيرفر اشتغل شكرا لكم علي المساعده يرجي إغلاق الموضوع 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