Нужно найти плагин авто /re по жалобе

DEFFD3D9

Новичок
Автор темы
8
0
Ещё раз здравствуйте, нужен плагин который будет переходить в режим слежки за игроком по репорту, например игрок пишет в репорт ид игрока, нажимаешь клавишу и переходишь в слежку за ним
1610797577768.png
 
Решение
Lua:
local samp = require 'samp.events'
local repid = nil
function main()
    while true do
        wait(0)
        if isKeyJustPressed(113) --[[F2]] and tonumber(repid) and sampIsPlayerConnected(repid) then
            sampSendChat('/re '..repid)
        end
    end
end
function samp.onServerMessage(color, text)
    if text:find('%[Жалоба%] .+%[%d+%]: %{FFFFFF%}.+') then
        local report = text:match('%[Жалоба%] .+%[%d+%]: %{FFFFFF%}(.+)')
        local id = report:match('%d+')
        if id ~= nil and sampIsPlayerConnected(tonumber(id)) then repid = tonumber(id) end
    end
end
UPD: Не была подключена библиотека, исправил

CaJlaT

07.11.2024 14:55
Модератор
2,848
2,692
Lua:
local samp = require 'samp.events'
local repid = nil
function main()
    while true do
        wait(0)
        if isKeyJustPressed(113) --[[F2]] and tonumber(repid) and sampIsPlayerConnected(repid) then
            sampSendChat('/re '..repid)
        end
    end
end
function samp.onServerMessage(color, text)
    if text:find('%[Жалоба%] .+%[%d+%]: %{FFFFFF%}.+') then
        local report = text:match('%[Жалоба%] .+%[%d+%]: %{FFFFFF%}(.+)')
        local id = report:match('%d+')
        if id ~= nil and sampIsPlayerConnected(tonumber(id)) then repid = tonumber(id) end
    end
end
UPD: Не была подключена библиотека, исправил
 

Вложения

  • zdarova.lua
    601 байт · Просмотры: 5
Последнее редактирование:

DEFFD3D9

Новичок
Автор темы
8
0
Lua:
local repid = nil
function main()
    while true do
        wait(0)
        if isKeyJustPressed(113) --[[F2]] and tonumber(repid) and sampIsPlayerConnected(repid) then
            sampSendChat('/re '..repid)
        end
    end
end
function samp.onServerMessage(color, text)
    if text:find('%[Жалоба%] .+%[%d+%]: %{FFFFFF%}.+') then
        local report = text:match('%[Жалоба%] .+%[%d+%]: %{FFFFFF%}(.+)')
        local id = report:match('%d+')
        if id ~= nil and sampIsPlayerConnected(tonumber(id)) then repid = tonumber(id) end
    end
end
Не понимаю, но оно не работает)