JDB
OtLand Veteran
- Joined
- Jun 1, 2009
- Messages
- 4,145
- Solutions
- 2
- Reaction score
- 115
This is another script I had found and updated.
I do not remember where it came from, but here it is!
Tested and Works 100%
Talkactions:
Script:
I guess this is Colandus's script, so credits to him.
But I did fix it -- I don't want rep for this.
I do not remember where it came from, but here it is!
Tested and Works 100%
Talkactions:
PHP:
<talkaction log="yes" access="5" words="/broadcast" event="script" value="auto_broadcast.lua"/>
Script:
Lua:
local messages =
{
"Type [!blessings] to see all the blessings you need or have!",
"Write [!buyitems] to see a list of items for sale!",
"Use [!info] for some extra server information."
}
local interval = 2 -- 2 minutes between messages.
local requiredGroupId = 3
local isActive = TRUE
function onSay(cid, words, param)
if param == "deactivate" then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Broadcasting has been deactivated.")
isActive = FALSE
else
if getPlayerGroupId(cid) >= requiredGroupId then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Broadcasting has started.")
broadcast(1)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need higher access to do this.")
end
end
return TRUE
end
function broadcast(pos)
if isActive == TRUE then
local message = messages[pos]
if message then
doBroadcastMessage(message, 21)
addEvent(broadcast, interval * 60 * 1000, pos + 1)
else
isActive = FALSE
end
end
end
I guess this is Colandus's script, so credits to him.
But I did fix it -- I don't want rep for this.
Last edited: