Jump to content

1337.Ibrahim

Members
  • Posts

    469
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by 1337.Ibrahim

  1. function cam (  ) 
        guiSetVisible(wnd, not guiGetVisible(wnd))
        showCursor(guiGetVisible(wnd))
    	       guiGridListClear(GridList)
        for id, marker in ipairs(getElementsByType("marker")) do
      local row = guiGridListAddRow ( GridList )
    guiGridListSetItemText ( GridList, row, 1, "Marker " .. id, false, false )
      end
      end
    addCommandHandler ( "camera",cam )
    
    
    addEventHandler("onClientGUIClick",root,
    function ()
    if source == Cm then
                    local x, y, z = getElementPosition(localPlayer)
          marker = createMarker ( x , y , z, "cylinder", 1.5, 255, 255, 0, 170 )
    	  elseif source == Rm then
               if guiGridListGetSelectedItem ( GridList ) ~= -1 then
         guiGridListGetItemText (GridList,guiGridListGetSelectedItem (GridList),1)
    	 guiGridListRemoveRow ( GridList,camera )  
        destroyElement(marker)	
    end
    end
    end)

    السلام عليكم

    اذا سويت اكثر من ماركر ماقدر احذف الماركرات اللي قبل

     WARNING: camera\client.lua:41: Bad argument @ 'destroyElement' [Expected element at argument 1]
     WARNING: camera\client.lua:41: Bad argument @ 'destroyElement' [Expected element at argument 1]

     

  2. On ٣‏/١٠‏/١٤٣٨ هـ at 19:50, #BrosS said:

    debugscript 3

    غير معرفة camera سطر  20 

     
    مشكلة ثانية اذا سويت اكثر من ماركر مااقدر احذف الماركر الأول؟

     

    ترا قصدي اني حليت المشكلة السابقة , ^

  3. السلام عليكم

    وين المشكلةة هنا

    function open (  ) 
        guiSetVisible(wnd, not guiGetVisible(wnd))
        showCursor(guiGetVisible(wnd))
    	       guiGridListClear(GridList)
        for id, marker in ipairs(getElementsByType("marker")) do
      local row = guiGridListAddRow ( GridList )
    guiGridListSetItemText ( GridList, row, 1, "Marker " .. id, false, false )
      end
      end
    addCommandHandler ( "camera",open )
    
    
    addEventHandler("onClientGUIClick",root,
    function ()
    if source == Cm then
                    local x, y, z = getElementPosition(localPlayer)
          marker = createMarker ( x , y , z, "cylinder", 1.5, 255, 255, 0, 170 )
    	  elseif source == Rm then
               if guiGridListGetSelectedItem ( GridList ) ~= -1 then
       guiGridListGetItemText( GridList, camera ) 
        guiGridListRemoveRow ( GridList )  
        destroyElement(marker)	
    end
    end
    end)

     

×
×
  • Create New...