• 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!

Uptime: 0 hours and 0 minutes.

Grehy

Killroy
Joined
Nov 21, 2008
Messages
2,631
Reaction score
33
Location
United States
I'm using close to the latest rev of 0.4, the !uptime command does not start counting uptime until the first time I use it. I haven't changed the script or any other settings that I would think would affect it. Does anyone know what is wrong?
 
Try to use this:
Code:
function onSay(cid, words, param, channel)
	local tmp = getWorldUpTime()
	local hours = math.ceil(tmp / 3600) - 1
	local minutes = math.ceil((tmp - (3600 * hours)) / 60)
	if(minutes == 60) then
		minutes = 0
		hours = hours + 1
	end

	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Uptime: " .. hours .. " hours and " .. minutes .. " minutes.")
	return true
end

It should work at my OT it works :D

Rep me please
 
Try to use this:
Code:
function onSay(cid, words, param, channel)
	local tmp = getWorldUpTime()
	local hours = math.ceil(tmp / 3600) - 1
	local minutes = math.ceil((tmp - (3600 * hours)) / 60)
	if(minutes == 60) then
		minutes = 0
		hours = hours + 1
	end

	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Uptime: " .. hours .. " hours and " .. minutes .. " minutes.")
	return true
end

It should work at my OT it works :D

Rep me please

That is the same one I use. I'm looking for actual technical solutions to this problem please
 
Back
Top