local samp = require('samp.events')
local inicfg = require('inicfg')
local IniFileName = 'PayDay.ini'
ini = inicfg.load({
config = {
paydays = 0
}
}, IniFileName)
function main()
while not isSampAvailable() do wait(100) end
if not doesFileExist('moonloader/config/' .. IniFileName) then
inicfg.save(ini, IniFileName)
end
sampRegisterChatCommand('check', function()
printStringNow('PayDays: ' .. tostring(ini.config.paydays), 1500)
end)
end
function samp.onServerMessage(_, text)
if text:find('__________Банковский чек__________') then
ini.config.paydays = ini.config.paydays + 1
inicfg.save(ini, IniFileName)
end
end