Mhmd.z Posted October 30, 2015 Share Posted October 30, 2015 السلام عليكم ورحمة الله وبركاته انا مسوي كود اذا الاعب ضغط زر ييجي بالجيرد ليست انه ضغط الزر , بس هو الي يشوف بالجيرد ليست انه غط , ابي كل الاعبين يشوفو انه غط الزر كيف؟ addEventHandler ( "onClientGUIClick", root, function () if source == button then local localPlayerName = getPlayerName(getLocalPlayer()) local row = guiGridListAddRow(supportList) guiGridListSetItemText ( supportList, row, column, localPlayerName, false, false ) end end ) Link to comment
#CroSs Posted October 30, 2015 Share Posted October 30, 2015 أول ما يظغط الزر تحقق أن أسمه مو موجود و سوي ترايقر للسيرفر وبعدها سوي ترايقر للكل من السيرفر للكلينت وضيف اسمه Link to comment
Mhmd.z Posted October 30, 2015 Author Share Posted October 30, 2015 كذه طلع معاي , بس مو ضابط --client addEventHandler ( "onClientGUIClick", root, function () if source == button then local localPlayerName = getPlayerName(getLocalPlayer()) local row = guiGridListAddRow(supportList) triggerServerEvent ("client1_system", localPlayer) end end ) --server function mhmd1( ) for id, mhmd in ipairs(getElementsByType("player")) do triggerClientEvent("server1_system", mhmd, source) end end addEvent( "client1_system", true ) addEventHandler( "client1_system", root, mhmd1 ) --client function mhmd1 () local row = guiGridListAddRow(supportList) local localPlayerName = getPlayerName(getLocalPlayer()) guiGridListSetItemText ( supportList, row, column, getPlayerName(mhmd ), false, false ) end addEvent( "server1_system", true ) addEventHandler( "server1_system", root, mhmd, mhmd1 ) Link to comment
#CroSs Posted October 30, 2015 Share Posted October 30, 2015 (edited) -- #Client addEventHandler( "onClientGUIClick", guiRoot, function() if ( source == button ) then triggerServerEvent( "FromClientToServerExecute:ButtonFunction", localPlayer, getPlayerName( localPlayer ) ) end end ) addEvent( "ResponseFromServer:AddPlayerNameInGridList", true ) addEventHandler( "ResponseFromServer:AddPlayerNameInGridList", root, function( Name ) guiGridListSetItemText( supportList, guiGridListAddRow( supportList ), column, Name, false, false ) end ) -- #Server addEvent( "FromClientToServerExecute:ButtonFunction", true ) addEventHandler( "FromClientToServerExecute:ButtonFunction", root, function( Name ) triggerClientEvent( root, "ResponseFromServer:AddPlayerNameInGridList", root, Name ) end ) Edited October 30, 2015 by Guest Link to comment
Mhmd.z Posted October 30, 2015 Author Share Posted October 30, 2015 انا ابيه على كل ضغطه يزيد row هنا ما يزيد يضل على نفس الرو Link to comment
#CroSs Posted October 30, 2015 Share Posted October 30, 2015 انا ابيه على كل ضغطه يزيد rowهنا ما يزيد يضل على نفس الرو عدلت كود الكلينت على إلي تبيه 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