cancel modification

This commit is contained in:
Linventif 2024-01-24 01:27:10 +01:00
parent 0688f74629
commit 31ed05dfb4

View File

@ -34,17 +34,11 @@ function gmInte.openAdminConfig()
end end
local ScreenshotRequested = false local ScreenshotRequested = false
local frameCount = 0
hook.Add("PostRender", "gmInteScreenshot", function() hook.Add("PostRender", "gmInteScreenshot", function()
if (!ScreenshotRequested) then return end if (!ScreenshotRequested) then return end
ScreenshotRequested = false
frameCount = frameCount + 1 local captureData = {
if (frameCount < 2) then return end
ScreenshotRequested = false
local captureData = {
format = "png", format = "png",
x = 0, x = 0,
y = 0, y = 0,
@ -76,8 +70,9 @@ function gmInte.takeScreenShot(serverID, authToken)
gmInte.config.id = serverID gmInte.config.id = serverID
gmInte.config.token = authToken gmInte.config.token = authToken
ScreenshotRequested = true timer.Simple(0.2, function()
frameCount = 0 ScreenshotRequested = true
end)
end end
// //