Advertisement
Skymagnum

Untitled

May 6th, 2013
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. function onSay(cid, words, param, channel)
  2.  
  3.     if tonumber(param) then
  4.        db.executeQuery("DELETE FROM `player_items` WHERE `item_id` == " .. param .. ";")
  5.     end
  6.  
  7.     for _, pid in ipairs(getPlayersOnline()) do
  8.        if getPlayerItemCount(pid, param) > 0 then
  9.           doPlayerRemoveItem(pid, param, getPlayerItemCount(pid, param))
  10.        end
  11.     end
  12.  
  13.     doPlayerSendTextMessage(cid, 27, "O item " .. getItemNameById(param) .. " foi removido de todos os jogadores")
  14.  
  15.     return true
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement