скрипт вписывающий все id (/kick 0-999)

Пьяный Русский

Активный
Автор темы
148
31
Версия SA-MP
  1. 0.3.7 (R1)
Крч, не могли бы вы скинуть скрипт который выполняет определенную команду на выбранные Id (от нуля к тысячи, например), давно нуждаюсь, на нашем сервере нужно заказывать людей, а мне не хочется по одному Id вписывать.
 

MaksQ

Известный
967
816
Lua:
function main()
  while not isSampAvailable() do wait(100) end
    lua_thread.create(mda)
    sampRegisterChatCommand("go", function() gg = not gg if gg then printString('~g~ Kick ON', 3000) else printString('~r~ Kick OFF', 3000) end end)
    while true do
        wait(0)

    end
end

function mda()
    while true do wait(0)
        for i = 1, 1000 do
            if gg then sampSendChat("/kick "..i) end
            wait(200)
        end
    end
end

активация /go
 

CaJlaT

Овощ
Модератор
2,806
2,608
Должно работать
Lua:
function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end
    sampRegisterChatCommand("flood", function(arg)
        lua_thread.create(function()
            if #arg == 0 or arg == nil then
                sampAddChatMessage('Используйте /flood [cmd] [from] [to]')
                return
            end
            local cmd, from, to = arg:match('(.-) (%d+) (%d+)')
            if not from then
                sampAddChatMessage('Используйте /flood [cmd] [from] [to]')
                return
            end
            if not to then to = sampGetMaxPlayerId(false) end
            for i=from, to do
                sampSendChat('/'..cmd..' '..i)
                wait(1000) -- 1 секунда
            end
        end)
    end)
    while true do
        wait(0)
    end
end
 

Пьяный Русский

Активный
Автор темы
148
31
Должно работать
Lua:
function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end
    sampRegisterChatCommand("flood", function(arg)
        lua_thread.create(function()
            if #arg == 0 or arg == nil then
                sampAddChatMessage('Используйте /flood [cmd] [from] [to]')
                return
            end
            local cmd, from, to = arg:match('(.-) (%d+) (%d+)')
            if not from then
                sampAddChatMessage('Используйте /flood [cmd] [from] [to]')
                return
            end
            if not to then to = sampGetMaxPlayerId(false) end
            for i=from, to do
                sampSendChat('/'..cmd..' '..i)
                wait(1000) -- 1 секунда
            end
        end)
    end)
    while true do
        wait(0)
    end
end
А можешь скинуть его как файл? Ото чето я сам сохранил и у меня вылетает с причиной 0x0000000
 
  • Bug
Реакции: MaksQ

kizn

О КУ)))
Всефорумный модератор
2,405
2,057

Вложения

  • allkick.lua
    875 байт · Просмотры: 10