#Mr.Pop Posted December 12, 2017 Share Posted December 12, 2017 (edited) السلام عليكم باك شباب كيفك انشاء الله بخير الحمد الله على النعمة .... الهم طلبي : ممكن تساعدنوني في الكود لم اللعب يضغط على زر اسمو راح يروح للجريد addEventHandler("onClientGUIClick",root,function(player) if source == nominate then name = getPlayerFromName(playez) local GridList = GridOfVoters and GridVoteePlayer local row = guiGridListAddRow(GridVoteePlayer) and guiGridListAddRow(GridOfVoters) guiGridListSetItemText(GridList, row, 1, name, true, false) end end ) Edited December 12, 2017 by #Mr.Pop Link to comment
Ahmed Ly Posted December 12, 2017 Share Posted December 12, 2017 addEventHandler("onClientGUIClick",root,function() if source == nominate then name = getPlayerName(localPlayer) local row = guiGridListAddRow(GridList) guiGridListSetItemText(GridList, row, 1,""..name.."", true, false) end end ) 1 Link to comment
#Mr.Pop Posted December 12, 2017 Author Share Posted December 12, 2017 17 minutes ago, Ahmed Ly said: addEventHandler("onClientGUIClick",root,function() if source == nominate then name = getPlayerName(localPlayer) local row = guiGridListAddRow(GridList) guiGridListSetItemText(GridList, row, 1,""..name.."", true, false) end end ) مشكور والله ضض والله جرب كل شيئ لكن ماكانت تضبط تسلم اخوي Link to comment
Adham Posted December 12, 2017 Share Posted December 12, 2017 للمعلومه: الكود حقك بيظهر للاعب الواحد فقط الضعط عليه. Link to comment
#Mr.Pop Posted December 12, 2017 Author Share Posted December 12, 2017 (edited) 4 minutes ago, -Le[3]bA. said: للمعلومه: الكود حقك بيظهر للاعب الواحد فقط الضعط عليه. يعني لزم اسوي تريجر سيرفر ثم من السيرفر للكلينت ؟ شو أسوي Edited December 12, 2017 by #Mr.Pop Link to comment
Adham Posted December 12, 2017 Share Posted December 12, 2017 تفضل جرب : -- Client Side -- addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if source == button then triggerServerEvent ( "onAccept", localPlayer, getPlayerName (localPlayer) ) end end ) addEvent ( "GridList", true ) addEventHandler ( "GridList", root, function ( playerName ) if playerName then local row = guiGridListAddRow ( gridList ) guiGridListSetItemText( gridList, row, 1, playerName, false, false ) end end ) -- Server Side -- addEvent ( "onAccept", true ) addEventHandler ( "onAccept", root, function ( playerName ) if playerName then triggerClientEvent ( root, "GridList", root, playerName ) end end ) 1 Link to comment
#Mr.Pop Posted December 12, 2017 Author Share Posted December 12, 2017 (edited) ممكن سؤال شرح دي if playerName then شو استقاد منها و لو حذفتها شو يصير Edited December 12, 2017 by #Mr.Pop Link to comment
Adham Posted December 12, 2017 Share Posted December 12, 2017 Just now, #Mr.Pop said: ممكن سؤال شرح دي if playerName then شو استقاد منها و لو حذفتها شو يصير مجرد تحقق لو اسم الاعب موجود لان بـ كل برمجي احب اسوي تحقق ثم انفذ Link to comment
#Mr.Pop Posted December 12, 2017 Author Share Posted December 12, 2017 اوك مشكور مقصر كيف اسوي يختار لان نسيت كل الاكواد كنت معتزل و ايضا كنت اتعلم لغات اخرى تخربط يختار من الجريد ليست متضكر شيئ مثل تعمل حصر if row<1 and row>0 then Link to comment
Adham Posted December 12, 2017 Share Posted December 12, 2017 local sel = guiGridListGetItemText ( grid, guiGridListGetSelectedItem ( grid ), 1 ) if sel == "" then return end -- or | او if sel > 0 then Link to comment
Ahmed Ly Posted December 12, 2017 Share Posted December 12, 2017 --Client addEventHandler("onClientGUIClick",root,function() if source == nominate then local name = string.gsub(getPlayerName(source), "#%x%x%x%x%x%x", "") triggerServerEvent("event",localPlayer,name,"event2") end end ) addEvent("event2",true) addEventHandler("event2",root, function (name) local row = guiGridListAddRow(GridList) guiGridListSetItemText(GridList, row, 1,""..name.."", true, false) end ) --Server addEvent("event",true) addEventHandler("event",root, function (name,text) triggerClientEvent(root,text,root,name) end ) 4 minutes ago, #Mr.Pop said: اوك مشكور مقصر كيف اسوي يختار لان نسيت كل الاكواد كنت معتزل و ايضا كنت اتعلم لغات اخرى تخربط يختار من الجريد ليست متضكر شيئ مثل تعمل حصر if row<1 and row>0 then slect = guiGridListGetSelectedItem(girdlist) if slect ~= -1 then 1 1 Link to comment
#Mr.Pop Posted December 12, 2017 Author Share Posted December 12, 2017 مشكورينبس تذكرت طريقة الحصر والله مقصرتو راح احطها للاستفادة if source == Votenow then local row, col = guiGridListGetSelectedItem (GridVoteePlayer) if ( row and col and row ~= -1 and col ~= -1 ) then if row > -1 and row < 1 then end end end addEvent("GridList2",true) addEventHandler("GridList2",root, function(playerName) if playerName then local data = 0 local row = guiGridListAddRow(GridVoteePlayer) and guiGridListAddRow(GridOfVoters) guiGridListSetItemText(GridVoteePlayer, row, 2,data+1, false, false) guiGridListSetItemText(GridOfVoters, row, 2,data+1, false, false) -- destroyElement(Votenow) end end) ;وين الخطأ Link to comment
-#GMG Posted December 13, 2017 Share Posted December 13, 2017 On ١٢/١٢/٢٠١٧ at 23:54, #Mr.Pop said: مشكورينبس تذكرت طريقة الحصر والله مقصرتو راح احطها للاستفادة if source == Votenow then local row, col = guiGridListGetSelectedItem (GridVoteePlayer) if ( row and col and row ~= -1 and col ~= -1 ) then if row > -1 and row < 1 then end end end addEvent("GridList2",true) addEventHandler("GridList2",root, function(playerName) if playerName then local data = 0 local row = guiGridListAddRow(GridVoteePlayer) and guiGridListAddRow(GridOfVoters) guiGridListSetItemText(GridVoteePlayer, row, 2,data+1, false, false) guiGridListSetItemText(GridOfVoters, row, 2,data+1, false, false) -- destroyElement(Votenow) end end) ;وين الخطأ addEventHandler("onClientGUIClick",root, if source == Votenow then local row, col = guiGridListGetSelectedItem (GridVoteePlayer) if ( row and col and row ~= -1 and col ~= -1 ) then if row > -1 and row < 1 then end end end end ) --- اعتقد لاني مافهمت الخطا 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