Advertisement
N1E7R4V

Untitled

Dec 12th, 2016
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.31 KB | None | 0 0
  1. function UpDateTime()
  2. hour,minute=GetTime();
  3. SetServerDescription("Время: " .. hour ..":".. minute .. "\n" .. "Версия мода: " .. version .. "\n" .. "Режим: Role Play" .. "\n" .. "Локация: Хоринис");
  4.     local stime="";
  5.     if hour >22 or hour<6 then
  6.         stime="Ночь";
  7.     elseif hour>=6 and hour<13 then
  8.         stime="Утро";
  9.     elseif hour>=13 and hour<18 then
  10.         stime="День";
  11.     elseif hour>=18 and hour<=22 then
  12.         stime="Вечер";
  13.     end
  14.     if minute<10 then
  15.         UpdateDraw(clockg,6400, 7850,string.format("%s %d%s%d",stime,hour,":0",minute),"FONT_OLD_10_WHITE_HI.TGA",255,255,255);
  16.     else
  17.         UpdateDraw(clockg,6400, 7850,string.format("%s %d%s%d",stime,hour,":",minute),"FONT_OLD_10_WHITE_HI.TGA",255,255,255);
  18.     end
  19.         UpdateDraw(clockr,6400,7600,os.date("RT: %d/%m/%Y %X"),"FONT_OLD_10_WHITE_HI.TGA",255,255,255);
  20.        
  21.     --[[if hour==0 and (minute==0 or minute==1) then
  22.         if changing_day==0 then
  23.             changing_day=1;
  24.             SetTimer("DateUpdate",10000,0);
  25.         end
  26.     end]]
  27.     local maxp=GetMaxPlayers();
  28.     if maxp~=0 then
  29.         for i=0, maxp-1 do
  30.             --ShowDraw(i,dateg);
  31.             ShowDraw(i,clockg);
  32.             ShowDraw(i,clockr);
  33.             ShowTexture(i,clockback);
  34.         end
  35.     end
  36.     --SaveWorld();
  37.     --UpdateDraw(dateg,6400, 7850,string.format("%d %s %d",day,months[month],year),"FONT_OLD_10_WHITE_HI.TGA",255,255,255);
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement