Как сделать неактивацию в диалоге/чате

saryga

Участник
Автор темы
84
5
FastStop:
local vk = require 'vkeys'

function main()
    if not
    repeat wait(0) until isSampAvailable()
    while true do wait(0)
        if isCharInAnyCar(PLAYER_PED) then
            if isKeyJustPressed(vk.VK_C) then
                setCarForwardSpeed(storeCarCharIsInNoSave(PLAYER_PED), 0)
            end
        end
    end
end
Нужно что бы скрипт не срабатывал пока открыт чат или диалог, а то когда пишешь и нажимаешь кнопу скрипт активируется и останавливает машину, не очень удобно, заранее благодарен
 

Savchik Blazer

Но я, мечту свою лелея...
Проверенный
671
293
Lua:
local vk = require 'vkeys'

function main()
    if not
    repeat wait(0) until isSampAvailable()
    while true do wait(0)
        if isCharInAnyCar(PLAYER_PED) then
            if isKeyJustPressed(vk.VK_C) and not sampIsChatInputActive() and not isSampfuncsConsoleActive() then
                setCarForwardSpeed(storeCarCharIsInNoSave(PLAYER_PED), 0)
            end
        end
    end
end
 

saryga

Участник
Автор темы
84
5
Lua:
local vk = require 'vkeys'

function main()
    if not
    repeat wait(0) until isSampAvailable()
    while true do wait(0)
        if isCharInAnyCar(PLAYER_PED) then
            if isKeyJustPressed(vk.VK_C) and not sampIsChatInputActive() and not isSampfuncsConsoleActive() then
                setCarForwardSpeed(storeCarCharIsInNoSave(PLAYER_PED), 0)
            end
        end
    end
end
Пасибо папаша, надеюсь подвал не украдут?

Lua:
local vk = require 'vkeys'

function main()
    if not
    repeat wait(0) until isSampAvailable()
    while true do wait(0)
        if isCharInAnyCar(PLAYER_PED) then
            if isKeyJustPressed(vk.VK_C) and not sampIsChatInputActive() and not isSampfuncsConsoleActive() then
                setCarForwardSpeed(storeCarCharIsInNoSave(PLAYER_PED), 0)
            end
        end
    end
end
неробит
 

saryga

Участник
Автор темы
84
5
cделай проверку на курсор
у меня теперь фонтавесоме крашится

[ML] (error) faststop.lua: D:\Games\ARIZONA GAMES\bin\Arizona\moonloader\faststop.lua:5: unexpected symbol near 'repeat'[ML] (error) faststop.lua: Script died due to an error. (23E1EA44)

Lua:
local vk = require 'vkeys'

function main()
    if not
    repeat wait(0) until isSampAvailable()
    while true do wait(0)
        if isCharInAnyCar(PLAYER_PED) then
            if isKeyJustPressed(vk.VK_C) and not sampIsChatInputActive() and not isSampfuncsConsoleActive() then
                setCarForwardSpeed(storeCarCharIsInNoSave(PLAYER_PED), 0)
            end
        end
    end
end
unexpected symbol near 'repeat'
 
Последнее редактирование:

AMDark

Известный
40
12
у меня теперь фонтавесоме крашится

[ML] (error) faststop.lua: D:\Games\ARIZONA GAMES\bin\Arizona\moonloader\faststop.lua:5: unexpected symbol near 'repeat'[ML] (error) faststop.lua: Script died due to an error. (23E1EA44)


unexpected symbol near 'repeat'
Lua:
local vk = require 'vkeys'

function main()
    if false then
    repeat
    wait(0)
    until isSampAvailable()
    while true do wait(0)
        if isCharInAnyCar(PLAYER_PED) then
            if isKeyJustPressed(vk.VK_C) and not sampIsChatInputActive() and not isSampfuncsConsoleActive() then
                setCarForwardSpeed(storeCarCharIsInNoSave(PLAYER_PED), 0)
            end
        end
    end
end
end