Что-то типа airbrake

spr1te

Потрачен
Автор темы
251
65
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Версия MoonLoader
.026-beta
как сделать airbrake/fly, я не понимаю какие функции надо использовать чтобы это написать.
 
Решение
Пытался, нихуя не выходит...

Lua:
--тактически спизжено с проджект кавер
require 'moonloader'
local airBrkCoords
local airbrk


function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
     while not isSampAvailable() do wait(100) end
    while true do wait(0)
        if wasKeyPressed(VK_1) then
            airbrk = not airbrk
            posX, posY, posZ = getCharCoordinates(playerPed)
            airBrkCoords = {posX, posY, posZ, 0.0, 0.0, getCharHeading(playerPed)}
        end
        if airbrk then
            if isCharInAnyCar(playerPed) then heading = getCarHeading(storeCarCharIsInNoSave(playerPed))
            else heading = getCharHeading(playerPed) end
            camCoordX, camCoordY...

Dmitriy Makarov

25.05.2021
Проверенный
2,478
1,113
тут чет про аирбрейк пишут в описании
попробуй покапаться в коде
 
  • Нравится
Реакции: spr1te

spr1te

Потрачен
Автор темы
251
65
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
тут чет про аирбрейк пишут в описании
попробуй покапаться в коде
Пытался, нихуя не выходит...
 

eenz

Известный
203
102
Пытался, нихуя не выходит...

Lua:
--тактически спизжено с проджект кавер
require 'moonloader'
local airBrkCoords
local airbrk


function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
     while not isSampAvailable() do wait(100) end
    while true do wait(0)
        if wasKeyPressed(VK_1) then
            airbrk = not airbrk
            posX, posY, posZ = getCharCoordinates(playerPed)
            airBrkCoords = {posX, posY, posZ, 0.0, 0.0, getCharHeading(playerPed)}
        end
        if airbrk then
            if isCharInAnyCar(playerPed) then heading = getCarHeading(storeCarCharIsInNoSave(playerPed))
            else heading = getCharHeading(playerPed) end
            camCoordX, camCoordY, camCoordZ = getActiveCameraCoordinates()
            targetCamX, targetCamY, targetCamZ = getActiveCameraPointAt()
            angle = getHeadingFromVector2d(targetCamX - camCoordX, targetCamY - camCoordY)
            if isCharInAnyCar(playerPed) then difference = 0.79 else difference = 1.0 end
            setCharCoordinates(playerPed, airBrkCoords[1], airBrkCoords[2], airBrkCoords[3] - difference)
            if isKeyDown(VK_W) then
                airBrkCoords[1] = airBrkCoords[1] + 0.5 * math.sin(-math.rad(angle))
                airBrkCoords[2] = airBrkCoords[2] + 0.5 * math.cos(-math.rad(angle))
                if not isCharInAnyCar(playerPed) then setCharHeading(playerPed, angle)
                else setCarHeading(storeCarCharIsInNoSave(playerPed), angle) end
            elseif isKeyDown(VK_S) then
                airBrkCoords[1] = airBrkCoords[1] - 0.5 * math.sin(-math.rad(heading))
                airBrkCoords[2] = airBrkCoords[2] - 0.5 * math.cos(-math.rad(heading))
            end
            if isKeyDown(VK_A) then
                airBrkCoords[1] = airBrkCoords[1] - 0.5 * math.sin(-math.rad(heading - 90))
                airBrkCoords[2] = airBrkCoords[2] - 0.5 * math.cos(-math.rad(heading - 90))
            elseif isKeyDown(VK_D) then
                airBrkCoords[1] = airBrkCoords[1] - 0.5 * math.sin(-math.rad(heading + 90))
                airBrkCoords[2] = airBrkCoords[2] - 0.5 * math.cos(-math.rad(heading + 90))
            end
            if isKeyDown(VK_LSHIFT) then airBrkCoords[3] = airBrkCoords[3] + 0.5 / 2.0 end
            if isKeyDown(VK_CONTROL) and airBrkCoords[3] > - 95.0 then airBrkCoords[3] = airBrkCoords[3] - 0.5 / 2.0 end
        end
    end
end
 
  • Нравится
Реакции: daite na_vodky и H1n9