trolloldu

Новичок
1
0
а не лучше вместо
Lua:
if isKeyJustPressed(VK_L) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then sampSendChat("/lock") end
  
     if isKeyJustPressed(VK_K) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then sampSendChat("/key") end

      if isKeyJustPressed(VK_P) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then sampSendChat("/phone") end

       if isKeyJustPressed(VK_1) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then sampSendChat("/usemed") end
      
        if isKeyJustPressed(VK_X) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then sampSendChat("/style") end

         if isKeyJustPressed(VK_9) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then sampSendChat("/mask") end

          if isKeyJustPressed(VK_0) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then sampSendChat("/balloon") end

         if isKeyJustPressed(VK_4) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then sampSendChat("/armour") end
 
        if isKeyJustPressed(VK_3) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then sampSendChat("/anim 3") end

делать так?
Lua:
require 'lib.moonloader'
local vk = require 'vkeys'

local binds = {
    {vk.VK_L, '/lock'},
    {vk.VK_K, '/key'},
    {vk.VK_P, '/phone'},
    {vk.VK_1, '/usemed'},
    {vk.VK_X, '/style'},
    {vk.VK_9, '/mask'},
    {vk.VK_0, '/balloon'},
    {vk.VK_4, '/armour'},
    
}

function main()
    while not isSampAvailable() do wait(0) end
   
    while true do
        wait(0)
        for i = 1, #binds do
            if wasKeyPressed(binds[i][1]) and not sampIsCursorActive() then sampSendChat(binds[i][2]) end
        end
    end
end
Слушай, а как в твоём коде сделать так, чтобы бинд был сочетанием клавиш, например, чтобы активация маски была сочетанием клавиш alt+9? В этом деле особо не силен. Буду запредельно благодарен любой помощи)
 

Жесос

Участник
114
1
как то пытался сделать под себя не вышло(((
помогите плис
 

Вложения

  • BarjBind.lua
    1.2 KB · Просмотры: 7

Arsik222

Новичок
3
0
Можешь пж скунуть отдельный файл где можно починить авто не правой кнопки мыши и клавиши P а с клавиши J, пожалуйста
 

timurozcan2

Участник
55
2
ребята я хочу на нампед 0 и нампед . сделать команды /settime 1 и /setweather 7. Но у меня пишет что неизвестная команда и что у вас нет доступа, как сделать чтобы скрипт не игнорил команды от других скриптов, а то он пищет эти команды серверу.
 

tiago1st

Новичок
8
0
а не лучше вместо
Lua:
if isKeyJustPressed(VK_L) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then sampSendChat("/lock") end
  
     if isKeyJustPressed(VK_K) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then sampSendChat("/key") end

      if isKeyJustPressed(VK_P) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then sampSendChat("/phone") end

       if isKeyJustPressed(VK_1) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then sampSendChat("/usemed") end
      
        if isKeyJustPressed(VK_X) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then sampSendChat("/style") end

         if isKeyJustPressed(VK_9) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then sampSendChat("/mask") end

          if isKeyJustPressed(VK_0) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then sampSendChat("/balloon") end

         if isKeyJustPressed(VK_4) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then sampSendChat("/armour") end
 
        if isKeyJustPressed(VK_3) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then sampSendChat("/anim 3") end

делать так?
Lua:
require 'lib.moonloader'
local vk = require 'vkeys'

local binds = {
    {vk.VK_L, '/lock'},
    {vk.VK_K, '/key'},
    {vk.VK_P, '/phone'},
    {vk.VK_1, '/usemed'},
    {vk.VK_X, '/style'},
    {vk.VK_9, '/mask'},
    {vk.VK_0, '/balloon'},
    {vk.VK_4, '/armour'},
    {vk.VK_3, '/anim 3'},
}

function main()
    while not isSampAvailable() do wait(0) end
   
    while true do
        wait(0)
        for i = 1, #binds do
            if wasKeyPressed(binds[i][1]) and not sampIsCursorActive() then sampSendChat(binds[i][2]) end
        end
    end
end
how to put alt + other key? ex: alt + p
 

Chopicks

Новичок
5
1
Подскажите как поставить бинд на кнопку Caps Lock в место 2.

if isKeyJustPressed(VK_2) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then sampSendChat("/opengate") end

(VK_2) - ?