[HELP] Get Item bought



I am trying to do a simple menu Store to buy some items but I am getting problems to buy a item.
My store menu displays , and I can select the item but When I press enter it doesn´t do anything.
I am sure the fail is not Enter Key because I use the same gui for other script and it works.

function repairKit()
    TriggerEvent('es:getPlayerFromId', source, function(user)
        if(user.money > 500) then
            local repaircount = 0
            TriggerEvent("player:getQuantity", 7, function(data) -- GET QUANTITY ON INVENTORY
                repaircount = data.count
            if repaircount < 2 then
	            TriggerEvent("player:receiveItem", 7, 1) -- ("player:receiveItem", 1, 1) = ADD ITEM , ID1 ( object ), AND "+1"
	            TriggerClientEvent("es_freeroam:notify", source, "CHAR_AMMUNATION", 1, "BADULAKE", false, "thanks.")
	        drawNotification("~r~Not enough space!")
	        drawNotification("~r~Not enough cash!")

function menuTiendas()
    MenuTitle = "Productos"
    Menu.addButton("Repair Kit", "repairKit", arg)
    Menu.addButton("Armor", "armor", arg)


Edit: not erros in F8 and Console :S


Item created in the DB ? Maybe ? Cause inventory is all with items created in the DB.


The item is created into DB , it´s weird because should have some error in Debug Console or displays some drawNotification but It is not.


Hope you’ll find a solution. Interested in that kind of stuff i you release it :slight_smile: (Hope so :))


I have done a short advanced : I can buy a item. My problem is still being to set a item maximum…


What Inventory script did you use ? VDK_Inventory ?


Yes, I use vdk inventory


This modifications didn’t help in this case right ? :

Maybe only work on recolt and not on buying, dunno, try to help you as much as I can :slight_smile: