Неуязвимость в лавке

chomchik

Новичок
Автор темы
4
1
Версия SA-MP
  1. 0.3.7 (R1)
  2. 0.3.7-R2
  3. 0.3.7-R3
  4. Любая
Ищу способ как можно использовать анимацию id 248 на лаунчере аризоны. Либо другие способы с помощью которых можно стоять в лавке неуязвимым. То есть входить анимкой в текстуру лавки что бы по тебе не могли наносить урон.

Пробовал юзать такой код, но анимация не проигрывается.
Lua:
local samp = require 'lib.samp.events'
function main()
    while not isSampAvailable() do wait(0) end
        sampAddChatMessage('Sanim - Loaded',-1)
        sampRegisterChatCommand('sanim', commands)

end

function commands()
    sampSetSpecialAction(248)
end
 
Решение
Вот так. Чтобы убрать анимку - введи команду второй раз.
Lua:
script_author('SAsha133777')
function main()
    while not isSampAvailable() do wait(0) end
    sampAddChatMessage('Sanim - Loaded',-1)
    sampRegisterChatCommand('sanim', commands)
    wait(-1)
end

function commands()
    anim = not anim
    if anim then
        if not hasAnimationLoaded("CAR") then
            requestAnimation("CAR")
        end
        local heading = getCharHeading(PLAYER_PED)
        setCharHeading(PLAYER_PED, heading-180)
        taskPlayAnimNonInterruptable(PLAYER_PED, "FIXN_CAR_LOOP", "CAR", 4.0, false, false, false, true, -1)
    else
        clearCharTasksImmediately(PLAYER_PED)
    end
end

SAsha133777

Потрачен
128
109
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Вот так. Чтобы убрать анимку - введи команду второй раз.
Lua:
script_author('SAsha133777')
function main()
    while not isSampAvailable() do wait(0) end
    sampAddChatMessage('Sanim - Loaded',-1)
    sampRegisterChatCommand('sanim', commands)
    wait(-1)
end

function commands()
    anim = not anim
    if anim then
        if not hasAnimationLoaded("CAR") then
            requestAnimation("CAR")
        end
        local heading = getCharHeading(PLAYER_PED)
        setCharHeading(PLAYER_PED, heading-180)
        taskPlayAnimNonInterruptable(PLAYER_PED, "FIXN_CAR_LOOP", "CAR", 4.0, false, false, false, true, -1)
    else
        clearCharTasksImmediately(PLAYER_PED)
    end
end
 
Последнее редактирование:
  • Нравится
Реакции: chomchik