function main()
repeat wait(0) until isSampAvailable()
sampRegisterChatCommand("arm", function()
act = not act
sampAddChatMessage(act and "ON" or "OFF", -1)
end
while true do wait(0)
if act then
for id = 0, sampGetMaxPlayerId() do
if sampIsPlayerConnected(id) then
sampSendChat("/pm "..id.." text")
wait(1000)
end
end
end
end
end
-- сорри за табуляцию