помогите отключить скрипт

masyanyavogg

Новичок
Автор темы
3
0
Lua:
local act = false
act = "]"
function main()
    while not isSampAvailable() do wait(100) end
    sampAddChatMessage("{FFFF00}[KeySpoof]{FFFFFF} (/time) {FFFFFF}был загружен. Активация: "..act, -1)
    while true do wait(0)
      
        if act then
            if sampIsChatInputActive() then
                text = sampGetChatInputText()
                textLength = string.len(text)
                print(textLength)
                if textLength == 1 and text ~= "/" then
                    sampSetChatInputText("/")
                elseif textLength == 2 and text ~= "/t" then
                    sampSetChatInputText("/t")
                elseif textLength == 3 and text ~= "/ti" then
                    sampSetChatInputText("/ti")
                elseif textLength == 4 and text ~= "/tim" then
                    sampSetChatInputText("/tim")
                elseif textLength == 5 and text ~= "/time" then
                    lua_thread.create(function()
                        sampSetChatInputText("/time")
                        wait(100)
                        sampProcessChatInput("/time")
                    end)
                elseif textLength > 5 and text ~= "/time" then
                    sampSetChatInputText("/time")
                end
            end
        end
    end
end
Когда активирую (На ]) Все работает но потом отключить не могу можете дописать функцию что бы его отключать к примеру на [

уп
 
Последнее редактирование:
  • Эм
Реакции: qdIbp
Решение
так?
Lua:
local act = true
function main()
    while not isSampAvailable() do wait(100) end
        sampAddChatMessage("{FFFF00}[KeySpoof]{FFFFFF} (/time) {FFFFFF}был загружен. Активация: "..tostring(act), -1)
    while true do wait(0)
        if wasKeyPressed( 80 ) then --P(з)
            act = not act
            sampAddChatMessage(tostring(act),-1)
        end
        if act then
            if sampIsChatInputActive() then
                text = sampGetChatInputText()
                textLength = string.len(text)
                print(textLength)
                if textLength == 1 and text ~= "/" then
                    sampSetChatInputText("/")
                elseif textLength == 2 and text ~= "/t" then...

qdIbp

Автор темы
Проверенный
1,444
1,186
так?
Lua:
local act = true
function main()
    while not isSampAvailable() do wait(100) end
        sampAddChatMessage("{FFFF00}[KeySpoof]{FFFFFF} (/time) {FFFFFF}был загружен. Активация: "..tostring(act), -1)
    while true do wait(0)
        if wasKeyPressed( 80 ) then --P(з)
            act = not act
            sampAddChatMessage(tostring(act),-1)
        end
        if act then
            if sampIsChatInputActive() then
                text = sampGetChatInputText()
                textLength = string.len(text)
                print(textLength)
                if textLength == 1 and text ~= "/" then
                    sampSetChatInputText("/")
                elseif textLength == 2 and text ~= "/t" then
                    sampSetChatInputText("/t")
                elseif textLength == 3 and text ~= "/ti" then
                    sampSetChatInputText("/ti")
                elseif textLength == 4 and text ~= "/tim" then
                    sampSetChatInputText("/tim")
                elseif textLength == 5 and text ~= "/time" then
                    sampSetChatInputText("/time")
                    wait(100)
                    sampProcessChatInput("/time")
                elseif textLength > 5 and text ~= "/time" then
                    sampSetChatInputText("/time")
                end
            end
        end
    end
end

только там на англ p реагирует
 
  • Влюблен
Реакции: KOHTOP

masyanyavogg

Новичок
Автор темы
3
0
так?
Lua:
local act = true
function main()
    while not isSampAvailable() do wait(100) end
        sampAddChatMessage("{FFFF00}[KeySpoof]{FFFFFF} (/time) {FFFFFF}был загружен. Активация: "..tostring(act), -1)
    while true do wait(0)
        if wasKeyPressed( 80 ) then --P(з)
            act = not act
            sampAddChatMessage(tostring(act),-1)
        end
        if act then
            if sampIsChatInputActive() then
                text = sampGetChatInputText()
                textLength = string.len(text)
                print(textLength)
                if textLength == 1 and text ~= "/" then
                    sampSetChatInputText("/")
                elseif textLength == 2 and text ~= "/t" then
                    sampSetChatInputText("/t")
                elseif textLength == 3 and text ~= "/ti" then
                    sampSetChatInputText("/ti")
                elseif textLength == 4 and text ~= "/tim" then
                    sampSetChatInputText("/tim")
                elseif textLength == 5 and text ~= "/time" then
                    sampSetChatInputText("/time")
                    wait(100)
                    sampProcessChatInput("/time")
                elseif textLength > 5 and text ~= "/time" then
                    sampSetChatInputText("/time")
                end
            end
        end
    end
end

только там на англ p реагирует
ща чекну если работает то поставлю галочку