Как сделать чтобы при входе в самп в чат писалось сообщение? [CLEO]

SadAhr

Новичок
Автор темы
17
2
Как сделать чтобы при входе в самп в чат писалось сообщение?
Пример: МЗ Binder by Petya [cleo]
 
Последнее редактирование:

Gorskin

I shit on you
Проверенный
1,247
1,044
Как сделать чтобы при входе в самп в чат писалось сообщение?
Пример: МЗ Binder by Petya
Lua:
require "lib.moonloader"

function main()
  if not isSampLoaded() or not isSampfuncsLoaded() then return end
  while not isSampAvailable() do wait(3500) end
  sampAddChatMessage("{008000}[МЗ Binder] {FFFFFF}by {008000}Petya", -1)

  while true do -- бесконечный цикл
  wait(0)
  -- тут твой код (например если нажата клавиша Q то в чат напишет Q)
   if isKeyJustPressed(VK_Q) and not sampIsChatInputActive() and not sampIsDialogActive() and not sampIsScoreboardOpen() and not isSampfuncsConsoleActive() then
     sampSendChat("q")
    end
  end
end
 
  • Нравится
Реакции: SadAhr

SadAhr

Новичок
Автор темы
17
2
Lua:
require "lib.moonloader"

function main()
  if not isSampLoaded() or not isSampfuncsLoaded() then return end
  while not isSampAvailable() do wait(3500) end
  sampAddChatMessage("{008000}[МЗ Binder] {FFFFFF}by {008000}Petya", -1)

  while true do -- бесконечный цикл
  wait(0)
  -- тут твой код (например если нажата клавиша Q то в чат напишет Q)
   if isKeyJustPressed(VK_Q) and not sampIsChatInputActive() and not sampIsDialogActive() and not sampIsScoreboardOpen() and not isSampfuncsConsoleActive() then
     sampSendChat("q")
    end
  end
end
спасибо, а в клео это можно сделать?
 

neair=)

Участник
45
4
Lua:
require "lib.moonloader"

function main()
  if not isSampLoaded() or not isSampfuncsLoaded() then return end
  while not isSampAvailable() do wait(3500) end
  sampAddChatMessage("{008000}[МЗ Binder] {FFFFFF}by {008000}Petya", -1)

  while true do -- бесконечный цикл
  wait(0)
  -- тут твой код (например если нажата клавиша Q то в чат напишет Q)
   if isKeyJustPressed(VK_Q) and not sampIsChatInputActive() and not sampIsDialogActive() and not sampIsScoreboardOpen() and not isSampfuncsConsoleActive() then
     sampSendChat("q")
    end
  end
end
Подскажи, как добавить несколько строк чтобы писало?