local active = true
local id = nil
function main()
while not isSampAvailable() do wait(0) end
sampRegisterChatCommand('pfind', function(arg)
if active then --знаю что можно active = not active, но так придется прописывать арг даже для отключения
active = false
sampAddChatMessage('pfind off', -1)
else
if #arg ~= 0 then
id = tonumber(arg)
active = true
sampAddChatMessage('pfind on', -1)
end
end
end)
while true do
wait(1400)
if active then
sampSendChat('/find '..id)
end
end
end