Авто сигарета arz

Решение
Если меньше 80хп = закуривает сигару
Lua:
local smoke = false

function main()
    while not isSampAvailable() do wait(100) end
    sampRegisterChatCommand('asmoke', asmoke)
     while true do
        wait(0)      
        local health = getCharHealth(PLAYER_PED)
        if smoke then
            if health < 80 then
                wait(1337)
                sampSendChat("/smoke")
            end
        end
    end
end

function asmoke()
smoke = not smoke
    if smoke then
        printStringNow('~g~on', 1500)
    else
        printStringNow('~r~off', 1500)
    end
end

barjik

Известный
464
190
Если меньше 80хп = закуривает сигару
Lua:
local smoke = false

function main()
    while not isSampAvailable() do wait(100) end
    sampRegisterChatCommand('asmoke', asmoke)
     while true do
        wait(0)      
        local health = getCharHealth(PLAYER_PED)
        if smoke then
            if health < 80 then
                wait(1337)
                sampSendChat("/smoke")
            end
        end
    end
end

function asmoke()
smoke = not smoke
    if smoke then
        printStringNow('~g~on', 1500)
    else
        printStringNow('~r~off', 1500)
    end
end
 

Вложения

  • asmoke.lua
    470 байт · Просмотры: 94
  • Нравится
  • Вау
Реакции: reag1let и Памперс

feelzyourertry

Участник
163
10
Если меньше 80хп = закуривает сигару
Lua:
local smoke = false

function main()
    while not isSampAvailable() do wait(100) end
    sampRegisterChatCommand('asmoke', asmoke)
     while true do
        wait(0)     
        local health = getCharHealth(PLAYER_PED)
        if smoke then
            if health < 80 then
                wait(1337)
                sampSendChat("/smoke")
            end
        end
    end
end

function asmoke()
smoke = not smoke
    if smoke then
        printStringNow('~g~on', 1500)
    else
        printStringNow('~r~off', 1500)
    end
end
сделай меньше 20
 

Tomato

Активный
386
86
сделай меньше 20

Lua:
local smoke = false

function main()
    while not isSampAvailable() do wait(100) end
    sampRegisterChatCommand('asmoke', asmoke)
     while true do
        wait(0)     
        local health = getCharHealth(PLAYER_PED)
        if smoke then
            if health < 20 then
                wait(1337)
                sampSendChat("/smoke")
            end
        end
    end
end

function asmoke()
smoke = not smoke
    if smoke then
        printStringNow('~g~on', 1500)
    else
        printStringNow('~r~off', 1500)
    end
end