|
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
script_name('mafia-tools') |
|
|
|
|
script_author("Serhiy_Rubin") |
|
|
|
|
script_version("29.01.2023") |
|
|
|
|
script_version("01.02.2023") |
|
|
|
|
|
|
|
|
|
sampev = require 'samp.events' |
|
|
|
|
inicfg = require "inicfg" |
|
|
|
@ -28,13 +28,6 @@ function main() |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
--[[ |
|
|
|
|
Синхронизация таймингов |
|
|
|
|
> Комната |
|
|
|
|
> Участники комнаты |
|
|
|
|
> Список блокировщика |
|
|
|
|
> Использовать список как: Черный/Белый |
|
|
|
|
]] |
|
|
|
|
-->> MENU DIALOG |
|
|
|
|
menu = {} |
|
|
|
|
menu.dialog = {} |
|
|
|
@ -857,29 +850,4 @@ utf8({ "print" }, "Utf8ToAnsi") |
|
|
|
|
utf8({ "renderGetFontDrawTextLength" }, "Utf8ToAnsi") |
|
|
|
|
utf8({ "renderFontDrawText" }, "Utf8ToAnsi") |
|
|
|
|
utf8({ "sampHasDialogRespond" }, nil, "AnsiToUtf8") |
|
|
|
|
utf8({ "sampev", "onServerMessage" }, "AnsiToUtf8", "Utf8ToAnsi") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
upd_testers = {} |
|
|
|
|
upd_testers.url = "https://git.deadpoo.net/rubin/mafia-tools/raw/branch/update/mafia-tools.lua" |
|
|
|
|
upd_testers.init = function() |
|
|
|
|
local command = (thisScript().name:gsub(" ", "").."-test"):lower() |
|
|
|
|
addChatMessage("Активна команда обновления скрипта: "..command) |
|
|
|
|
sampRegisterChatCommand(command, function() |
|
|
|
|
lua_thread.create(function() |
|
|
|
|
local fpath = os.tmpname() |
|
|
|
|
local result, text = pcall(openURL, upd_testers.url, fpath) |
|
|
|
|
if result and text ~= "" and text:find(thisScript().name:gsub("%-", "%%-")) then |
|
|
|
|
local file, error = io.open(thisScript().path, "w") |
|
|
|
|
if file ~= nil then |
|
|
|
|
file:write(text) |
|
|
|
|
file:flush() |
|
|
|
|
io.close(file) |
|
|
|
|
addChatMessage("Обновление завершено, скрипт перезагружен!") |
|
|
|
|
wait(500) |
|
|
|
|
thisScript():reload() |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end) |
|
|
|
|
end) |
|
|
|
|
end |
|
|
|
|
utf8({ "sampev", "onServerMessage" }, "AnsiToUtf8", "Utf8ToAnsi") |