Jump to content

طلب ..


Recommended Posts

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

كذا يعني

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

استخدم

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

صح كدا؟

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
صح كدا؟

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

# 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...