|
|
|
@ -4413,12 +4413,12 @@ script_update = { |
|
|
|
|
if text ~= "" and not string.find(text, thisScript().version) then |
|
|
|
|
addChatMessage( string.format("Âûøëà íîâàÿ âåðñèÿ '%s'. Òåêóùàÿ: '%s'", text, thisScript().version) ) |
|
|
|
|
if ini[name].auto_update then |
|
|
|
|
addChatMessage( string.format("Àâòî-Îáíîâëåíèå ñêðèïòà âêëþ÷åíî. Ïðîöåññ çàïóùåí!") ) |
|
|
|
|
addChatMessage( string.format("Àâòîîáíîâëåíèå ñêðèïòà âêëþ÷åíî. Ïðîöåññ çàïóùåí!") ) |
|
|
|
|
script_update.command() |
|
|
|
|
else |
|
|
|
|
local command = (thisScript().name:gsub(" ", "").."-update"):lower() |
|
|
|
|
sampRegisterChatCommand(command, script_update.command) |
|
|
|
|
addChatMessage( string.format("Àâòî-Îáíîâëåíèå ñêðèïòà âûêëþ÷åíî. Îáíîâèòü ñàìîìó: /%s", command) ) |
|
|
|
|
addChatMessage( string.format("Àâòîîáíîâëåíèå ñêðèïòà âûêëþ÷åíî. Îáíîâèòü ñàìîìó: /%s", command) ) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
@ -4506,7 +4506,7 @@ script_update = { |
|
|
|
|
script_update.menu2.dialog = {} |
|
|
|
|
local ini = inicfg.load({}, script_update.address_ini) |
|
|
|
|
local k = data.script_name |
|
|
|
|
script_update.menu2.text[#script_update.menu2.text+1] = string.format("Àâòî îáíîâëåíèå %s", (ini[k].auto_update and "{59fc30}ON" or "{ff0000}OFF")) |
|
|
|
|
script_update.menu2.text[#script_update.menu2.text+1] = string.format("Àâòîîáíîâëåíèå %s", (ini[k].auto_update and "{59fc30}ON" or "{ff0000}OFF")) |
|
|
|
|
script_update.menu2.dialog[#script_update.menu2.dialog+1] = function() |
|
|
|
|
ini[k].auto_update = not ini[k].auto_update |
|
|
|
|
inicfg.save(ini, script_update.address_ini) |
|
|
|
|