+Source|> Posted November 9, 2017 Share Posted November 9, 2017 function gridRe() guiGridListClear( grid ) for i, v in ipairs( Ques ) do local row = guiGridListAddRow( grid ) guiGridListSetItemText( grid, row, 1, i .. ' -', false, false ) guiGridListSetItemText( grid, row, 2, tostring( v[1] ), false, false ) guiGridListSetItemColor( grid, row, 1, 255, 230, 58, 255 ) guiGridListSetItemColor( grid, row, 2, math.random( 255 ), math.random( 255 ), math.random( 255 ) ) end end function wnd_W( Rank, Owners ) local ee = guiGridListGetItemText( grid, guiGridListGetSelectedItem( grid ), 2 ) if ee == 'كيف أحصل على رتبة ؟' then guiSetText( ansrmemo, Rank ) elseif ee == 'من هم أصحـاب السـيرفـر ؟' then guiSetText( ansrmemo, Owners ) end end addEventHandler('onClientGUIClick', root, wnd_W ) Rank = xmlLoadFile( "Rank.xml" ) Rank1 = xmlNodeGetValue( Rank ) Owners = xmlLoadFile( "Owners.xml" ) Owners1 = xmlNodeGetValue( Owners ) wnd_W ( Rank1, Owners1 ) وش الخطأ؟؟ Link to comment
#[K]aTakuRI-,? Posted November 9, 2017 Share Posted November 9, 2017 4 minutes ago, Source|> said: function gridRe() guiGridListClear( grid ) for i, v in ipairs( Ques ) do local row = guiGridListAddRow( grid ) guiGridListSetItemText( grid, row, 1, i .. ' -', false, false ) guiGridListSetItemText( grid, row, 2, tostring( v[1] ), false, false ) guiGridListSetItemColor( grid, row, 1, 255, 230, 58, 255 ) guiGridListSetItemColor( grid, row, 2, math.random( 255 ), math.random( 255 ), math.random( 255 ) ) end end function wnd_W( Rank, Owners ) local ee = guiGridListGetItemText( grid, guiGridListGetSelectedItem( grid ), 2 ) if ee == 'كيف أحصل على رتبة ؟' then guiSetText( ansrmemo, Rank ) elseif ee == 'من هم أصحـاب السـيرفـر ؟' then guiSetText( ansrmemo, Owners ) end end addEventHandler('onClientGUIClick', root, wnd_W ) Rank = xmlLoadFile( "Rank.xml" ) Rank1 = xmlNodeGetValue( Rank ) Owners = xmlLoadFile( "Owners.xml" ) Owners1 = xmlNodeGetValue( Owners ) wnd_W ( Rank1, Owners1 ) وش الخطأ؟؟ الحين ايش تبي تسوي بلضبط ؟ لو تبي تسويه هيك سوي افضل شئ جدول مش لازم xml Link to comment
1337.Ibrahim Posted November 9, 2017 Share Posted November 9, 2017 تبي تجيب اسماء الاونرس؟ Link to comment
+Source|> Posted November 9, 2017 Author Share Posted November 9, 2017 1 minute ago, #_'Lu[F]Fy said: الحين ايش تبي تسوي بلضبط ؟ لوحه فيها قريد ليست فيها أسئلة اللي يسئلها الزوار ولما يضغط على رو من الجريد ليست تجي الأجوبه في ميمو هذي Link to comment
#[K]aTakuRI-,? Posted November 9, 2017 Share Posted November 9, 2017 Just now, Source|> said: لوحه فيها قريد ليست فيها أسئلة اللي يسئلها الزوار ولما يضغط على رو من الجريد ليست تجي الأجوبه في ميمو هذي الافضل انك تسوي جدول صدقني Link to comment
+Source|> Posted November 9, 2017 Author Share Posted November 9, 2017 Just now, #_'Lu[F]Fy said: الافضل انك تسوي جدول صدقني شلون؟ Link to comment
#[K]aTakuRI-,? Posted November 9, 2017 Share Posted November 9, 2017 table = { {"من هم اصحاب السيرفر ؟","+Source|> - Mr.6rB"}, -- إلخ } بوريك مثال Link to comment
+Source|> Posted November 9, 2017 Author Share Posted November 9, 2017 1 minute ago, #_'Lu[F]Fy said: table = { {"من هم اصحاب السيرفر ؟","+Source|> - Mr.6rB"}, -- إلخ } بوريك مثال طيب الحين لو ابي اكتب بالميمو كلام كثير كيف؟ Link to comment
#[K]aTakuRI-,? Posted November 9, 2017 Share Posted November 9, 2017 (edited) 5 minutes ago, Source|> said: طيب الحين لو ابي اكتب بالميمو كلام كثير كيف؟ تسوي n/والكلام لو تبي تسوي انتر ثوان بعطيك مثال help = { {"من هم صحاب السيرفر ؟","+Source|> - Mr.6rB"}, {"من هم صحاب السيرفر ؟","+Source|> - Mr.6rB"}, -- إلخ {"من هم صحاب السيرفر ؟","+Source|> - Mr.6rB"}, -- إلخ } for i,k in ipairs (help) do cff = guiGridListAddRow (grid) guiGridListSetItemText (grid,cff,1,k[1],false,false) guiGridListSetItemData (grid,cff,1,k[2]) guiGridListSetItemColor(grid,cff,1,math.random(255),math.random(255),math.random(255)) end addEventHandler("onClientGUIClick",grid, function() local seld = guiGridListGetSelectedItem(grid) if seld ~= -1 then local data = guiGridListGetItemData(grid,guiGridListGetSelectedItem (grid) ,2) guiSetText(ansrmemo, data) end end,false) Edited November 9, 2017 by #_'Lu[F]Fy Link to comment
+Source|> Posted November 9, 2017 Author Share Posted November 9, 2017 4 minutes ago, #_'Lu[F]Fy said: تسوي n/والكلام لو تبي تسوي انتر ما نفعت '+Source /n Mr.6rB' Link to comment
#[K]aTakuRI-,? Posted November 9, 2017 Share Posted November 9, 2017 Just now, Source|> said: ما نفعت '+Source /n Mr.6rB' ثواني Link to comment
1337.Ibrahim Posted November 9, 2017 Share Posted November 9, 2017 (edited) 2 minutes ago, Source|> said: ما نفعت '+Source /n Mr.6rB' \n not /n Edited November 9, 2017 by Talis 1 Link to comment
+Source|> Posted November 9, 2017 Author Share Posted November 9, 2017 Just now, #_'Lu[F]Fy said: ثواني اسمع انا ابي اللي يظهر بالميمو الكلام اللي كتبته بملف xml Link to comment
#[K]aTakuRI-,? Posted November 9, 2017 Share Posted November 9, 2017 \n Just now, Source|> said: اسمع انا ابي اللي يظهر بالميمو الكلام اللي كتبته بملف xml جدول افضل واسهل 6 minutes ago, Talis said: \n not /n anyway Link to comment
+Source|> Posted November 9, 2017 Author Share Posted November 9, 2017 11 minutes ago, #_'Lu[F]Fy said: \n جدول افضل واسهل 11 minutes ago, Talis said: \ not / يعطيكم العافيه 1 Link to comment
#[K]aTakuRI-,? Posted November 9, 2017 Share Posted November 9, 2017 Just now, Source|> said: يعطيكم العافيه حياك الله Link to comment
Ahmed Ly Posted November 9, 2017 Share Posted November 9, 2017 function gridRe() guiGridListClear( grid ) for i, v in ipairs( Ques ) do local row = guiGridListAddRow( grid ) guiGridListSetItemText( grid, row, 1, i .. ' -', false, false ) guiGridListSetItemText( grid, row, 2, tostring( v[1] ), false, false ) guiGridListSetItemColor( grid, row, 1, 255, 230, 58, 255 ) guiGridListSetItemColor( grid, row, 2, math.random( 255 ), math.random( 255 ), math.random( 255 ) ) end end -- code function getNameAdmin (file,str,numberss,types,numbertypes) if type(file) == "string" and type(str) == "string" and type(numberss) == "number" then local root = xmlLoadFile (file) local node = xmlFindChild (root,str,numberss) local inte = xmlFindChild (node,types,numbertypes) local info = xmlNodeGetValue ( inte ) return info end end function wnd_W( ) local ee = guiGridListGetItemText( grid, guiGridListGetSelectedItem( grid ), 2 ) if ee == 'من هم أصحـاب السـيرفـر ؟' then for i = 0,1 do m = getNameAdmin("namexml.xml","Admins",0,"Admin",i) guiSetText( ansrmemo,""..m.."") end end end addEventHandler('onClientGUIClick', root, wnd_W ) <root> <Admins> <Admin>Source</Admin> <Admin>Mr.6rB</Admin> </Admins> </root> Link to comment
iMr.WiFi..! Posted November 9, 2017 Share Posted November 9, 2017 (edited) وعليكم السلام ! Xml File (questions.xml) : <questions> <question question="من هم اصحاب السيرفر"> <answer>Source</answer> <answer>Anotherone</answer> </question> </questions> Client : local gridlist = gridlist -- put your gridlist here local memo = memo -- put your memo here local xml = xmlLoadFile("questions.xml") for index, node in pairs ( xmlNodeGetChildren ( xml ) ) do local question = xmlNodeGetAttribute ( node, "question" ) local answers = { } for key, answer in pairs ( xmlNodeGetChildren ( node ) ) do table.insert ( answers, xmlNodeGetValue( answer ) ) end local row = guiGridListAddRow ( gridlist ) guiGridListSetItemText ( gridlist, row, 1, question .."?", false, false ) guiGridListSetItemData ( gridlist, row, 1, answers ) end xmlUnloadFile(xml) addEventHandler ( "onClientGUIClick", root, function ( ) if source == gridlist then local selected = guiGridListGetSelectedItem ( gridlist ) if selected ~= -1 then guiSetText ( memo, table.concat( guiGridListGetItemData ( gridlist, selected ), '\n' ) ) end end end ) Edited November 9, 2017 by iMr.WiFi..! 2 Link to comment
+Source|> Posted November 13, 2017 Author Share Posted November 13, 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