После круга перестает работать скрипт

Oldbiz

Участник
Автор темы
48
2
Версия SA-MP
  1. Любая
После первого круга скрипт перестает работать, что делать?(сильно не хейтите, только начал писать))
 

Вложения

  • You won't die by Oldbiz.lua
    973 байт · Просмотры: 3

Savchik Blazer

Но я, мечту свою лелея...
Проверенный
671
293
вот попробуй
Lua:
require 'lib.moonloader'


function main()
    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
    sampAddChatMessage("{FF00FF}You won't die {FFFF00}by Oldbiz :)     {0000CB}активация /wdo", 0xFF2020)
    sampRegisterChatCommand("wdo", active)
    active = true
    while true do
    wait(0)
        health = getCharHealth(PLAYER_PED)
        if health < 20 and active then
            sampProcessChatInput("/usedrugs 3")
            wait(500)
            sampProcessChatInput("/anim 1")
            wait(750)
            setVirtualKeyDown(70, true)
            wait(750)
            setVirtualKeyDow(70,false)
        end
    end
end

function active()
    if active == true then
        active = false
        sampAddChatMessage("[{FF0000}you won't die{FFFFFF}] деактивирован.", -1)
    else
        active = true
        sampAddChatMessage("[{00FF00}you won't die{FFFFFF}] активирован.", -1)
    end
end
 

Oldbiz

Участник
Автор темы
48
2
вот попробуй
Lua:
require 'lib.moonloader'


function main()
    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
    sampAddChatMessage("{FF00FF}You won't die {FFFF00}by Oldbiz :)     {0000CB}активация /wdo", 0xFF2020)
    sampRegisterChatCommand("wdo", active)
    active = true
    while true do
    wait(0)
        health = getCharHealth(PLAYER_PED)
        if health < 20 and active then
            sampProcessChatInput("/usedrugs 3")
            wait(500)
            sampProcessChatInput("/anim 1")
            wait(750)
            setVirtualKeyDown(70, true)
            wait(750)
            setVirtualKeyDow(70,false)
        end
    end
end

function active()
    if active == true then
        active = false
        sampAddChatMessage("[{FF0000}you won't die{FFFFFF}] деактивирован.", -1)
    else
        active = true
        sampAddChatMessage("[{00FF00}you won't die{FFFFFF}] активирован.", -1)
    end
end
неа
 

Вложения

  • moonloader.log
    9.8 KB · Просмотры: 2