Adham Posted June 14, 2016 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 ججا في القريد لست ولما صحبي كتب م يجي في القريد
Me[Z]oO Posted June 15, 2016 Posted June 15, 2016 triggerServerEvent triggerClientEvent -- root بما انك مبرمج م تعرف ان الكلنت للاعب فقط ؟ -,-
Adham Posted June 15, 2016 Author 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 )
YourMind Posted June 15, 2016 Posted June 15, 2016 انا اقولالكود ذا صح ولا خطا وش لازمه الدي بق فكرة موضوعك ايه؟
' A F . Posted June 15, 2016 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)
Adham Posted June 15, 2016 Author 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 )
SPLM Posted June 15, 2016 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) كيف تبيه يحط المعلومات وانت ما ارسلت شيء اساساً
N3xT Posted June 15, 2016 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 )
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