Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onSay(cid, words, param) -- By Byerne XTibia
- local item, type = {12596,1}, MESSAGE_INFO_DESCR
- if (not param or param == '') then
- return true, doPlayerSendCancel(cid, "Command param required.")
- end
- if not doPlayerRemoveItem(cid, item[1], item[2]) then
- strocnt = item[2] == 1 and getItemArticleById(item[1]) or item[2]
- return true, doPlayerSendCancel(cid, "You need at least "..strocnt.." "..getItemNameById(item[1]).." to broadcast a message.")
- end
- for _, pid in ipairs(getPlayersOnline()) do
- if getPlayerGroupId(cid) > getPlayerGroupId(pid) then
- doPlayerSendTextMessage(pid, type, getPlayerName(cid)..' ['..getPlayerLevel(cid)..']: '..param)
- end
- return true
- end
- doPlayerSendTextMessage(cid, 18, words..' '..param)
- return TRUE
- end
Advertisement
Add Comment
Please, Sign In to add comment