красивый выход из игры

ZaeJ

Участник
Автор темы
35
1
Версия SA-MP
  1. 0.3.7 (R1)
Хай, родные! Подкиньте код на мунлоадер для выхода из игры.
Хочу выходить из игры с красивыми отыгровками.



Lua:
function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end -- проверяем, загружен ли SAMP и SAMPFUNCS
    while not isSampAvailable() do wait(100) end -- проверяем инициализацию структур SAMP
    sampRegisterChatCommand("/q", example) -- регистрируем команду с функцией example
    wait(-1)
end

function example()
    sampSendChat("/me надел шапку-невидимку от Adidas.")
    lua_thread.create(function()
    wait(0)
    end)
    sampSendChat("ваще похуй")
    lua_thread.create(function()
        wait(1000)
    end)
    sampSendChat("/q")
end

И вот что получается в игре:
unknown.png
 

Morse

Потрачен
436
70
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Lua:
function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(80) end

    sampRegisterChatCommand('bq', function()
        lua_thread.create(function()
            sampSendChat('/me надел шапку-невидимку от Adidas.')
            wait(111)
            sampSendChat('ваще похуй')
            wait(1000)
            sampProcessChatInput('/q')
        end)
    end)

    while true do
        wait(0)
    end
end
 

VRush

https://t.me/vrushscript
2,415
1,209
Lua:
function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(80) end

    sampRegisterChatCommand('bq', function()
        lua_thread.create(function()
            sampSendChat('/me надел шапку-невидимку от Adidas.')
            wait(111)
            sampSendChat('ваще похуй')
            wait(1000)
            sampProcessChatInput('/q')
        end)
    end)

    while true do
        wait(0)
    end
end
как сделать чтобы писало "Освобождаю слот #*и тут мой ИД*" ??
 
  • Ха-ха
Реакции: Lance_Sterling

VRush

https://t.me/vrushscript
2,415
1,209
Lua:
sampSendChat('Освобождаю слот #'..select(2, sampGetPlayerIdByCharHandle(PLAYER_PED)))
Вот так?:
function main()

    if not isSampLoaded() or not isSampfuncsLoaded() then return end

    while not isSampAvailable() do wait(80) end



    sampRegisterChatCommand('bq', function()

        lua_thread.create(function()

            sampSendChat('/do [Инвиз BY Pavlov] Активирован')

            wait(111)

            sampSendChat('Освобождаю слот #'..select(2, sampGetPlayerIdByCharHandle(PLAYER_PED)))

            wait(1000)

            sampProcessChatInput('/q')

        end)

    end)



    while true do

        wait(0)

    end

end
 
  • Bug
Реакции: Lance_Sterling