Adham Posted June 14, 2016 Share Posted June 14, 2016 addEventHandler("onClientGUIClick",root, function () if ( source == GUIEditor.button[1]) then local item = guiComboBoxGetSelected ( GUIEditor.combobox[1] ) local text = guiComboBoxGetItemText ( GUIEditor.combobox[1] , item ) if ( guiGetText ( editname ) and guiGetText ( GUIEditor.edit[2] ) and guiGetText ( GUIEditor.edit[1] ) ~= '' ) then local row = guiGridListAddRow ( gridlist) guiGridListSetItemText (gridlist,row,1,guiGetText(editname),false,false) guiGridListSetItemText (gridlist,row,2,text,false,false) guiGridListSetItemText (gridlist,row,3,guiGetText(GUIEditor.edit[1]),false,false) end end end ) الكود ذا لين يكتب في الايديت ال3 يجي في القريد لست دخلت صحبي بالسرفر انا كتبت في ال3 ايديت وضعط علي ال button ججا في القريد لست ولما صحبي كتب م يجي في القريد Link to comment
Me[Z]oO Posted June 15, 2016 Share Posted June 15, 2016 triggerServerEvent triggerClientEvent -- root بما انك مبرمج م تعرف ان الكلنت للاعب فقط ؟ -,- Link to comment
Adham Posted June 15, 2016 Author Share Posted June 15, 2016 طيب كيف هعمل guiGridListSetItemText سرفر ؟ Link to comment
Adham Posted June 15, 2016 Author Share Posted June 15, 2016 كذا يعني addEventHandler("onClientGUIClick",root, function () if ( source == X ) then guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) elseif ( source == GUIEditor.button[1]) then local item = guiComboBoxGetSelected ( GUIEditor.combobox[1] ) local text = guiComboBoxGetItemText ( GUIEditor.combobox[1] , item ) if ( guiGetText ( editname) and guiGetText ( GUIEditor.edit[2] ) and guiGetText ( GUIEditor.edit[1] ) ~= '' ) then triggerServerEvent("AddMe",localPlayer) end end end ) addEvent("AddToGrid",true) addEventHandler("AddToGrid",root, function ( ) local Row = guiGridListAddRow ( gridlist ) local item = guiComboBoxGetSelected ( GUIEditor.combobox[1] ) local text = guiComboBoxGetItemText ( GUIEditor.combobox[1] , item ) guiGridListSetItemText ( gridlist , Row ,1 ,guiGetText(editname) , false , false ) guiGridListSetItemText ( gridlist , Row , 2 , text , false , false ) guiGridListSetItemText ( gridlist , Row , 3 , guiGetText(GUIEditor.edit[1]) , false , false ) end ) Sercer-- addEvent("AddMe",true) addEventHandler("AddMe",root, function () triggerClientEvent(source,"AddToGrid",source) end ) Link to comment
Ac[T]ioN Posted June 15, 2016 Share Posted June 15, 2016 شوف الدي بق وش يقولك وهات صورة Link to comment
Adham Posted June 15, 2016 Author Share Posted June 15, 2016 انا اقول الكود ذا صح ولا خطا وش لازمه الدي بق Link to comment
YourMind Posted June 15, 2016 Share Posted June 15, 2016 انا اقولالكود ذا صح ولا خطا وش لازمه الدي بق فكرة موضوعك ايه؟ Link to comment
Adham Posted June 15, 2016 Author Share Posted June 15, 2016 لما يكتب في ال3 ايديت يجي في القريد لست Link to comment
' A F . Posted June 15, 2016 Share Posted June 15, 2016 استخدم guiGetText وارسلها بـ triggerServerEvent واستقبلها بالسيرفر وارسلها لـ الكلنت triggerClientEvent -- Ex -- Client edit = guiCreateEdit ( .... ) bindKey("enter","down", function ( ) triggerServerEvent("onSend",localPlayer,guiGetText(edit)) end) addEvent("onPut",true) addEventHandler("onPut",root, function ( Text ) outputChatBox(Text) end) -- Server addEventHandler("onSend",true) addEventHandler("onSend",root, function ( Text ) triggerClientEvent ( root , "onPut" , source , Text ) end) Link to comment
Adham Posted June 15, 2016 Author Share Posted June 15, 2016 صح كدا؟ addEventHandler("onClientGUIClick",root, function () if ( source == X ) then guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) elseif ( source == GUIEditor.button[1]) then local item = guiComboBoxGetSelected ( GUIEditor.combobox[1] ) local text = guiComboBoxGetItemText ( GUIEditor.combobox[1] , item ) if ( guiGetText ( editname) and guiGetText ( GUIEditor.edit[2] ) and guiGetText ( GUIEditor.edit[1] ) ~= '' ) then triggerServerEvent("AddMe",localPlayer) end end end ) addEvent("AddToGrid",true) addEventHandler("AddToGrid",root, function ( ) local Row = guiGridListAddRow ( gridlist ) local item = guiComboBoxGetSelected ( GUIEditor.combobox[1] ) local text = guiComboBoxGetItemText ( GUIEditor.combobox[1] , item ) guiGridListSetItemText ( gridlist , Row ,1 ,guiGetText(editname) , false , false ) guiGridListSetItemText ( gridlist , Row , 2 , text , false , false ) guiGridListSetItemText ( gridlist , Row , 3 , guiGetText(GUIEditor.edit[1]) , false , false ) end ) Server - addEvent("AddMe",true) addEventHandler("AddMe",root, function () triggerClientEvent(source,"AddToGrid",source) end ) Link to comment
Me[Z]oO Posted June 15, 2016 Share Posted June 15, 2016 (edited) Delete Edited June 15, 2016 by Guest Link to comment
SPLM Posted June 15, 2016 Share Posted June 15, 2016 صح كدا؟ addEventHandler("onClientGUIClick",root, function () if ( source == X ) then guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) elseif ( source == GUIEditor.button[1]) then local item = guiComboBoxGetSelected ( GUIEditor.combobox[1] ) local text = guiComboBoxGetItemText ( GUIEditor.combobox[1] , item ) if ( guiGetText ( editname) and guiGetText ( GUIEditor.edit[2] ) and guiGetText ( GUIEditor.edit[1] ) ~= '' ) then triggerServerEvent("AddMe",localPlayer) end end end ) addEvent("AddToGrid",true) addEventHandler("AddToGrid",root, function ( ) local Row = guiGridListAddRow ( gridlist ) local item = guiComboBoxGetSelected ( GUIEditor.combobox[1] ) local text = guiComboBoxGetItemText ( GUIEditor.combobox[1] , item ) guiGridListSetItemText ( gridlist , Row ,1 ,guiGetText(editname) , false , false ) guiGridListSetItemText ( gridlist , Row , 2 , text , false , false ) guiGridListSetItemText ( gridlist , Row , 3 , guiGetText(GUIEditor.edit[1]) , false , false ) end ) Server - addEvent("AddMe",true) addEventHandler("AddMe",root, function () triggerClientEvent(source,"AddToGrid",source) end ) طبعاً خطأ انت ارسلت شيء بـ triggerServerEvent("AddMe",localPlayer) كيف تبيه يحط المعلومات وانت ما ارسلت شيء اساساً Link to comment
N3xT Posted June 15, 2016 Share Posted June 15, 2016 # Client : addEventHandler("onClientGUIClick",root, function () if ( source == X ) then guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) elseif ( source == GUIEditor.button[1]) then local item = guiComboBoxGetSelected ( GUIEditor.combobox[1] ) local text = guiComboBoxGetItemText ( GUIEditor.combobox[1] , item ) if ( guiGetText ( editname) and guiGetText ( GUIEditor.edit[2] ) and guiGetText ( GUIEditor.edit[1] ) ~= '' ) then triggerServerEvent("AddMe",localPlayer,guiGetText (editname)) end end end ) addEvent("AddToGrid",true) addEventHandler("AddToGrid",root, function ( text ) local Row = guiGridListAddRow ( gridlist ) local item = guiComboBoxGetSelected ( GUIEditor.combobox[1] ) local text = guiComboBoxGetItemText ( GUIEditor.combobox[1] , item ) guiGridListSetItemText ( gridlist , Row ,1 ,text , false , false ) guiGridListSetItemText ( gridlist , Row , 2 , text , false , false ) guiGridListSetItemText ( gridlist , Row , 3 , text , false , false ) end ) # Server : addEvent("AddMe",true) addEventHandler("AddMe",root, function ( edit ) triggerClientEvent(source,"AddToGrid",source,edit) 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