nxFairlywell Posted August 3, 2014 Share Posted August 3, 2014 السلام عليكم ورحمة الله وبركاته يَ شباب انا مسوي كود ولوحة تاج خاص للاعب يكتب اسم التاج في الإيديت edit box ويختار لون التاج المهم واجهتني مشكله مادري وين هي بالضبط وحايس في الكود من يومين كلنت --- local radio = guiRadioButtonSetSelected(RED,true) addEventHandler("onClientGUIClick", root, function() local getE = guiGetText ( edit ) if ( source == OK ) then elseif radio then triggerServerEvent("RED",localPlayer, getE, radio) end end ) سيرفر --- local root = getRootElement() --------------- -- RED Color --------------- function output(getE, radio, message) local name = getPlayerName(source) if ( getE ) then outputChatBox("[" ..getE.. "]".. name .. ":#bbbbbb " ..message, root, 255, 255, 255, true) end end addEventHandler("onPlayerChat", root, output) ---------------- -- events ---------------- addEvent("RED",true) addEventHandler("RED", getRootElement(), output) المشكله وانا اصلح الكود واجهتني مشاكل كثيره يعني مره جربت اعدل الآوت بوت واخترت لي اسم ولون يوم اتكلم بالشات يظهر الكلام الي اقوله بالشات مكان التاج صراحه الكود صغير لكنه اشغل تفكيري ولحس مخي لحححس Link to comment
#DRAGON!FIRE Posted August 3, 2014 Share Posted August 3, 2014 من ثم تسوي تريقر وتحط داتا ع اللاعب بـ الاسم اللي كتبه ( guiGetText ) يوم يحط يضغط الزر تتحقق انه كتب الاسم بـ استخدام ! وتجيب الداتا وتجيب اسمه وتسوي مخرج الشات cancelEvent وتسوي تحقق لو معاهـ داتا وتسوي onPlayerChat وتضيف حدث Link to comment
nxFairlywell Posted August 3, 2014 Author Share Posted August 3, 2014 من ثم تسوي تريقر وتحط داتا ع اللاعب بـ الاسم اللي كتبه ( guiGetText ) يوم يحط يضغط الزر تتحقق انه كتب الاسم بـ استخدام ! وتجيب الداتا وتجيب اسمه وتسوي مخرج الشات cancelEvent وتسوي تحقق لو معاهـ داتا وتسوي onPlayerChat وتضيف حدث #ثانكس ع المرور اسويها وارجع اكتب وش صار Link to comment
nxFairlywell Posted August 3, 2014 Author Share Posted August 3, 2014 سيرفر -- function output(getE, radio, message, thePlayer) local getData = getElementData ( thePlayer, "getName", getE ) local name = getPlayerName(source) if ( getData ) then outputChatBox("[" ..getE.. "]".. name .. ":#bbbbbb " ..message, root, 255, 255, 255, true) end end addEventHandler("onPlayerChat", root, output) كلنت -- local radio = guiRadioButtonSetSelected(RED,true) addEventHandler("onClientGUIClick", root, function( thePlayer ) local getE = guiGetText ( edit ) if ( source == OK ) then elseif getE then setElementData ( thePlayer, "getName", getE ) triggerServerEvent("RED",localPlayer, getE, radio) end end ) جربت كذا ماضبط ونفس الطريقة مايطلع شيء ألله يستر لايطلع فيه اخطاء واجد Link to comment
#DRAGON!FIRE Posted August 3, 2014 Share Posted August 3, 2014 (edited) addEventHandler( "onClientGUIClick", resourceRoot, function( ) if ( source == OK ) then if ( guiGetText ( edit ) ~= "" ) then if ( guiRadioButtonGetSelected( RED ) == true )then triggerServerEvent( "RED", localPlayer, guiGetText ( edit ) ) end end end end ) local saveTable = { } addEvent ( "RED", true ) addEventHandler ( "RED", root, function ( textName ) if ( textName ) then saveTable [ client ] = { textName, 0, 255, 255 } end end ) addEventHandler( "onPlayerChat", root, function ( msg, type ) if ( type == 0 ) then if ( saveTable [ source ] ) then cancelEvent ( ) return outputChatBox( "[ "..tostring ( saveTable [ source ][1] ).." ]: "..msg, root, saveTable [ source ][2], saveTable [ source ][3], saveTable [ source ][4], true ) end end end ) addEventHandler ( "onPlayerQuit", root, function ( ) if ( saveTable [ source ] ) then saveTable [ source ] = nil end end ) Edited November 5, 2014 by Guest Link to comment
nxFairlywell Posted August 3, 2014 Author Share Posted August 3, 2014 مشكور زاحف صراحه مادري كيف اشكرك بس كيف سويته وضبط #_# يَ رجال يومين احاول فيه ذذ Link to comment
#DRAGON!FIRE Posted August 3, 2014 Share Posted August 3, 2014 حياك الله بـ اي وقت .. سهل جدا .. تلاحظ اني سويته بالجدول وبلاش الداتا .. افضل . Link to comment
nxFairlywell Posted August 3, 2014 Author Share Posted August 3, 2014 صحيح الكود مافيه داتا يعني في اي سكربت ثاني اقدر استخدم جدول فاضي؟ Link to comment
nxFairlywell Posted August 3, 2014 Author Share Posted August 3, 2014 لا اقصد في سكربت ثاني اذا مثلا فيه سكربت مشابه لهذا السكربت اقدر استخدم التيبل فيه Link to comment
hassan.k.s.a Posted August 3, 2014 Share Posted August 3, 2014 لا اقصد في سكربت ثاني اذا مثلا فيه سكربت مشابه لهذا السكربتاقدر استخدم التيبل فيه اذا قصدك تستخدم الجدول ذا ف سكربت ثآني , ماتقدر Link to comment
nxFairlywell Posted August 3, 2014 Author Share Posted August 3, 2014 آهأ , منور الموضوع ^_^" _ مشكورين زاحف و حسن , Link to comment
#DRAGON!FIRE Posted August 3, 2014 Share Posted August 3, 2014 شيل اللوكال من صناعة التيبل وتقدر تستخدمه بـملفات ثانية بنفس السكربت Link to comment
nxFairlywell Posted August 3, 2014 Author Share Posted August 3, 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