Guest User

Untitled

a guest
Oct 18th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1. local has, key, item = exports.global:hasItem( value, 2)
  2. if has then
  3. otherNumber = ownNumber
  4. ownNumber = item ---how do I get  the itemValue of has?
  5. else
  6. outputChatBox( "(( You do not have a phone. ))", player, 255, 0, 0 )
  7. end
  8.  
  9.  
  10.  
  11. function hasItem(element, itemID, itemValue)
  12.     local success, error = loadItems( element )
  13.     if success then
  14.         for key, value in pairs(saveditems[element]) do
  15.             if value[1] == itemID and ( not itemValue or itemValue == value[2] ) then
  16.                 return true, key, value[2], value[3]
  17.             end
  18.         end
  19.         return false
  20.     else
  21.         return false, "loadItems error: " .. error
  22.     end
  23. end
Add Comment
Please, Sign In to add comment