включение и выключение

Статус
В этой теме нельзя размещать новые ответы.

enyag

Известный
Автор темы
345
12
как сделать, что бы скрипт работал до его выключения
 
Решение
/gotest
Скрипт будет спамить в чат сообщение пока повторно не ввести команду /gotest

Lua:
function main()
while not isSampAvailable() do wait(100) end
 sampRegisterChatCommand("gotest", test)
  while true do wait(0)
   if state then
    sampAddChatMessage("SPAM SPAM SPAM SPAM SPAM",-1)
   end
  end
end

function test()
state = not state
 if state then
   printStyledString("ENABLE", 3000, 7)
   else
   printStyledString("OFF", 3000, 7)
 end
end

lemonager

;)
Всефорумный модератор
809
1,701
/gotest
Скрипт будет спамить в чат сообщение пока повторно не ввести команду /gotest

Lua:
function main()
while not isSampAvailable() do wait(100) end
 sampRegisterChatCommand("gotest", test)
  while true do wait(0)
   if state then
    sampAddChatMessage("SPAM SPAM SPAM SPAM SPAM",-1)
   end
  end
end

function test()
state = not state
 if state then
   printStyledString("ENABLE", 3000, 7)
   else
   printStyledString("OFF", 3000, 7)
 end
end
 
Статус
В этой теме нельзя размещать новые ответы.