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