Jump to content

x[مشكله]x مشكله وآجهتني


Recommended Posts

السلام عليكم انا واجهتني مشكله غريبه

انا مسوي 4 شيك بوكس

كل 2 لحال

المهم شوف الكود

  
GUIEditor.checkbox[1] = guiCreateCheckBox(273, 215, 123, 21, "سواء", false, false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.checkbox[1], font_0) 
guiSetProperty(GUIEditor.checkbox[1], "NormalTextColour", "FF09E4D7") 
GUIEditor.checkbox[2] = guiCreateCheckBox(134, 215, 123, 21, "كآش يو", true, false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.checkbox[2], font_0) 
guiSetProperty(GUIEditor.checkbox[2], "NormalTextColour", "FF09E4D7") 
GUIEditor.checkbox[3] = guiCreateCheckBox(137, 241, 126, 19, "تــآج", false, false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.checkbox[3], font_0) 
guiSetProperty(GUIEditor.checkbox[3], "NormalTextColour", "FFE76904") 
GUIEditor.checkbox[4] = guiCreateCheckBox(273, 241, 123, 21, "آملآك", false, false, GUIEditor.window[1]) 
  
  
----- الان كود لما احدد ع واحد يرسله لـ قريد لست 
  
  
  
     ------------------------------ 
     b1 = guiGetText(GUIEditor.checkbox[1]) 
     b2 = guiGetText(GUIEditor.checkbox[2]) 
     b3 = guiGetText(GUIEditor.checkbox[3]) 
     b4 = guiGetText(GUIEditor.checkbox[4]) 
     ID1 = b1 and b2  
     ID2 = b3 and b4  
  
  
    if (guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == true and guiCheckBoxGetSelected(GUIEditor.checkbox[2]) == false) then 
    local ID1 = "سواء" 
      triggerServerEvent( 'NewP', localPlayer,ID1,ID2) 
       
    if (guiCheckBoxGetSelected(GUIEditor.checkbox[2]) == true and guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == false) then 
    local ID1 = "كاش يو" 
      triggerServerEvent( 'NewP', localPlayer,ID1,ID2) 
       
     
    if (guiCheckBoxGetSelected(GUIEditor.checkbox[3]) == true and guiCheckBoxGetSelected(GUIEditor.checkbox[4]) == false) then 
    local ID2 = "آملاك خآصه" 
  
      triggerServerEvent( 'NewP', localPlayer,ID1,ID2) 
       
    if (guiCheckBoxGetSelected(GUIEditor.checkbox[4]) == true and guiCheckBoxGetSelected(GUIEditor.checkbox[3]) == false) then 
    local ID2 = "تــآج" 
     
    triggerServerEvent( 'NewP', localPlayer,ID1,ID2) 
  
      
     end 
     end 
     end 
     end 
     end 
     end 
     ) 
  
  
---- هذا كود لو حدد واحد من ال2 الاول  يصير يشيل الصح من الي قبله 
  
  
          
          addEventHandler ( "onClientGUIClick", root,  
          function ()      
    if (source == GUIEditor.checkbox[4]) then 
    guiCheckBoxSetSelected(GUIEditor.checkbox[3], false) 
  
  
    elseif (source == GUIEditor.checkbox[3]) then 
    guiCheckBoxSetSelected(GUIEditor.checkbox[4], false) 
  
  
    elseif (source == GUIEditor.checkbox[1]) then 
    guiCheckBoxSetSelected(GUIEditor.checkbox[2], false) 
  
  
    elseif (source == GUIEditor.checkbox[2]) then 
    guiCheckBoxSetSelected(GUIEditor.checkbox[1], false) 
         
           
            end 
          end 
         ) 
  

المهم يآشبــآب آلمشكله اني لما احدد مثل سواء و تاج تجي العكس كا ش ي---و---

--ولما احدد سواء و املاك تجي 2 متكرره واحده املاك و كاش يو ووحدته سواء و املاك

الان لما نرسل الشيك بوكس سيرفر الكود

  
  
    addEvent( 'NewP', true ) 
    addEventHandler( 'NewP', root, 
    function(ID1,ID2) 
     
    triggerClientEvent(root,'aBo',root, ID1, ID2) 
    
    end 
    ) 
  
  
  

--ليه مشكله غريبه انا حطا لما يحد يرسل سيرفر و يحطه بي قريد ليست شوفف القريد

  
GUIEditor.window[2] = guiCreateWindow(331, 101, 654, 420, "", false) 
guiWindowSetSizable(GUIEditor.window[1], false) 
guiSetAlpha(GUIEditor.window[1], 1.00) 
  
GUIEditor.label[1] = guiCreateLabel(101, 16, 294, 38, "", false, GUIEditor.window[2]) 
guiSetFont(GUIEditor.label[1], "seguisym.ttf*9*1") 
guiLabelSetColor(GUIEditor.label[1], 229, 250, 4) 
GUIEditor.gridlist[1] = guiCreateGridList(9, 102, 243, 247, false, GUIEditor.window[2]) 
guiGridListAddColumn(GUIEditor.gridlist[1], "1", 0.3) 
guiGridListAddColumn(GUIEditor.gridlist[1], "2", 0.3) 
  
  
  
---- الان نستقبل التقريت سيرفر ونضعه في قريد ليست 
  
[lua] 
   addEvent( "aBo", true ) 
     addEventHandler ( "aBo" ,root, 
     function (ID1, ID2) 
                 local row = guiGridListAddRow (GUIEditor.gridlist[1]) 
        guiGridListSetItemText (GUIEditor.gridlist[1],row,1,ID1,false,false) 
        guiGridListSetItemText (GUIEditor.gridlist[1],row,2,ID2,false,false) 
  

شباب حل للمكشله الدي بوق مايقول شيء :?:

Link to comment
تقدر توضح مشكلتك اكثر؟

لان انا عامل لوحه في 2 ايدت بوكس اوك

واحد سواء و الثاني كا ش يو

آبي لما احدد واحد منها يروح قريد ليست

لكن لما احدد كاش يو تجي سواء

و مشكله ثاني كمان في 2 شيك بوكس

1- املاك

2- تاج

لما احدد الاملاك تجي تاج الاملاك ماتجي

هذا المشكله في تحديد الشيك بوكس

Link to comment

الحين اول شي عندك خطأ بالملف الاول

addEventHandler('onPlayerQuit',root,function() 
    local test_Acc = getPlayerAccount(source) 
    local testData = getElementData(source,'test') 
  if ( testData ) -- then ?  
thenGUIEditor.checkbox[1] = guiCreateCheckBox(273, 215, 123, 21, "سواء", false, false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.checkbox[1], font_0) 

جرب استبدل الكود الاول حقك ب ذا

addEventHandler('onPlayerQuit',root,function() 
    local test_Acc = getPlayerAccount(source) 
    local testData = getElementData(source,'test') 
     if ( testData ) then 
     thenGUIEditor.checkbox[1] = guiCreateCheckBox(273, 215, 123, 21, "سواء", false, false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.checkbox[1], font_0) 
guiSetProperty(GUIEditor.checkbox[1], "NormalTextColour", "FF09E4D7") 
GUIEditor.checkbox[2] = guiCreateCheckBox(134, 215, 123, 21, "كآش يو", true, false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.checkbox[2], font_0) 
guiSetProperty(GUIEditor.checkbox[2], "NormalTextColour", "FF09E4D7") 
GUIEditor.checkbox[3] = guiCreateCheckBox(137, 241, 126, 19, "تــآج", false, false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.checkbox[3], font_0) 
guiSetProperty(GUIEditor.checkbox[3], "NormalTextColour", "FFE76904") 
GUIEditor.checkbox[4] = guiCreateCheckBox(273, 241, 123, 21, "آملآك", false, false, GUIEditor.window[1]) 
  
  
----- الان كود لما احدد ع واحد يرسله لـ قريد لست 
  
  
  
     ------------------------------ 
     b1 = guiGetText(GUIEditor.checkbox[1]) 
     b2 = guiGetText(GUIEditor.checkbox[2]) 
     b3 = guiGetText(GUIEditor.checkbox[3]) 
     b4 = guiGetText(GUIEditor.checkbox[4]) 
     ID1 = b1 and b2 
     ID2 = b3 and b4 
  
  
    if (guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == true and guiCheckBoxGetSelected(GUIEditor.checkbox[2]) == false) then 
    local ID1 = "سواء" 
      triggerServerEvent( 'NewP', localPlayer,ID1,ID2) 
      
    if (guiCheckBoxGetSelected(GUIEditor.checkbox[2]) == true and guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == false) then 
    local ID1 = "كاش يو" 
      triggerServerEvent( 'NewP', localPlayer,ID1,ID2) 
      
    
    if (guiCheckBoxGetSelected(GUIEditor.checkbox[3]) == true and guiCheckBoxGetSelected(GUIEditor.checkbox[4]) == false) then 
    local ID2 = "آملاك خآصه" 
  
      triggerServerEvent( 'NewP', localPlayer,ID1,ID2) 
      
    if (guiCheckBoxGetSelected(GUIEditor.checkbox[4]) == true and guiCheckBoxGetSelected(GUIEditor.checkbox[3]) == false) then 
    local ID2 = "تــآج" 
    
    triggerServerEvent( 'NewP', localPlayer,ID1,ID2) 
  
      
     end 
     end 
     end 
     end 
     end 
     end 
     ) 
  
  
---- هذا كود لو حدد واحد من ال2 الاول  يصير يشيل الصح من الي قبله 
  
  
          
          addEventHandler ( "onClientGUIClick", root, 
          function ()     
    if (source == GUIEditor.checkbox[4]) then 
    guiCheckBoxSetSelected(GUIEditor.checkbox[3], false) 
  
  
    elseif (source == GUIEditor.checkbox[3]) then 
    guiCheckBoxSetSelected(GUIEditor.checkbox[4], false) 
  
  
    elseif (source == GUIEditor.checkbox[1]) then 
    guiCheckBoxSetSelected(GUIEditor.checkbox[2], false) 
  
  
    elseif (source == GUIEditor.checkbox[2]) then 
    guiCheckBoxSetSelected(GUIEditor.checkbox[1], false) 
        
          
            end 
          end 
         ) 
  

+مستحيل مايكون جاك شي بالدي بق :mrgreen:

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...