Sziasztok!
Elakadtam és a segítségeteket szeretném kérni. Csinálok egy fegyver vásárlós cuccot, amihez x mennyiségű itemre is szüksége van az adott játékosnak, azonban a lekérdezésnél mindig 0-t hoz vissza. Íme a kód:
 
 
if getElementData(localPlayer, \"char:money\") >= 8000 then
         outputChatBox(\"Pénz van\")
         if exports.item:hasItem(localPlayer, 82, 8) then--ezzel se jó
            outputChatBox(\"Vas van\")
            if exports.item:hasItem(83,8) then--és ezzel se
               outputChatBox(\"Van minden\")
            else
               outputChatBox(\"Nincs\")
            end
         else
            outputChatBox(\"Nincs vas\")
         end
      else
         outputChatBox(\"Nincs pénz\")
      end
 
 
			
			
			
				Nem saját..itt van a hasItem a resource-ból:
 
 
function hasItem(itemID, itemValue)
if (not itemValue) then
   if (playerItems[\"bag\"] and playerItems[\"key\"] and playerItems[\"licens\"]) then
      for i = 1, row * column do
         if (playerItems[\"bag\"][i]) then
            if (itemID == playerItems[\"bag\"][i][\"id\"]) then
               return true, itemID, itemValue, i, \"bag\", countItemsInInventory(itemID)
            end
         end
      end
      for i = 1, row * column do
         if (playerItems[\"key\"][i]) then
            if (itemID == playerItems[\"key\"][i][\"id\"]) then
               return true, itemID, itemValue, i, \"key\"
            end
         end
      end
      for i = 1, row * column do
         if (playerItems[\"licens\"][i]) then
            if (itemID == playerItems[\"licens\"][i][\"id\"]) then
               return true, itemID, itemValue, i, \"licens\"
            end
         end   
      end
      return false
   end
   return false
else
   if (playerItems[\"bag\"] and playerItems[\"key\"] and playerItems[\"licens\"]) then
      for i = 1, row * column do
         if (playerItems[\"bag\"][i]) then
            if (itemID == playerItems[\"bag\"][i][\"id\"] and itemValue == playerItems[\"bag\"][i][\"value\"]) then
               return true