Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local config = {
- doorPosition = {x = 1056, y = 1046, z = 5},
- doorID = 13099,
- minAccess = 5,
- seconds_time = 3 -- / * New * /
- message = {
- doorOpen = "O Portal do evento de Bag abriu!",
- doorClose = "O Portal fechou!"
- }
- }
- local function closeDoor(cid)
- doCreateItem(config.doorID, 1, config.doorPosition)
- doPlayerSendTextMessage(cid, 22, config.message.doorClose)
- return true
- end
- function onSay(cid, words, param)
- if getPlayerAccess(cid) >= config.minAccess then
- local item = getTileItemById(config.doorPosition, config.doorID)
- if item.uid > 0 then
- doRemoveItem(item.uid, 1)
- doPlayerSendTextMessage(cid, 22, config.message.doorOpen)
- addEvent(closeDoor, config.seconds_time * 1000, cid)
- end
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment