Ищу серверное время самп для все серверах

Статус
В этой теме нельзя размещать новые ответы.
Решение
хуета не работает деактивация
забыл добавить удаление текстдрава
Lua:
require "lib.moonloader"
local huy = require("samp.events")
local piska = 0
local penis = false


local oX = 250
local oY = 430


function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end
    sampRegisterChatCommand('servtime', function()
    penis = not penis if not penis then
        sampTextdrawDelete(221)
        sampTextdrawDelete(222)
        end
  end)
 
while true do
    wait(0)
    if penis then
        sampTextdrawCreate(221, "Server_time:", oX, oY)
        sampTextdrawSetLetterSizeAndColor(221, 0.3, 1.7, 0xFFe1e1e1)
        sampTextdrawSetOutlineColor(221, 0.5, 0xFF000000)...

zakatov

zkt-team
Проверенный
1,725
570
Lua:
require "lib.moonloader"
local huy = require("samp.events")
local piska = 0
local penis = false


local oX = 250
local oY = 430


function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end
    sampRegisterChatCommand('servtime', function()
    penis = not penis
  end)
 
  while true do
        sampTextdrawCreate(221, "Server_time:", oX, oY)
        sampTextdrawSetLetterSizeAndColor(221, 0.3, 1.7, 0xFFe1e1e1)
        sampTextdrawSetOutlineColor(221, 0.5, 0xFF000000)
        sampTextdrawSetAlign(221, 1)
        sampTextdrawSetStyle(221, 2)
        timer = os.time() + piska
        sampTextdrawCreate(222, os.date("%H:%M:%S", timer), oX + 90, oY)
        sampTextdrawSetLetterSizeAndColor(222, 0.3, 1.7, 0xFFff6347)
        sampTextdrawSetOutlineColor(222, 0.5, 0xFF000000)
        sampTextdrawSetAlign(222, 1)
        sampTextdrawSetStyle(222, 2)
        wait(500)
    end
end

function huy.onShowDialog(dialogId,style,title,button1,button2,text)
    if string.match(text, "Текущее время") then
        chislo, mesyac, god = string.match(text, "Сегодняшняя дата:     {2EA42E}(%d+):(%d+):(%d+)")
        chas, minuti, sekundi = string.match(text, "Текущее время:     {345690}(%d+):(%d+):(%d+)")
        datetime = {year = god,month = mesyac,day = chislo,hour = chas,min = minuti,sec = sekundi}
        piska = tostring(os.time(datetime)) - os.time()
    end
end

/servtime
 

brosko

Новичок
19
8
Lua:
require "lib.moonloader"
local huy = require("samp.events")
local piska = 0
local penis = false


local oX = 250
local oY = 430


function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end
    sampRegisterChatCommand('servtime', function()
    penis = not penis
  end)
 
  while true do
        sampTextdrawCreate(221, "Server_time:", oX, oY)
        sampTextdrawSetLetterSizeAndColor(221, 0.3, 1.7, 0xFFe1e1e1)
        sampTextdrawSetOutlineColor(221, 0.5, 0xFF000000)
        sampTextdrawSetAlign(221, 1)
        sampTextdrawSetStyle(221, 2)
        timer = os.time() + piska
        sampTextdrawCreate(222, os.date("%H:%M:%S", timer), oX + 90, oY)
        sampTextdrawSetLetterSizeAndColor(222, 0.3, 1.7, 0xFFff6347)
        sampTextdrawSetOutlineColor(222, 0.5, 0xFF000000)
        sampTextdrawSetAlign(222, 1)
        sampTextdrawSetStyle(222, 2)
        wait(500)
    end
end

function huy.onShowDialog(dialogId,style,title,button1,button2,text)
    if string.match(text, "Текущее время") then
        chislo, mesyac, god = string.match(text, "Сегодняшняя дата:     {2EA42E}(%d+):(%d+):(%d+)")
        chas, minuti, sekundi = string.match(text, "Текущее время:     {345690}(%d+):(%d+):(%d+)")
        datetime = {year = god,month = mesyac,day = chislo,hour = chas,min = minuti,sec = sekundi}
        piska = tostring(os.time(datetime)) - os.time()
    end
end

/servtime
Шикарно:
local huy = require("samp.events")
local piska = 0
local penis = false

Это шикарно)
 
  • Нравится
Реакции: zakatov

Господин аладинов

Участник
Автор темы
31
1
Lua:
require "lib.moonloader"
local huy = require("samp.events")
local piska = 0
local penis = false


local oX = 250
local oY = 430


function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end
    sampRegisterChatCommand('servtime', function()
    penis = not penis
  end)
 
  while true do
        sampTextdrawCreate(221, "Server_time:", oX, oY)
        sampTextdrawSetLetterSizeAndColor(221, 0.3, 1.7, 0xFFe1e1e1)
        sampTextdrawSetOutlineColor(221, 0.5, 0xFF000000)
        sampTextdrawSetAlign(221, 1)
        sampTextdrawSetStyle(221, 2)
        timer = os.time() + piska
        sampTextdrawCreate(222, os.date("%H:%M:%S", timer), oX + 90, oY)
        sampTextdrawSetLetterSizeAndColor(222, 0.3, 1.7, 0xFFff6347)
        sampTextdrawSetOutlineColor(222, 0.5, 0xFF000000)
        sampTextdrawSetAlign(222, 1)
        sampTextdrawSetStyle(222, 2)
        wait(500)
    end
end

function huy.onShowDialog(dialogId,style,title,button1,button2,text)
    if string.match(text, "Текущее время") then
        chislo, mesyac, god = string.match(text, "Сегодняшняя дата:     {2EA42E}(%d+):(%d+):(%d+)")
        chas, minuti, sekundi = string.match(text, "Текущее время:     {345690}(%d+):(%d+):(%d+)")
        datetime = {year = god,month = mesyac,day = chislo,hour = chas,min = minuti,sec = sekundi}
        piska = tostring(os.time(datetime)) - os.time()
    end
end

/servtime
хуета не работает деактивация
 

zakatov

zkt-team
Проверенный
1,725
570
хуета не работает деактивация
забыл добавить удаление текстдрава
Lua:
require "lib.moonloader"
local huy = require("samp.events")
local piska = 0
local penis = false


local oX = 250
local oY = 430


function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end
    sampRegisterChatCommand('servtime', function()
    penis = not penis if not penis then
        sampTextdrawDelete(221)
        sampTextdrawDelete(222)
        end
  end)
 
while true do
    wait(0)
    if penis then
        sampTextdrawCreate(221, "Server_time:", oX, oY)
        sampTextdrawSetLetterSizeAndColor(221, 0.3, 1.7, 0xFFe1e1e1)
        sampTextdrawSetOutlineColor(221, 0.5, 0xFF000000)
        sampTextdrawSetAlign(221, 1)
        sampTextdrawSetStyle(221, 2)
        timer = os.time() + piska
        sampTextdrawCreate(222, os.date("%H:%M:%S", timer), oX + 90, oY)
        sampTextdrawSetLetterSizeAndColor(222, 0.3, 1.7, 0xFFff6347)
        sampTextdrawSetOutlineColor(222, 0.5, 0xFF000000)
        sampTextdrawSetAlign(222, 1)
        sampTextdrawSetStyle(222, 2)
        wait(500)
        end
    end
end

function huy.onShowDialog(dialogId,style,title,button1,button2,text)
    if string.match(text, "Текущее время") and penis then
        chislo, mesyac, god = string.match(text, "Сегодняшняя дата:     {2EA42E}(%d+):(%d+):(%d+)")
        chas, minuti, sekundi = string.match(text, "Текущее время:     {345690}(%d+):(%d+):(%d+)")
        datetime = {year = god,month = mesyac,day = chislo,hour = chas,min = minuti,sec = sekundi}
        piska = tostring(os.time(datetime)) - os.time()
    end
end
 
  • Нравится
Реакции: MLycoris
Статус
В этой теме нельзя размещать новые ответы.