Hi,
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
end)
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.")
user:removeMoney(500)
else
drawNotification("~r~Not enough space!")
end
else
drawNotification("~r~Not enough cash!")
end
end)
end
function menuTiendas()
MenuTitle = "Productos"
ClearMenu()
Menu.addButton("Repair Kit", "repairKit", arg)
Menu.addButton("Armor", "armor", arg)
end
Cheers,
Edit: not erros in F8 and Console :S