local cmd = "/bag"
-------------------------------------------
local act = false
function main()
repeat wait(0) until isSampAvailable()
sampRegisterChatCommand("iflood", function()
act = not act
printStringNow(act and "iFlooder Enabled" or "iFlooder Disabled", 2000)
end)
while true do wait(0)
if act then
for _, handle in ipairs(getAllChars()) do
if doesCharExist(handle) then
local _, id = sampGetPlayerIdByCharHandle(handle)
if id ~= myid then
local pX, pY, pZ = getCharCoordinates(playerPed)
local oX, oY, oZ = getCharCoordinates(handle)
if getDistanceBetweenCoords3d(pX, pY, pZ, oX, oY, oZ) <= 5 then
sampSendChat(cmd.." "..id)
wait(1000)
end
end
end
end
end
end
end