• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Request] Timer to GM¨s

mpa

Member
Joined
Oct 8, 2008
Messages
319
Reaction score
13
Location
Sweden
I want a "timer" for gm's.

Example:
!timer "Clean -- would broadcast "Cleaning floor in 10 minutes. -> Cleaning floor in 5 minutes -> .. in 30 sec etc.

!timer "Save -- Server Save in 15 minutes.

And when the timer is ready the GM's will recieve a message "Execute the clean command now." or something like that.
 
This wont work. I don't get any errors. But it won't broadcast.

Code:
function onSay(cid, words, param)
	if param ~= nil then
		if isNumber(param) == TRUE then

		else
			doPlayerSendCancel(cid, "Command param must be an integer.")
		end
	else
		local count = broadcastMessage()
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Collected " .. count .. " items.")
	end
end

function broadcastMessage(minutes, cid)
	if minutes == 0 then
		local count = broadcastMessage()
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cleaned " .. count .. " items.")
		broadcastMessage("Game map cleaned.")
	else
		local message = ""
		if minutes == 1 then
			message = "Game map cleaning in " .. minutes .. " minute, please pick up all your items."
		else
			message = "Game map cleaning in " .. minutes .. " minutes."
		end
		broadcastMessage(message)
		addEvent(prepareClean, 60000, minutes - 1, cid)
	end
end
 
Last edited:
Back
Top