Jump to content
Sign in to follow this  
Graf

Время сервера

Recommended Posts

Время сервера

Взято с архива. Scripts Made by Sultan

Этот скрипт позволяет вывести время хоста, на котором стоит сервер каждые N минут.

Для этого нужно зайти в Server/resource/script/functions.lua и в функцию cha_timer вставить:

if math.mod(now_tick, 360) == 0 and now_tick > 0 then	-- Каждые 5 минут
	local now_hour= os.date("%H")		
	local now_miniute= os.date("%M")	
	local now_scend=  os.date("%S")		
	now_hour= tonumber(now_hour)		-- Берем часы
	now_miniute= tonumber(now_miniute)	-- Берем минуты
	now_scend= tonumber(now_scend)		-- Берем секунды
	--Вывод в систему
	SystemNotice ( role, "Время сервера: "..now_hour..":"..now_miniute..":"..now_scend.."")
	--Или же вывести красными буквами на экране
	--BickerNotice ( role, "Время сервера: "..now_hour..":"..now_miniute..":"..now_scend.."")
	--Ну или в ГМ сообщения
	--GMNotice ( role, "Время сервера: "..now_hour..":"..now_miniute..":"..now_scend.."")
end

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...