Advertisement
Guest User

Untitled

a guest
Mar 24th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. function onSay(cid, words, param)
  2.  
  3.     local slot = getPlayerSlotItem(cid, 3)
  4.     local items = getContainerItems(slot.uid)
  5.     local backpack = false
  6.  
  7.     for _, array in pairs(items) do
  8.         if array.itemid == 2160 then
  9.             if  getContainerSlotsFree(array.uid) >= 1 then
  10.                 backpack = true
  11.                 doPlayerSendTextMessage(cid, 27, "Foi adicionado 100, 2160 em sua bag secundaria")
  12.                 doAddContainerItem(array.uid, 2160, 100)   
  13.                 break
  14.             end
  15.         end
  16.     end
  17.  
  18.     if not backpack then
  19.         doPlayerSendTextMessage(cid, 27, "Você não tem uma bag.")
  20.     end
  21.    
  22.     return true
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement