Как сделать "UPDATE RECON"?

boy next door

Участник
Автор темы
208
18
Версия MoonLoader
.026-beta
Привет.
Как сделать такой же скрипт, что показан на скрине?
QUX-i70d-yU.jpg
 

.KOHTOP.

Активный
226
35
На сервере отсутствует данная команда. Можно ли как-то сделать так, чтобы она была под lua?
Lua:
local spec = false
local recon_id = -1
local sampev = require 'lib.samp.events'

function main()
    while not isSampAvailable() do wait(0) end
    
    while true do
        wait(0)
        if spec then
            wait(5000)
            sampSendChat('/re '..recon_id)
        end
    end
end

function sampev.onSendCommand(text)
    if text:find('/re (%d+)') then
        recon_id = text:match('/re (%d+)')
        spec = true
    elseif text:find('/reoff') then
        recon_id = -1
        spec = false
    end
end

P.S Радуйся, тебе сам разработчик Arizona Tools попытался помочь
 
  • Нравится
Реакции: boy next door

Rice.

Известный
Модератор
1,731
1,589
Lua:
local spec = false
local recon_id = -1
local sampev = require 'lib.samp.events'

function main()
    while not isSampAvailable() do wait(0) end
   
    while true do
        wait(0)
        if spec then
            wait(5000)
            sampSendChat('/re '..recon_id)
        end
    end
end

function sampev.onSendCommand(text)
    if text:find('/re (%d+)') then
        recon_id = text:match('/re (%d+)')
        spec = true
    elseif text:find('/reoff') then
        recon_id = -1
        spec = false
    end
end

P.S Радуйся, тебе сам разработчик Arizona Tools попытался помочь
каждые 5 секунд твой код будет полностью зависать, юзай потоки