require "lib.moonloader"
local inicfg = require 'inicfg'
local directIni = "moonloader//config//dd.ini"
local mainIni = inicfg.load(nil, directIni)
local stateIni = inicfg.save(mainIni, directIni)
local A = mainIni.sms.smsA
local B = mainIni.sms.smsB
local C = mainIni.sms.smsC
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
repeat wait(0) until isSampAvailable()
sampRegisterChatCommand("ABC", abc) --Основная команда
sampRegisterChatCommand("sd",function() sampAddChatMessage(A.." "..B.." "..C,-1) end) --проверка
while not isSampAvailable() do wait(100) end
while true do
wait(0)
end
end
function abc(arg)
if C == 3 and B ~= 2 and A ~= 1 then
C = arg
sampAddChatMessage("save: "..arg,-1)
end
if B == 2 and A ~= 1 then
B = arg
sampAddChatMessage("save: "..arg,-1)
end
if A == 1 then
A = arg
sampAddChatMessage("save: "..arg,-1)
end
end
--Как выглядит dd.ini
--[sms]
--smsA=1
--smsB=2
--smsC=3