#RoLde Posted October 4, 2018 Share Posted October 4, 2018 السلام عليكم اليوم واجهتني مشكلة بكود اني اضيف لاعبين في جريد ليست علي حسب الداتا حقتهم تكون اكثر من 1 وباقي اللاعبين يشوفوهم عادي بالجريد وهذي محاولتي ومافي ديبق function addWantedPlayers( ) guiGridListClear(wantedlist) for i,player in ipairs ( getElementsByType("player") ) do if getPlayerTeam(player) == "Priates" then if getElementData(player, "WantedM") > 1 then local row = guiGridListAddRow(wantedlist) guiGridListSetItemText(wantedlist, row,1, getPlayerName(player), false, false) guiGridListSetItemText(wantedlist, row,2, convertNumber(getElementData(player,"WantedM")), false, false) guiGridListSetItemColor(wantedlist, row, 1, 255,0,0,255) guiGridListSetItemColor(wantedlist, row, 1, 0,255,0,255) end end end end addEventHandler("onClientPlayerChangeNick", root, addWantedPlayers) addEventHandler("onClientResourceStart",root, addWantedPlayers) addEventHandler("onClientPlayerJoin",root, addWantedPlayers) addEventHandler("onClientPlayerQuit",root, addWantedPlayers) bindKey("F2","down", function( ) if ( guiGetVisible(wnd) == false ) then guiSetVisible(wnd, true) showCursor( true ) addWantedPlayers( ) else guiSetVisible(wnd, false) showCursor( false ) end end ) Link to comment
Abdul KariM Posted October 4, 2018 Share Posted October 4, 2018 ايش المشكلة طيب مايعرض الاسماء ولا وش ؟ Link to comment
#RoLde Posted October 4, 2018 Author Share Posted October 4, 2018 Just now, Abdul KariM said: ايش المشكلة طيب مايعرض الاسماء ولا وش ؟ يب ما يعرض اي اسم مع العلم اني ضايف نفسي بالتيم وحاطط داتا 10000 Link to comment
Abdul KariM Posted October 4, 2018 Share Posted October 4, 2018 تحت اي تحقق وتحت اللوب وشوف الرسالة الي تطلع لك outputChatBox طيب حط Link to comment
#RoLde Posted October 4, 2018 Author Share Posted October 4, 2018 Just now, Abdul KariM said: تحت اي تحقق وتحت اللوب وشوف الرسالة الي تطلع لك outputChatBox طيب حط برضو ما يطلع شي 16 مشاهدة ومافي ولا رد ._. Link to comment
#RoLde Posted October 4, 2018 Author Share Posted October 4, 2018 Just now, N3xT said: تأكد من اسم الداتا والتيم متأكد منها مليون بالمية لاني لما شلت التيم والتحقق نفع الغلط في تحقق التيم لان لما شلته اشتغل الكود Link to comment
N3xT Posted October 4, 2018 Share Posted October 4, 2018 (edited) دقيقة أعدل كودك Edited October 4, 2018 by N3xT Link to comment
#RoLde Posted October 4, 2018 Author Share Posted October 4, 2018 Just now, N3xT said: دقيقة أعدل كودك الغلط في تحقق التيم Link to comment
N3xT Posted October 4, 2018 Share Posted October 4, 2018 (edited) function addWantedPlayers( ) guiGridListClear ( wantedlist ) for i,player in ipairs ( getElementsByType ( "player" ) ) do local playerTeam = getPlayerTeam ( player ) if ( playerTeam ) and ( getTeamName ( playerTeam ) ~= "Priates" ) then if ( ( getElementData ( player, "WantedM" ) or 0 ) > 1 ) then local row = guiGridListAddRow ( wantedlist ) guiGridListSetItemText ( wantedlist, row, 1, getPlayerName ( player ), false, false ) guiGridListSetItemText ( wantedlist, row, 2, convertNumber ( getElementData ( player,"WantedM" ) ), false, false ) guiGridListSetItemColor ( wantedlist, row, 1, 255,0,0,255 ) guiGridListSetItemColor ( wantedlist, row, 1, 0,255,0,255 ) end end end end addEventHandler("onClientPlayerChangeNick", root, addWantedPlayers) addEventHandler("onClientResourceStart", root, addWantedPlayers) addEventHandler("onClientPlayerJoin", root, addWantedPlayers) addEventHandler("onClientPlayerQuit", root, addWantedPlayers) Edited October 4, 2018 by N3xT Link to comment
#RoLde Posted October 4, 2018 Author Share Posted October 4, 2018 (edited) 5 minutes ago, N3xT said: function addWantedPlayers( ) guiGridListClear ( wantedlist ) for i,player in ipairs ( getElementsByType ( "player" ) ) do local playerTeam = getPlayerTeam ( player ) if ( playerTeam ) and ( getTeamName ( playerTeam ) == "Priates" ) then if ( getElementData ( player, "WantedM" ) > 1 ) then local row = guiGridListAddRow ( wantedlist ) guiGridListSetItemText ( wantedlist, row, 1, getPlayerName ( player ), false, false ) guiGridListSetItemText ( wantedlist, row, 2, convertNumber ( getElementData ( player,"WantedM" ) ), false, false ) guiGridListSetItemColor ( wantedlist, row, 1, 255,0,0,255 ) guiGridListSetItemColor ( wantedlist, row, 1, 0,255,0,255 ) end end end end addEventHandler("onClientPlayerChangeNick", root, addWantedPlayers) addEventHandle("onClientResourceStart", root, addWantedPlayers) addEventHandler("onClientPlayerJoin", root, addWantedPlayers) addEventHandler("onClientPlayerQuit", root, addWantedPlayers) برضو مافي شي يظهر Edited October 4, 2018 by N3xT Link to comment
N3xT Posted October 4, 2018 Share Posted October 4, 2018 عدلت كودي فوق, معليش كيبوردي أحياناً يوقف كتابة وينقص الكود Link to comment
#RoLde Posted October 4, 2018 Author Share Posted October 4, 2018 Just now, N3xT said: عدلت كودي فوق, معليش كيبوردي أحياناً يوقف كتابة وينقص الكود برضو نفس المشكلة ما يظهر شي ومافي ديبق Link to comment
N3xT Posted October 4, 2018 Share Posted October 4, 2018 والآن؟, اذا ماظبط شوف الكود وين يوقف Link to comment
#RoLde Posted October 4, 2018 Author Share Posted October 4, 2018 Just now, N3xT said: والآن؟, اذا ماظبط شوف الكود وين يوقف شلت كود تحقق التيم الكود اشتغل حطيته خرب Link to comment
#RoLde Posted October 4, 2018 Author Share Posted October 4, 2018 Just now, N3xT said: جرب الآن <3ظبط مشكور يغلق للأفادة Link to comment
N3xT Posted October 4, 2018 Share Posted October 4, 2018 Pirates المشكلة كانت من البداية منك, الكود اللي فوق عدلته بحيث ان تيمك ماهو واشتغل معاك, يعني المشكلة كانت باسم التيم, قلت لك تأكد منه == استبدل =~ بـ وتأكد من اسم التيم, الحرف الكبير ممكن المشكلة تكون منه Link to comment
#RoLde Posted October 4, 2018 Author Share Posted October 4, 2018 Just now, N3xT said: جرب الآن بس ثواني في مشكلة اخرىي يضيفني لو انا في تيم ثاني Link to comment
N3xT Posted October 4, 2018 Share Posted October 4, 2018 Just now, #RoLde said: بس ثواني في مشكلة اخرىي يضيفني لو انا في تيم ثاني راجع ردي اللي فوق ^ Link to comment
#RoLde Posted October 4, 2018 Author Share Posted October 4, 2018 Just now, N3xT said: راجع ردي اللي فوق ^ مشكور ظبط Link to comment
Ram, Posted October 8, 2018 Share Posted October 8, 2018 On 04/10/2018 at 09:49, N3xT said: راجع ردي اللي فوق ^ انت ترسل كود واحد وتظل تعدل عليه .. برستيج ؟ :3 Link to comment
N3xT Posted October 8, 2018 Share Posted October 8, 2018 10 minutes ago, #Ram said: انت ترسل كود واحد وتظل تعدل عليه .. برستيج ؟ :3 عشان ما ازيد مشاركاتي بدون فايدة على موضوع واحد 1 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