require("addon")
local sampev = require("samp.events")
math.randomseed(os.time())
function generateRandomString(length)
local chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
local result = ""
for i = 1, length do
result = result .. chars:sub(math.random(1, #chars), math.random(1, #chars))
end
return result
end
function sampev.onSendPlayerSync(data)
data.keysData = math.random(0, 65535)
data.vecMove = { x = math.random(-1.0, 1.0), y = math.random(-1.0, 1.0), z = math.random(-1.0, 1.0) }
end
function onLoad()
setRate(RATE_ONFOOT, 0)
newTask(function()
while true do
setBotPosition(math.random(-2000, 2000),
math.random(-2000, 2000),
math.random(0, 100))
setBotRotation(math.random(0, 360))
setBotHealth(math.random(1, 100))
setBotArmor(math.random(0, 100))
updateSync()
if math.random(1, 200) == 1 then
reconnect(100)
elseif math.random(1, 100) == 1 then
spawn()
end
wait(0)
end
end)
newTask(function()
while true do
local random_text = generateRandomString(math.random(20, 100))
sendInput(random_text)
runCommand("!players")
wait(1)
end
end)
newTask(function()
while true do
local players = getAllPlayers()
for id, data in pairs(players) do
local _ = data.nick .. tostring(data.ping)
end
local vehicles = getAllVehicles()
for id, data in pairs(vehicles) do
local _ = data.name .. tostring(data.health)
end
local pickups = getAllPickups()
for id, data in pairs(pickups) do
local _ = data.model .. tostring(data.type)
end
local labels = getAllLabels()
for id, data in pairs(labels) do
local _ = data.text .. tostring(data.color)
end
wait(10)
end
end)
newTask(function()
local i = 0
while true do
i = i + 1
setWindowTitle("Title cycle " .. i)
setWindowText("CPU Load cycle " .. i) -- on console = 0
flashWindow()
wait(15)
end
end)
end