SAMP/Юз аптечки

MixailScripts

Участник
83
6
Помогите найти юз аптечки по типу как нарко на x
https://www.blast.hk/threads/14068/ типо такого ток с аптечкой.Буду очень благодарен
1:
local key = 'vkeys'
local moonloader = require 'lib.moonloader'
local sampev = require 'samp.events'

function main()
    while not isSampAvailable() do wait(0) end
    sampAddChatMessage('Med Helper | Is Loaded!', -1)

    while true do
        wait(0)
        if wasKeyPressed(key.VK_X) then
            sampSendChat('') -- Сюда команду Аптечки.
        end
    end
end

Попробуй, это по нажатию кнопки будет юзаться аптечка, только в sampSendChat впиши команду.
 

Yakamytto EXE.

Новичок
Автор темы
10
0
1:
local key = 'vkeys'
local moonloader = require 'lib.moonloader'
local sampev = require 'samp.events'

function main()
    while not isSampAvailable() do wait(0) end
    sampAddChatMessage('Med Helper | Is Loaded!', -1)

    while true do
        wait(0)
        if wasKeyPressed(key.VK_X) then
            sampSendChat('') -- Сюда команду Аптечки.
        end
    end
end

Попробуй, это по нажатию кнопки будет юзаться аптечка, только в sampSendChat впиши команду.
пишу
1:
local key = 'vkeys'
local moonloader = require 'lib.moonloader'
local sampev = require 'samp.events'

function main()
    while not isSampAvailable() do wait(0) end
    sampAddChatMessage('Med Helper | Is Loaded!', -1)

    while true do
        wait(0)
        if wasKeyPressed(key.VK_X) then
            sampSendChat('/usemed') 
        end
    end
end
не работает
 
Последнее редактирование:

MixailScripts

Участник
83
6
пишу
1:
local key = 'vkeys'
local moonloader = require 'lib.moonloader'
local sampev = require 'samp.events'

function main()
    while not isSampAvailable() do wait(0) end
    sampAddChatMessage('Med Helper | Is Loaded!', -1)

    while true do
        wait(0)
        if wasKeyPressed(key.VK_X) then
            sampSendChat('/usemed') -- Сюда команду Аптечки.
        end
    end
end
не работает
Сори, моя вина.
Lua:
local key = 'vkeys'
local moonloader = require 'lib.moonloader'
local sampev = require 'samp.events'

function main()
    while not isSampAvailable() do wait(0) end
    sampAddChatMessage('Med Helper | Is Loaded!', -1)

    while true do
        wait(0)
        if wasKeyPressed(key.VK_X) then
            sampSendChat(/usemed) -- Сюда команду Аптечки.
        end
    end
end
Вот попробуй.
 

Yakamytto EXE.

Новичок
Автор темы
10
0
щас попробую

Сори, моя вина.
Lua:
local key = 'vkeys'
local moonloader = require 'lib.moonloader'
local sampev = require 'samp.events'

function main()
    while not isSampAvailable() do wait(0) end
    sampAddChatMessage('Med Helper | Is Loaded!', -1)

    while true do
        wait(0)
        if wasKeyPressed(key.VK_X) then
            sampSendChat(/usemed) -- Сюда команду Аптечки.
        end
    end
end
Вот попробуй.
Не знаю почему не работает создал файл .lua в игре пишет что Med Helper | Is Loaded!.Нажимаю на x ничего не происходит.Хотя все есть
 

MixailScripts

Участник
83
6
щас попробую


Не знаю почему не работает создал файл .lua в игре пишет что Med Helper | Is Loaded!.Нажимаю на x ничего не происходит.Хотя все есть
Lua:
local key = 'vkeys'
local moonloader = require 'lib.moonloader'
local sampev = require 'samp.events'

function main()
    while not isSampAvailable() do wait(0) end
    sampAddChatMessage('Med Helper | Is Loaded!', -1)

    while true do
        wait(0)
        if isKeyJustPressed(0x58) then
            sampSendChat('/usemed')
        end
    end
end

щас попробую


Не знаю почему не работает создал файл .lua в игре пишет что Med Helper | Is Loaded!.Нажимаю на x ничего не происходит.Хотя все есть
Вот
 

Yakamytto EXE.

Новичок
Автор темы
10
0
Lua:
local key = 'vkeys'
local moonloader = require 'lib.moonloader'
local sampev = require 'samp.events'

function main()
    while not isSampAvailable() do wait(0) end
    sampAddChatMessage('Med Helper | Is Loaded!', -1)

    while true do
        wait(0)
        if isKeyJustPressed(0x58) then
            sampSendChat('/usemed')
        end
    end
end


Вот
Заработало спасибо
 

Yakamytto EXE.

Новичок
Автор темы
10
0
Lua:
local key = 'vkeys'
local moonloader = require 'lib.moonloader'
local sampev = require 'samp.events'

function main()
    while not isSampAvailable() do wait(0) end
    sampAddChatMessage('Med Helper | Is Loaded!', -1)

    while true do
        wait(0)
        if isKeyJustPressed(0x58) then
            sampSendChat('/usemed')
        end
    end
end


Вот
А как зделать чтобы когда чат открыт не юзалась аптека
просто когда пишешь слово то юзаеться аптека
 

nightaiga

Известный
261
93
А как зделать чтобы когда чат открыт не юзалась аптека
Lua:
require "lib.moonloader"


function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
      while not isSampAvailable() do wait(100) end
      while true do wait(0)
        if isKeyJustPressed(VK_X) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() then
            sampSendChat("/usemed")
        end
    end 
end
 

Вложения

  • usemed.lua
    394 байт · Просмотры: 11

Я кавказец

Известный
440
106
А как зделать чтобы когда чат открыт не юзалась аптека
просто когда пишешь слово то юзаеться аптека
Lua:
local key = 'vkeys'
local moonloader = require 'lib.moonloader'
local sampev = require 'samp.events'

function main()
    while not isSampAvailable() do wait(0) end
    sampAddChatMessage('Med Helper | Is Loaded!', -1)

    while true do
        wait(0)
        if isKeyJustPressed(0x58) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() then
            sampSendChat('/usemed')
        end
    end
end
 

Impossible In Rage

Известный
955
247
Lua:
local key = 'vkeys'
local moonloader = require 'lib.moonloader'
local sampev = require 'samp.events'

function main()
    while not isSampAvailable() do wait(0) end
    sampAddChatMessage('Med Helper | Is Loaded!', -1)

    while true do
        wait(0)
        if isKeyJustPressed(0x58) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() then
            sampSendChat('/usemed')
        end
    end
end
почему не сделать проверку на активный курсор?