Jump to content

طلب كود


Mando

Recommended Posts

  • Replies 70
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

client

GUIEditor = { 
        gridlist = {}, 
        button = {}, 
        window = {}, 
    } 
    GUIEditor.window[1] = guiCreateWindow(262, 90, 279, 410, "Weapon Shop By ~[ #al-Kobra ]~", false) 
    guiWindowSetSizable(GUIEditor.window[1], false) 
      
    GUIEditor.button[1] = guiCreateButton(23, 342, 105, 45, "~[ Choose ]~", false, GUIEditor.window[1]) 
    guiSetFont(GUIEditor.button[1], "default-bold-small") 
    guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFA4A4A4") 
    GUIEditor.button[2] = guiCreateButton(150, 342, 105, 45, "~[ X  ]~", false, GUIEditor.window[1]) 
    guiSetFont(GUIEditor.button[2], "default-bold-small") 
    guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFA4A4A4") 
    GUIEditor.gridlist[1] = guiCreateGridList(13, 23, 252, 313, false, GUIEditor.window[1]) 
    guiGridListAddColumn(GUIEditor.gridlist[1], "Weapon", 0.4) 
    guiGridListAddColumn(GUIEditor.gridlist[1], "Price", 0.4) 
    guiGridListAddRow(GUIEditor.gridlist[1]) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "AK-47", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 0, 2, "300", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "M4", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 1, 2, "450", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "Pistol", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 2, 2, "550", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "Shotgun", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 3, 2, "1000", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 4, 1, "Grenade", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 4, 2, "1500", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 5, 1, "Molotov Cocktails", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 5, 2, "3000", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 6, 1, "Minigun", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 6, 2, "5000", false, false)     
    guiSetVisible (GUIEditor.window[1], false) 
  
    addEvent("2dhar", true) 
    addEventHandler("2dhar", root, 
    function() 
        guiSetVisible(GUIEditor.window[1], true) 
            showCursor (true) 
        end 
        ) 
      
    addEvent("25fa2", true) 
    addEventHandler("25fa2", root, 
    function() 
        guiSetVisible(GUIEditor.window[1], false) 
            showCursor (false) 
        end 
        ) 
      
addEventHandler( "onClientGUIClick", resourceRoot,function(  ) 
    if ( source == GUIEditor.button[2] ) then 
        guiSetVisible ( GUIEditor.window[1], true )   
        showCursor(false) 
    end 
end 
) 
    local theMarker = false  
     
    addEventHandler( "onClientGUIDoubleClick", getRootElement(), Double) 
    function Double() 
    if source == GUIEditor.gridlist[1]  then 
    local selectedRow, selectedCol = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) 
    local Name = guiGridListGetItemText( GUIEditor.gridlist[1], selectedRow, selectedCol ) 
    if Name == "AK-47" then 
    triggerServerEvent("kobra1",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    end 
    elseif Name == "M4" then 
    triggerServerEvent("kobra2",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Pistol" then 
    triggerServerEvent("kobra3",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Shotgun" then 
    triggerServerEvent("kobra4",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Grenade" then 
    triggerServerEvent("kobra5",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Molotov Cocktails" then 
    triggerServerEvent("kobra6",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Minigun" then 
    triggerServerEvent("kobra6",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
            end 
     
    addEventHandler( "onClientGUIClick", getRootElement(), Click) 
    function Click() 
    if source == GUIEditor.button[1]  then 
    local selectedRow, selectedCol = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) 
    local Name = guiGridListGetItemText( GUIEditor.gridlist[1], selectedRow, selectedCol ) 
    if Name == "AK-47" then 
    triggerServerEvent("kobra1",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    end 
    elseif Name == "M4" then 
    triggerServerEvent("kobra2",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Pistol" then 
    triggerServerEvent("kobra3",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Shotgun" then 
    triggerServerEvent("kobra4",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Grenade" then 
    triggerServerEvent("kobra5",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Molotov Cocktails" then 
    triggerServerEvent("kobra6",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Minigun" then 
    triggerServerEvent("kobra7",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
            end 
       end 
end 
              
        local theMarker = false         
        addEvent( "open_window",true ) 
        addEventHandler( "open_window", root, 
        function( marker )     
        guiSetVisible( window, true ) 
        showCursor( true )     
        theMarker = marker 
        end 
        ) 

server

createTeam ( Robbers, 255 ) 
  
    addEventHandler('onMarkerHit', markers[player], 
    function( hitElement ) 
    if hitElement == source then 
    triggerClientEvent ("2dhar", root ) 
    end 
    end 
    ) 
      
    addEventHandler('onMarkerLeave', markers[player], 
    function( leftElement ) 
    if leftElement == source then 
    triggerClientEvent ("25fa2", root ) 
    end 
    end 
    ) 
          
    addEvent("kobra1", true) 
    addEventHandler("kobra1", root, 
    function() 
           local player = getElementData( marker, "Creater" )     
          if getPlayerMoney (source) >= 300 and isElement( player ) then 
            takePlayerMoney(source, 300) 
            givePlayerMoney( player, S3r ) 
            giveWeapon ( source, 30, 4500 ) 
            outputChatBox ( "You Have Bought an AK-47 Weapon", source, 255, 255, 255, true ) 
            outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
            outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
            end 
     end 
     ) 
    addEvent("kobra2", true) 
    addEventHandler("kobra2", root, 
    function() 
          local player = getElementData( marker, "Creater" )   
          if getPlayerMoney (source) >= 450 and isElement( player ) then 
            takePlayerMoney(source, 450) 
            givePlayerMoney( player, 450 ) 
            giveWeapon ( source, 31, 4500 ) 
            outputChatBox ( "You Have Bought a M4 Weapon", source, 255, 255, 255, true ) 
            outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
        else 
            outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
        end 
      end 
    ) 
      
      
    addEvent("kobra3", true) 
    addEventHandler("kobra3", root, 
    function() 
          local player = getElementData( marker, "Creater" )   
          if getPlayerMoney (source) >= 550 and isElement( player ) then 
            takePlayerMoney(source, 550) 
            givePlayerMoney(player, 550) 
            giveWeapon ( source, 22, 4500 ) 
            outputChatBox ( "You Have Bought a Pistol Weapon", source, 255, 255, 255, true ) 
            outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
        else 
            outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
        end 
      end 
    ) 
      
      
    addEvent("kobra4", true) 
    addEventHandler("kobra4", root, 
    function() 
          local player = getElementData( marker, "Creater" )   
          if getPlayerMoney (source) >= 1000 and isElement( player ) then 
            takePlayerMoney(source, 1000) 
            givePlayerMoney(player, 1000) 
            giveWeapon ( source, 25, 4500 ) 
            outputChatBox ( "You Have Bought a Shotgun Weapon", source, 255, 255, 255, true ) 
            outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
        else 
            outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
        end 
      end 
    ) 
      
      
    addEvent("kobra5", true) 
    addEventHandler("kobra5", root, 
    function() 
          local player = getElementData( marker, "Creater" )   
          if getPlayerMoney (source) >= 1500 and isElement( player ) then 
            takePlayerMoney(source, 1500) 
            givePlayerMoney(player, 1500) 
            giveWeapon ( source, 16, 300 ) 
            outputChatBox ( "You Have Bought a Grenade Weapon", source, 255, 255, 255, true ) 
            outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
        else 
            outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
        end 
      end 
    ) 
      
      
    addEvent("kobra6", true) 
    addEventHandler("kobra6", root, 
    function() 
          local player = getElementData( marker, "Creater" )   
          if getPlayerMoney (source) >= 3000 and isElement( player ) then 
            takePlayerMoney(source, 3000) 
            givePlayerMoney(player, 3000) 
            giveWeapon ( source, 18, 350 ) 
            outputChatBox ( "You Have Bought a Molotov Weapon", source, 255, 255, 255, true ) 
            outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
        else 
            outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
        end 
      end 
    ) 
      
    addEvent("kobra7", true) 
    addEventHandler("kobra7", root, 
    function() 
          local player = getElementData( marker, "Creater" )   
          if getPlayerMoney (source) >= 5000 and isElement( player ) then 
            takePlayerMoney(source, 5000) 
            givePlayerMoney(player, 5000) 
            giveWeapon ( source, 38, 7500 ) 
            outputChatBox ( "You Have Bought a Minigun Weapon", source, 255, 255, 255, true ) 
            outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
        else 
            outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
        end 
      end 
    ) 
          
            local markers = { } 
             addCommandHandler( "open", 
            function( player ) 
                if isElement( markers[player] ) then 
                destroyElement(markers[player] ) 
             end     
                local pTeam = getPlayerTeam ( source ) 
                if getTeamName ( pTeam ) == "Robbers" then 
            local x,y,z = getElementPosition( player ) 
                markers[player] = createMarker( x, y+1, z, "cylinder", 3,255, 0, 2, 255 )     
                setElementData( markers[player], "Creater", player ) 
            end 
            end 
             ) 
            addEventHandler( "onMarkerHit", resourceRoot, 
            function(hitElement ) 
                if getElementType( hitElement ) == "player" then 
                    triggerClientEvent( hitElement, "open_window", hitElement, source ) 
                    end 
                end 
             ) 
Link to comment

    GUIEditor = { 
            gridlist = {}, 
            button = {}, 
            window = {}, 
        } 
        GUIEditor.window[1] = guiCreateWindow(262, 90, 279, 410, "Weapon Shop By ~[ #al-Kobra ]~", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
          
        GUIEditor.button[1] = guiCreateButton(23, 342, 105, 45, "~[ Choose ]~", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[1], "default-bold-small") 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFA4A4A4") 
        GUIEditor.button[2] = guiCreateButton(150, 342, 105, 45, "~[ X  ]~", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[2], "default-bold-small") 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFA4A4A4") 
        GUIEditor.gridlist[1] = guiCreateGridList(13, 23, 252, 313, false, GUIEditor.window[1]) 
        guiGridListAddColumn(GUIEditor.gridlist[1], "Weapon", 0.4) 
        guiGridListAddColumn(GUIEditor.gridlist[1], "Price", 0.4) 
        guiGridListAddRow(GUIEditor.gridlist[1]) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "AK-47", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 0, 2, "300", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "M4", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 1, 2, "450", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "Pistol", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 2, 2, "550", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "Shotgun", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 3, 2, "1000", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 4, 1, "Grenade", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 4, 2, "1500", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 5, 1, "Molotov Cocktails", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 5, 2, "3000", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 6, 1, "Minigun", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 6, 2, "5000", false, false)     
        guiSetVisible (GUIEditor.window[1], false) 
      
        addEvent("2dhar", true) 
        addEventHandler("2dhar", root, 
        function() 
            guiSetVisible(GUIEditor.window[1], true) 
                showCursor (true) 
            end 
            ) 
          
        addEvent("25fa2", true) 
        addEventHandler("25fa2", root, 
        function() 
            guiSetVisible(GUIEditor.window[1], false) 
                showCursor (false) 
            end 
            ) 
          
    addEventHandler( "onClientGUIClick", resourceRoot,function(  ) 
        if ( source == GUIEditor.button[2] ) then 
            guiSetVisible ( GUIEditor.window[1], true )   
            showCursor(false) 
        end 
    end 
    ) 
        local theMarker = false 
        
        addEventHandler( "onClientGUIDoubleClick", getRootElement(), 
        function () 
        if source == GUIEditor.gridlist[1]  then 
        local selectedRow, selectedCol = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) 
        local Name = guiGridListGetItemText( GUIEditor.gridlist[1], selectedRow, selectedCol ) 
        if Name == "AK-47" then 
        triggerServerEvent("kobra1",localPlayer) 
        guiSetVisible (GUIEditor.window[1], false) 
        showCursor(false) 
        end 
        elseif Name == "M4" then 
        triggerServerEvent("kobra2",localPlayer) 
        guiSetVisible (GUIEditor.window[1], false) 
        showCursor(false) 
        elseif Name == "Pistol" then 
        triggerServerEvent("kobra3",localPlayer) 
        guiSetVisible (GUIEditor.window[1], false) 
        showCursor(false) 
        elseif Name == "Shotgun" then 
        triggerServerEvent("kobra4",localPlayer) 
        guiSetVisible (GUIEditor.window[1], false) 
        showCursor(false) 
        elseif Name == "Grenade" then 
        triggerServerEvent("kobra5",localPlayer) 
        guiSetVisible (GUIEditor.window[1], false) 
        showCursor(false) 
        elseif Name == "Molotov Cocktails" then 
        triggerServerEvent("kobra6",localPlayer) 
        guiSetVisible (GUIEditor.window[1], false) 
        showCursor(false) 
        elseif Name == "Minigun" then 
        triggerServerEvent("kobra6",localPlayer) 
        guiSetVisible (GUIEditor.window[1], false) 
        showCursor(false) 
                end 
       ) 
        addEventHandler( "onClientGUIClick", getRootElement(), 
        function () 
        if source == GUIEditor.button[1]  then 
        local selectedRow, selectedCol = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) 
        local Name = guiGridListGetItemText( GUIEditor.gridlist[1], selectedRow, selectedCol ) 
        if Name == "AK-47" then 
        triggerServerEvent("kobra1",localPlayer) 
        guiSetVisible (GUIEditor.window[1], false) 
        showCursor(false) 
        end 
        elseif Name == "M4" then 
        triggerServerEvent("kobra2",localPlayer) 
        guiSetVisible (GUIEditor.window[1], false) 
        showCursor(false) 
        elseif Name == "Pistol" then 
        triggerServerEvent("kobra3",localPlayer) 
        guiSetVisible (GUIEditor.window[1], false) 
        showCursor(false) 
        elseif Name == "Shotgun" then 
        triggerServerEvent("kobra4",localPlayer) 
        guiSetVisible (GUIEditor.window[1], false) 
        showCursor(false) 
        elseif Name == "Grenade" then 
        triggerServerEvent("kobra5",localPlayer) 
        guiSetVisible (GUIEditor.window[1], false) 
        showCursor(false) 
        elseif Name == "Molotov Cocktails" then 
        triggerServerEvent("kobra6",localPlayer) 
        guiSetVisible (GUIEditor.window[1], false) 
        showCursor(false) 
        elseif Name == "Minigun" then 
        triggerServerEvent("kobra7",localPlayer) 
        guiSetVisible (GUIEditor.window[1], false) 
        showCursor(false) 
                end 
           end 
    end 
 )                
            local theMarker = false         
            addEvent( "open_window",true ) 
            addEventHandler( "open_window", root, 
            function( marker )     
            guiSetVisible( window, true ) 
            showCursor( true )     
            theMarker = marker 
            end 
            ) 
Link to comment

الزبدة جرب

Client

GUIEditor = { 
        gridlist = {}, 
        button = {}, 
        window = {}, 
    } 
    GUIEditor.window[1] = guiCreateWindow(262, 90, 279, 410, "Weapon Shop By ~[ #al-Kobra ]~", false) 
    guiWindowSetSizable(GUIEditor.window[1], false) 
      
    GUIEditor.button[1] = guiCreateButton(23, 342, 105, 45, "~[ Choose ]~", false, GUIEditor.window[1]) 
    guiSetFont(GUIEditor.button[1], "default-bold-small") 
    guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFA4A4A4") 
    GUIEditor.button[2] = guiCreateButton(150, 342, 105, 45, "~[ X  ]~", false, GUIEditor.window[1]) 
    guiSetFont(GUIEditor.button[2], "default-bold-small") 
    guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFA4A4A4") 
    GUIEditor.gridlist[1] = guiCreateGridList(13, 23, 252, 313, false, GUIEditor.window[1]) 
    guiGridListAddColumn(GUIEditor.gridlist[1], "Weapon", 0.4) 
    guiGridListAddColumn(GUIEditor.gridlist[1], "Price", 0.4) 
    guiGridListAddRow(GUIEditor.gridlist[1]) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "AK-47", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 0, 2, "300", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "M4", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 1, 2, "450", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "Pistol", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 2, 2, "550", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "Shotgun", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 3, 2, "1000", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 4, 1, "Grenade", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 4, 2, "1500", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 5, 1, "Molotov Cocktails", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 5, 2, "3000", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 6, 1, "Minigun", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 6, 2, "5000", false, false)     
    guiSetVisible (GUIEditor.window[1], false) 
  
    addEvent("2dhar", true) 
    addEventHandler("2dhar", root, 
    function() 
        guiSetVisible(GUIEditor.window[1], true) 
            showCursor (true) 
        end 
        ) 
      
    addEvent("25fa2", true) 
    addEventHandler("25fa2", root, 
    function() 
        guiSetVisible(GUIEditor.window[1], false) 
            showCursor (false) 
        end 
        ) 
      
addEventHandler( "onClientGUIClick", resourceRoot,function(  ) 
    if ( source == GUIEditor.button[2] ) then 
        guiSetVisible ( GUIEditor.window[1], true )   
        showCursor(false) 
    end 
end 
) 
    local theMarker = false 
    
    addEventHandler( "onClientGUIDoubleClick", getRootElement(), 
    function () 
    if source == GUIEditor.gridlist[1]  then 
    local selectedRow, selectedCol = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) 
    local Name = guiGridListGetItemText( GUIEditor.gridlist[1], selectedRow, selectedCol ) 
    if Name == "AK-47" then 
    triggerServerEvent("kobra1",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    end 
    elseif Name == "M4" then 
    triggerServerEvent("kobra2",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Pistol" then 
    triggerServerEvent("kobra3",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Shotgun" then 
    triggerServerEvent("kobra4",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Grenade" then 
    triggerServerEvent("kobra5",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Molotov Cocktails" then 
    triggerServerEvent("kobra6",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Minigun" then 
    triggerServerEvent("kobra6",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
            end 
   end 
   ) 
    addEventHandler( "onClientGUIClick", getRootElement(), Click) 
    function Click() 
    if source == GUIEditor.button[1]  then 
    local selectedRow, selectedCol = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) 
    local Name = guiGridListGetItemText( GUIEditor.gridlist[1], selectedRow, selectedCol ) 
    if Name == "AK-47" then 
    triggerServerEvent("kobra1",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    end 
    elseif Name == "M4" then 
    triggerServerEvent("kobra2",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Pistol" then 
    triggerServerEvent("kobra3",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Shotgun" then 
    triggerServerEvent("kobra4",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Grenade" then 
    triggerServerEvent("kobra5",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Molotov Cocktails" then 
    triggerServerEvent("kobra6",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Minigun" then 
    triggerServerEvent("kobra7",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
            end 
       end 
end 
              
        local theMarker = false         
        addEvent( "open_window",true ) 
        addEventHandler( "open_window", root, 
        function( marker )     
        guiSetVisible( window, true ) 
        showCursor( true )     
        theMarker = marker 
        end 
        ) 

Server

addEventHandler('onMarkerHit', markers[player], 
function( hitElement ) 
triggerClientEvent ("2dhar", root ) 
end 
) 
  
addEventHandler('onMarkerLeave', markers[player], 
function( leftElement ) 
triggerClientEvent ("25fa2", root ) 
end 
) 
  
  
addEvent("kobra1", true) 
addEventHandler("kobra1", root, 
function() 
      if (getPlayerMoney (source) >= 300) then 
        takePlayerMoney(source, 300) 
        giveWeapon ( source, 30, 4500 ) 
        outputChatBox ( "You Have Bought an AK-47 Weapon", source, 255, 255, 255, true ) 
        outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
    else 
        outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
    end 
  end 
) 
  
  
addEvent("kobra2", true) 
addEventHandler("kobra2", root, 
function() 
      if (getPlayerMoney (source) >= 450) then 
        takePlayerMoney(source, 0) 
        giveWeapon ( source, 31, 4500 ) 
        outputChatBox ( "You Have Bought a M4 Weapon", source, 255, 255, 255, true ) 
        outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
    else 
        outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
    end 
  end 
) 
  
  
addEvent("kobra3", true) 
addEventHandler("kobra3", root, 
function() 
      if (getPlayerMoney (source) >= 550) then 
        takePlayerMoney(source, 550) 
        giveWeapon ( source, 22, 4500 ) 
        outputChatBox ( "You Have Bought a Pistol Weapon", source, 255, 255, 255, true ) 
        outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
    else 
        outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
    end 
  end 
) 
  
  
addEvent("kobra4", true) 
addEventHandler("kobra4", root, 
function() 
      if (getPlayerMoney (source) >= 1000) then 
        takePlayerMoney(source, 1000) 
        giveWeapon ( source, 25, 4500 ) 
        outputChatBox ( "You Have Bought a Shotgun Weapon", source, 255, 255, 255, true ) 
        outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
    else 
        outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
    end 
  end 
) 
  
  
addEvent("kobra5", true) 
addEventHandler("kobra5", root, 
function() 
      if (getPlayerMoney (source) >= 1500) then 
        takePlayerMoney(source, 1500) 
        giveWeapon ( source, 16, 300 ) 
        outputChatBox ( "You Have Bought a Grenade Weapon", source, 255, 255, 255, true ) 
        outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
    else 
        outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
    end 
  end 
) 
  
  
addEvent("kobra6", true) 
addEventHandler("kobra6", root, 
function() 
      if (getPlayerMoney (source) >= 3000) then 
        takePlayerMoney(source, 3000) 
        giveWeapon ( source, 18, 350 ) 
        outputChatBox ( "You Have Bought a Molotov Weapon", source, 255, 255, 255, true ) 
        outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
    else 
        outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
    end 
  end 
) 
  
addEvent("kobra7", true) 
addEventHandler("kobra7", root, 
function() 
      if (getPlayerMoney (source) >= 5000) then 
        takePlayerMoney(source, 5000) 
        giveWeapon ( source, 38, 7500 ) 
        outputChatBox ( "You Have Bought a Minigun Weapon", source, 255, 255, 255, true ) 
        outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
    else 
        outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
    end 
  end 
) 
  
  
  
        local markers = { } 
         addCommandHandler( "open", 
        function( player ) 
            if isElement( markers[player] ) then 
            destroyElement(markers[player] ) 
         end     
            local pTeam = getPlayerTeam ( source ) 
            if getTeamName ( pTeam ) == "Robbers" then 
        local x,y,z = getElementPosition( player ) 
            markers[player] = createMarker( x, y+1, z, "cylinder", 3,255, 0, 2, 255 )     
            setElementData( markers[player], "Creater", player ) 
        end 
        end 
         ) 
        addEventHandler( "onMarkerHit", resourceRoot, 
        function(hitElement ) 
            if getElementType( hitElement ) == "player" then 
                triggerClientEvent( hitElement, "open_window", hitElement, source ) 
                end 
            end 
         ) 
        addEvent( "Trigger", true ) 
        addEventHandler( "Trigger", root, 
        function( marker ) 
            local player = getElementData( marker, "Creater" )     
            if getPlayerMoney( source ) >= السعر and isElement( player )then 
                takePlayerMoney( source, السعر ) 
                givePlayerMoney( player, السعر ) 
                giveWeapon ( source, ID ) 
            end 
        end 
        ) 

Link to comment
سيرفر " سطر 3 خطأ في Markers

كلنت " سطر 95 خطأ

الكلنت زود اند فوق القوس

كذا

end 
end 
) 

السيرفر

شيل سطر 3

+

احذف end

addEventHandler('onMarkerHit', markers[player], 

تبغيه يحذف هذا ؟؟؟؟؟؟!!!!!!!!!!!!

Link to comment
سيرفر " سطر 3 خطأ في Markers

كلنت " سطر 95 خطأ

الكلنت زود اند فوق القوس

كذا

end 
end 
) 

السيرفر

شيل سطر 3

+

احذف end

addEventHandler('onMarkerHit', markers[player], 

تبغيه يحذف هذا ؟؟؟؟؟؟!!!!!!!!!!!!

انا ماقلت يشيل هذا

قصدي يشيل هذا

if leftElement == source then 

Link to comment
" سيرفر " سطر 144 خطأ

خطأ في كلنت سطر 133

client

GUIEditor = { 
        gridlist = {}, 
        button = {}, 
        window = {}, 
    } 
    GUIEditor.window[1] = guiCreateWindow(262, 90, 279, 410, "Weapon Shop By ~[ #al-Kobra ]~", false) 
    guiWindowSetSizable(GUIEditor.window[1], false) 
      
    GUIEditor.button[1] = guiCreateButton(23, 342, 105, 45, "~[ Choose ]~", false, GUIEditor.window[1]) 
    guiSetFont(GUIEditor.button[1], "default-bold-small") 
    guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFA4A4A4") 
    GUIEditor.button[2] = guiCreateButton(150, 342, 105, 45, "~[ X  ]~", false, GUIEditor.window[1]) 
    guiSetFont(GUIEditor.button[2], "default-bold-small") 
    guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFA4A4A4") 
    GUIEditor.gridlist[1] = guiCreateGridList(13, 23, 252, 313, false, GUIEditor.window[1]) 
    guiGridListAddColumn(GUIEditor.gridlist[1], "Weapon", 0.4) 
    guiGridListAddColumn(GUIEditor.gridlist[1], "Price", 0.4) 
    guiGridListAddRow(GUIEditor.gridlist[1]) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "AK-47", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 0, 2, "300", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "M4", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 1, 2, "450", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "Pistol", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 2, 2, "550", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "Shotgun", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 3, 2, "1000", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 4, 1, "Grenade", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 4, 2, "1500", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 5, 1, "Molotov Cocktails", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 5, 2, "3000", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 6, 1, "Minigun", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 6, 2, "5000", false, false)     
    guiSetVisible (GUIEditor.window[1], false) 
  
    addEvent("2dhar", true) 
    addEventHandler("2dhar", root, 
    function() 
        guiSetVisible(GUIEditor.window[1], true) 
            showCursor (true) 
        end 
        ) 
      
    addEvent("25fa2", true) 
    addEventHandler("25fa2", root, 
    function() 
        guiSetVisible(GUIEditor.window[1], false) 
            showCursor (false) 
        end 
        ) 
      
addEventHandler( "onClientGUIClick", resourceRoot,function(  ) 
    if ( source == GUIEditor.button[2] ) then 
        guiSetVisible ( GUIEditor.window[1], true )   
        showCursor(false) 
    end 
end 
) 
    local theMarker = false 
    
    addEventHandler( "onClientGUIDoubleClick", getRootElement(), 
    function () 
    if source == GUIEditor.gridlist[1]  then 
    local selectedRow, selectedCol = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) 
    local Name = guiGridListGetItemText( GUIEditor.gridlist[1], selectedRow, selectedCol ) 
    if Name == "AK-47" then 
    triggerServerEvent("kobra1",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    end 
    elseif Name == "M4" then 
    triggerServerEvent("kobra2",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Pistol" then 
    triggerServerEvent("kobra3",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Shotgun" then 
    triggerServerEvent("kobra4",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Grenade" then 
    triggerServerEvent("kobra5",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Molotov Cocktails" then 
    triggerServerEvent("kobra6",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Minigun" then 
    triggerServerEvent("kobra6",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
            end 
   end 
   ) 
    addEventHandler( "onClientGUIClick", getRootElement(), Click) 
    function Click() 
    if source == GUIEditor.button[1]  then 
    local selectedRow, selectedCol = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) 
    local Name = guiGridListGetItemText( GUIEditor.gridlist[1], selectedRow, selectedCol ) 
    if Name == "AK-47" then 
    triggerServerEvent("kobra1",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    end 
    elseif Name == "M4" then 
    triggerServerEvent("kobra2",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Pistol" then 
    triggerServerEvent("kobra3",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Shotgun" then 
    triggerServerEvent("kobra4",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Grenade" then 
    triggerServerEvent("kobra5",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Molotov Cocktails" then 
    triggerServerEvent("kobra6",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Minigun" then 
    triggerServerEvent("kobra7",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
            end 
       end ) 
              
        local theMarker = false         
        addEvent( "open_window",true ) 
        addEventHandler( "open_window", root, 
        function( marker )     
        guiSetVisible( window, true ) 
        showCursor( true )     
        theMarker = marker 
        end 
        ) 

سيرفر عشان الكلام العربي

Link to comment
" سيرفر " سطر 144 خطأ

خطأ في كلنت سطر 133

client

GUIEditor = { 
        gridlist = {}, 
        button = {}, 
        window = {}, 
    } 
    GUIEditor.window[1] = guiCreateWindow(262, 90, 279, 410, "Weapon Shop By ~[ #al-Kobra ]~", false) 
    guiWindowSetSizable(GUIEditor.window[1], false) 
      
    GUIEditor.button[1] = guiCreateButton(23, 342, 105, 45, "~[ Choose ]~", false, GUIEditor.window[1]) 
    guiSetFont(GUIEditor.button[1], "default-bold-small") 
    guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFA4A4A4") 
    GUIEditor.button[2] = guiCreateButton(150, 342, 105, 45, "~[ X  ]~", false, GUIEditor.window[1]) 
    guiSetFont(GUIEditor.button[2], "default-bold-small") 
    guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFA4A4A4") 
    GUIEditor.gridlist[1] = guiCreateGridList(13, 23, 252, 313, false, GUIEditor.window[1]) 
    guiGridListAddColumn(GUIEditor.gridlist[1], "Weapon", 0.4) 
    guiGridListAddColumn(GUIEditor.gridlist[1], "Price", 0.4) 
    guiGridListAddRow(GUIEditor.gridlist[1]) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "AK-47", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 0, 2, "300", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "M4", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 1, 2, "450", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "Pistol", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 2, 2, "550", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "Shotgun", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 3, 2, "1000", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 4, 1, "Grenade", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 4, 2, "1500", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 5, 1, "Molotov Cocktails", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 5, 2, "3000", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 6, 1, "Minigun", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 6, 2, "5000", false, false)     
    guiSetVisible (GUIEditor.window[1], false) 
  
    addEvent("2dhar", true) 
    addEventHandler("2dhar", root, 
    function() 
        guiSetVisible(GUIEditor.window[1], true) 
            showCursor (true) 
        end 
        ) 
      
    addEvent("25fa2", true) 
    addEventHandler("25fa2", root, 
    function() 
        guiSetVisible(GUIEditor.window[1], false) 
            showCursor (false) 
        end 
        ) 
      
addEventHandler( "onClientGUIClick", resourceRoot,function(  ) 
    if ( source == GUIEditor.button[2] ) then 
        guiSetVisible ( GUIEditor.window[1], true )   
        showCursor(false) 
    end 
end 
) 
    local theMarker = false 
    
    addEventHandler( "onClientGUIDoubleClick", getRootElement(), 
    function () 
    if source == GUIEditor.gridlist[1]  then 
    local selectedRow, selectedCol = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) 
    local Name = guiGridListGetItemText( GUIEditor.gridlist[1], selectedRow, selectedCol ) 
    if Name == "AK-47" then 
    triggerServerEvent("kobra1",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    end 
    elseif Name == "M4" then 
    triggerServerEvent("kobra2",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Pistol" then 
    triggerServerEvent("kobra3",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Shotgun" then 
    triggerServerEvent("kobra4",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Grenade" then 
    triggerServerEvent("kobra5",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Molotov Cocktails" then 
    triggerServerEvent("kobra6",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Minigun" then 
    triggerServerEvent("kobra6",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
            end 
   end 
   ) 
    addEventHandler( "onClientGUIClick", getRootElement(), Click) 
    function Click() 
    if source == GUIEditor.button[1]  then 
    local selectedRow, selectedCol = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) 
    local Name = guiGridListGetItemText( GUIEditor.gridlist[1], selectedRow, selectedCol ) 
    if Name == "AK-47" then 
    triggerServerEvent("kobra1",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    end 
    elseif Name == "M4" then 
    triggerServerEvent("kobra2",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Pistol" then 
    triggerServerEvent("kobra3",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Shotgun" then 
    triggerServerEvent("kobra4",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Grenade" then 
    triggerServerEvent("kobra5",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Molotov Cocktails" then 
    triggerServerEvent("kobra6",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Minigun" then 
    triggerServerEvent("kobra7",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
            end 
       end ) 
              
        local theMarker = false         
        addEvent( "open_window",true ) 
        addEventHandler( "open_window", root, 
        function( marker )     
        guiSetVisible( window, true ) 
        showCursor( true )     
        theMarker = marker 
        end 
        ) 

سيرفر عشان الكلام العربي

لا , لأن ما في ترايقر من الكلاينت

Link to comment
GUIEditor = { 
        gridlist = {}, 
        button = {}, 
        window = {}, 
    } 
    GUIEditor.window[1] = guiCreateWindow(262, 90, 279, 410, "Weapon Shop By ~[ #al-Kobra ]~", false) 
    guiWindowSetSizable(GUIEditor.window[1], false) 
      
    GUIEditor.button[1] = guiCreateButton(23, 342, 105, 45, "~[ Choose ]~", false, GUIEditor.window[1]) 
    guiSetFont(GUIEditor.button[1], "default-bold-small") 
    guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFA4A4A4") 
    GUIEditor.button[2] = guiCreateButton(150, 342, 105, 45, "~[ X  ]~", false, GUIEditor.window[1]) 
    guiSetFont(GUIEditor.button[2], "default-bold-small") 
    guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFA4A4A4") 
    GUIEditor.gridlist[1] = guiCreateGridList(13, 23, 252, 313, false, GUIEditor.window[1]) 
    guiGridListAddColumn(GUIEditor.gridlist[1], "Weapon", 0.4) 
    guiGridListAddColumn(GUIEditor.gridlist[1], "Price", 0.4) 
    guiGridListAddRow(GUIEditor.gridlist[1]) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "AK-47", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 0, 2, "300", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "M4", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 1, 2, "450", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "Pistol", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 2, 2, "550", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "Shotgun", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 3, 2, "1000", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 4, 1, "Grenade", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 4, 2, "1500", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 5, 1, "Molotov Cocktails", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 5, 2, "3000", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 6, 1, "Minigun", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 6, 2, "5000", false, false)     
    guiSetVisible (GUIEditor.window[1], false) 
  
    addEvent("2dhar", true) 
    addEventHandler("2dhar", root, 
    function() 
        guiSetVisible(GUIEditor.window[1], true) 
            showCursor (true) 
        end 
        ) 
      
    addEvent("25fa2", true) 
    addEventHandler("25fa2", root, 
    function() 
        guiSetVisible(GUIEditor.window[1], false) 
            showCursor (false) 
        end 
        ) 
      
addEventHandler( "onClientGUIClick", resourceRoot,function(  ) 
    if ( source == GUIEditor.button[2] ) then 
        guiSetVisible ( GUIEditor.window[1], true )   
        showCursor(false) 
    end 
end 
) 
    local theMarker = false 
    
    addEventHandler( "onClientGUIDoubleClick", getRootElement(), 
    function () 
    if source == GUIEditor.gridlist[1]  then 
    local selectedRow, selectedCol = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) 
    local Name = guiGridListGetItemText( GUIEditor.gridlist[1], selectedRow, selectedCol ) 
    if Name == "AK-47" then 
    triggerServerEvent("kobra1",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    end 
    elseif Name == "M4" then 
    triggerServerEvent("kobra2",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Pistol" then 
    triggerServerEvent("kobra3",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Shotgun" then 
    triggerServerEvent("kobra4",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Grenade" then 
    triggerServerEvent("kobra5",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Molotov Cocktails" then 
    triggerServerEvent("kobra6",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Minigun" then 
    triggerServerEvent("kobra6",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
            end 
   end 
   ) 
    addEventHandler( "onClientGUIClick", getRootElement(), Click) 
    function Click() 
    if source == GUIEditor.button[1]  then 
    local selectedRow, selectedCol = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) 
    local Name = guiGridListGetItemText( GUIEditor.gridlist[1], selectedRow, selectedCol ) 
    if Name == "AK-47" then 
    triggerServerEvent("kobra1",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    end 
    elseif Name == "M4" then 
    triggerServerEvent("kobra2",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Pistol" then 
    triggerServerEvent("kobra3",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Shotgun" then 
    triggerServerEvent("kobra4",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Grenade" then 
    triggerServerEvent("kobra5",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Molotov Cocktails" then 
    triggerServerEvent("kobra6",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Minigun" then 
    triggerServerEvent("kobra7",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
            end 
            end 
       end ) 
       ) 
            
        local theMarker = false         
        addEvent( "open_window",true ) 
        addEventHandler( "open_window", root, 
        function( marker )     
        guiSetVisible( window, true ) 
        showCursor( true )     
        theMarker = marker 
        end 
        ) 

addEventHandler('onMarkerHit', markers[player], 
function( hitElement ) 
triggerClientEvent ("2dhar", root ) 
end 
) 
  
addEventHandler('onMarkerLeave', markers[player], 
function( leftElement ) 
triggerClientEvent ("25fa2", root ) 
end 
) 
  
  
addEvent("kobra1", true) 
addEventHandler("kobra1", root, 
function() 
      if (getPlayerMoney (source) >= 300) then 
        takePlayerMoney(source, 300) 
        giveWeapon ( source, 30, 4500 ) 
        outputChatBox ( "You Have Bought an AK-47 Weapon", source, 255, 255, 255, true ) 
        outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
    else 
        outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
    end 
  end 
) 
  
  
addEvent("kobra2", true) 
addEventHandler("kobra2", root, 
function() 
      if (getPlayerMoney (source) >= 450) then 
        takePlayerMoney(source, 0) 
        giveWeapon ( source, 31, 4500 ) 
        outputChatBox ( "You Have Bought a M4 Weapon", source, 255, 255, 255, true ) 
        outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
    else 
        outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
    end 
  end 
) 
  
  
addEvent("kobra3", true) 
addEventHandler("kobra3", root, 
function() 
      if (getPlayerMoney (source) >= 550) then 
        takePlayerMoney(source, 550) 
        giveWeapon ( source, 22, 4500 ) 
        outputChatBox ( "You Have Bought a Pistol Weapon", source, 255, 255, 255, true ) 
        outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
    else 
        outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
    end 
  end 
) 
  
  
addEvent("kobra4", true) 
addEventHandler("kobra4", root, 
function() 
      if (getPlayerMoney (source) >= 1000) then 
        takePlayerMoney(source, 1000) 
        giveWeapon ( source, 25, 4500 ) 
        outputChatBox ( "You Have Bought a Shotgun Weapon", source, 255, 255, 255, true ) 
        outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
    else 
        outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
    end 
  end 
) 
  
  
addEvent("kobra5", true) 
addEventHandler("kobra5", root, 
function() 
      if (getPlayerMoney (source) >= 1500) then 
        takePlayerMoney(source, 1500) 
        giveWeapon ( source, 16, 300 ) 
        outputChatBox ( "You Have Bought a Grenade Weapon", source, 255, 255, 255, true ) 
        outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
    else 
        outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
    end 
  end 
) 
  
  
addEvent("kobra6", true) 
addEventHandler("kobra6", root, 
function() 
      if (getPlayerMoney (source) >= 3000) then 
        takePlayerMoney(source, 3000) 
        giveWeapon ( source, 18, 350 ) 
        outputChatBox ( "You Have Bought a Molotov Weapon", source, 255, 255, 255, true ) 
        outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
    else 
        outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
    end 
  end 
) 
  
addEvent("kobra7", true) 
addEventHandler("kobra7", root, 
function() 
      if (getPlayerMoney (source) >= 5000) then 
        takePlayerMoney(source, 5000) 
        giveWeapon ( source, 38, 7500 ) 
        outputChatBox ( "You Have Bought a Minigun Weapon", source, 255, 255, 255, true ) 
        outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
    else 
        outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
    end 
  end 
) 
  
  
  
        local markers = { } 
         addCommandHandler( "open", 
        function( player ) 
            if isElement( markers[player] ) then 
            destroyElement(markers[player] ) 
         end     
            local pTeam = getPlayerTeam ( source ) 
            if getTeamName ( pTeam ) == "Robbers" then 
        local x,y,z = getElementPosition( player ) 
            markers[player] = createMarker( x, y+1, z, "cylinder", 3,255, 0, 2, 255 )     
            setElementData( markers[player], "Creater", player ) 
        end 
         ) 
        addEventHandler( "onMarkerHit", resourceRoot, 
        function(hitElement ) 
            if getElementType( hitElement ) == "player" then 
                triggerClientEvent( hitElement, "open_window", hitElement, source ) 
                end 
            end 
         ) 
        addEvent( "Trigger", true ) 
        addEventHandler( "Trigger", root, 
        function( marker ) 
            local player = getElementData( marker, "Creater" )     
            if getPlayerMoney( source ) >= السعر and isElement( player )then 
                takePlayerMoney( source, السعر ) 
                givePlayerMoney( player, السعر ) 
                giveWeapon ( source, ID ) 
            end 
        end 
        ) 

Link to comment

جرب

Client

GUIEditor = { 
        gridlist = {}, 
        button = {}, 
        window = {}, 
    } 
    GUIEditor.window[1] = guiCreateWindow(262, 90, 279, 410, "Weapon Shop By ~[ #al-Kobra ]~", false) 
    guiWindowSetSizable(GUIEditor.window[1], false) 
      
    GUIEditor.button[1] = guiCreateButton(23, 342, 105, 45, "~[ Choose ]~", false, GUIEditor.window[1]) 
    guiSetFont(GUIEditor.button[1], "default-bold-small") 
    guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFA4A4A4") 
    GUIEditor.button[2] = guiCreateButton(150, 342, 105, 45, "~[ X  ]~", false, GUIEditor.window[1]) 
    guiSetFont(GUIEditor.button[2], "default-bold-small") 
    guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFA4A4A4") 
    GUIEditor.gridlist[1] = guiCreateGridList(13, 23, 252, 313, false, GUIEditor.window[1]) 
    guiGridListAddColumn(GUIEditor.gridlist[1], "Weapon", 0.4) 
    guiGridListAddColumn(GUIEditor.gridlist[1], "Price", 0.4) 
    guiGridListAddRow(GUIEditor.gridlist[1]) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "AK-47", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 0, 2, "300", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "M4", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 1, 2, "450", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "Pistol", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 2, 2, "550", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "Shotgun", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 3, 2, "1000", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 4, 1, "Grenade", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 4, 2, "1500", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 5, 1, "Molotov Cocktails", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 5, 2, "3000", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 6, 1, "Minigun", false, false) 
    guiGridListSetItemText(GUIEditor.gridlist[1], 6, 2, "5000", false, false)     
    guiSetVisible (GUIEditor.window[1], false) 
  
    addEvent("2dhar", true) 
    addEventHandler("2dhar", root, 
    function() 
        guiSetVisible(GUIEditor.window[1], true) 
            showCursor (true) 
        end 
        ) 
      
    addEvent("25fa2", true) 
    addEventHandler("25fa2", root, 
    function() 
        guiSetVisible(GUIEditor.window[1], false) 
            showCursor (false) 
        end 
        ) 
      
addEventHandler( "onClientGUIClick", resourceRoot,function(  ) 
    if ( source == GUIEditor.button[2] ) then 
        guiSetVisible ( GUIEditor.window[1], true )   
        showCursor(false) 
    end 
end 
) 
    local theMarker = false 
    
    addEventHandler( "onClientGUIDoubleClick", getRootElement(), 
    function () 
    if source == GUIEditor.gridlist[1]  then 
    local selectedRow, selectedCol = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) 
    local Name = guiGridListGetItemText( GUIEditor.gridlist[1], selectedRow, selectedCol ) 
    if Name == "AK-47" then 
    triggerServerEvent("kobra1",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    end 
    elseif Name == "M4" then 
    triggerServerEvent("kobra2",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Pistol" then 
    triggerServerEvent("kobra3",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Shotgun" then 
    triggerServerEvent("kobra4",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Grenade" then 
    triggerServerEvent("kobra5",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Molotov Cocktails" then 
    triggerServerEvent("kobra6",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Minigun" then 
    triggerServerEvent("kobra6",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
            end 
   end 
   ) 
    addEventHandler( "onClientGUIClick", getRootElement(), Click) 
    function Click() 
    if source == GUIEditor.button[1]  then 
    local selectedRow, selectedCol = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) 
    local Name = guiGridListGetItemText( GUIEditor.gridlist[1], selectedRow, selectedCol ) 
    if Name == "AK-47" then 
    triggerServerEvent("kobra1",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    end 
    elseif Name == "M4" then 
    triggerServerEvent("kobra2",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Pistol" then 
    triggerServerEvent("kobra3",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Shotgun" then 
    triggerServerEvent("kobra4",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Grenade" then 
    triggerServerEvent("kobra5",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Molotov Cocktails" then 
    triggerServerEvent("kobra6",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
    elseif Name == "Minigun" then 
    triggerServerEvent("kobra7",localPlayer) 
    guiSetVisible (GUIEditor.window[1], false) 
    showCursor(false) 
            end 
       end ) 
            
        local theMarker = false         
        addEvent( "open_window",true ) 
        addEventHandler( "open_window", root, 
        function( marker )     
        guiSetVisible( window, true ) 
        showCursor( true )     
        theMarker = marker 
        end 
        ) 

Server

addEventHandler('onMarkerHit', markers[player], 
function( hitElement ) 
triggerClientEvent ("2dhar", root ) 
end 
) 
  
addEventHandler('onMarkerLeave', markers[player], 
function( leftElement ) 
triggerClientEvent ("25fa2", root ) 
end 
) 
  
  
addEvent("kobra1", true) 
addEventHandler("kobra1", root, 
function() 
      if (getPlayerMoney (source) >= 300) then 
        takePlayerMoney(source, 300) 
        giveWeapon ( source, 30, 4500 ) 
        outputChatBox ( "You Have Bought an AK-47 Weapon", source, 255, 255, 255, true ) 
        outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
    else 
        outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
    end 
  end 
) 
  
  
addEvent("kobra2", true) 
addEventHandler("kobra2", root, 
function() 
      if (getPlayerMoney (source) >= 450) then 
        takePlayerMoney(source, 0) 
        giveWeapon ( source, 31, 4500 ) 
        outputChatBox ( "You Have Bought a M4 Weapon", source, 255, 255, 255, true ) 
        outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
    else 
        outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
    end 
  end 
) 
  
  
addEvent("kobra3", true) 
addEventHandler("kobra3", root, 
function() 
      if (getPlayerMoney (source) >= 550) then 
        takePlayerMoney(source, 550) 
        giveWeapon ( source, 22, 4500 ) 
        outputChatBox ( "You Have Bought a Pistol Weapon", source, 255, 255, 255, true ) 
        outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
    else 
        outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
    end 
  end 
) 
  
  
addEvent("kobra4", true) 
addEventHandler("kobra4", root, 
function() 
      if (getPlayerMoney (source) >= 1000) then 
        takePlayerMoney(source, 1000) 
        giveWeapon ( source, 25, 4500 ) 
        outputChatBox ( "You Have Bought a Shotgun Weapon", source, 255, 255, 255, true ) 
        outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
    else 
        outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
    end 
  end 
) 
  
  
addEvent("kobra5", true) 
addEventHandler("kobra5", root, 
function() 
      if (getPlayerMoney (source) >= 1500) then 
        takePlayerMoney(source, 1500) 
        giveWeapon ( source, 16, 300 ) 
        outputChatBox ( "You Have Bought a Grenade Weapon", source, 255, 255, 255, true ) 
        outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
    else 
        outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
    end 
  end 
) 
  
  
addEvent("kobra6", true) 
addEventHandler("kobra6", root, 
function() 
      if (getPlayerMoney (source) >= 3000) then 
        takePlayerMoney(source, 3000) 
        giveWeapon ( source, 18, 350 ) 
        outputChatBox ( "You Have Bought a Molotov Weapon", source, 255, 255, 255, true ) 
        outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
    else 
        outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
    end 
  end 
) 
  
addEvent("kobra7", true) 
addEventHandler("kobra7", root, 
function() 
      if (getPlayerMoney (source) >= 5000) then 
        takePlayerMoney(source, 5000) 
        giveWeapon ( source, 38, 7500 ) 
        outputChatBox ( "You Have Bought a Minigun Weapon", source, 255, 255, 255, true ) 
        outputChatBox("#999999**  #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) 
    else 
        outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) 
    end 
  end 
) 
  
  
  
        local markers = { } 
         addCommandHandler( "open", 
        function( player ) 
            if isElement( markers[player] ) then 
            destroyElement(markers[player] ) 
         end     
            local pTeam = getPlayerTeam ( source ) 
            if getTeamName ( pTeam ) == "Robbers" then 
        local x,y,z = getElementPosition( player ) 
            markers[player] = createMarker( x, y+1, z, "cylinder", 3,255, 0, 2, 255 )     
            setElementData( markers[player], "Creater", player ) 
        end 
         ) 
        addEventHandler( "onMarkerHit", resourceRoot, 
        function(hitElement ) 
            if getElementType( hitElement ) == "player" then 
                triggerClientEvent( hitElement, "open_window", hitElement, source ) 
                end 
            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...