local screenshotTimer = nil
local isScreenshotActive = false
local fCommandText = "Пост: деньги, тёлки, тачки"
local delayBetweenCycles = 600000
function main()
sampRegisterChatCommand("fpost", function()
toggleScreenshotTimer()
end)
wait(-1)
end
function toggleScreenshotTimer()
if isScreenshotActive then
if screenshotTimer then
screenshotTimer:terminate()
screenshotTimer = nil
end
isScreenshotActive = false
else
screenshotTimer = lua_thread.create(function()
while true do
if isSampLoaded() then
sampSendChat("/r " .. fCommandText)
wait(2000)
sampSendChat("/time")
wait(1000)
require("ffi").cast("void (*__stdcall)()", sampGetBase() + 0x70FC0)()
end
wait(delayBetweenCycles)
end
end)
isScreenshotActive = true
end
end