Включается сам по себе

shadow80962

Известный
Автор темы
127
13
Версия MoonLoader
.026-beta
Включается сам по себе AirBrake после запуска скрипта

Lua:
function main()

    AirBrake()
    while true do
        wait(0)
    end
    
end

Lua:
function AirBrake()
    local p = {x = 0, y = 0, z = 0}
    local pedX, pedY, pedZ = getCharCoordinates(PLAYER_PED)
    p.x, p.y, p.z = pedX, pedY, pedZ
    local speed = 0.3
    lua_thread.create(function()
        while true do
            wait(0)

                if wasKeyPressed(VK_RSHIFT) then
                    airbrake_settings.airbrake_state = not airbrake_settings.airbrake_state
                    local pedX, pedY, pedZ = getCharCoordinates(PLAYER_PED)
                    p.x, p.y, p.z = pedX, pedY, pedZ
                    printStyledString('~n~~n~~n~~n~~n~~n~~y~AIRBRAKE: '..(airbrake_settings.airbrake_state and '~g~ON' or '~r~OFF'), 1500, 5)
                end

                if airbrake_settings.airbrake_state then
                    if not sampIsCursorActive() then
                        -- SPEED EDITOR
                        local speedEdit = getMousewheelDelta()
                        if speedEdit ~= 0 then
                            if speed >= 0 then
                                speed = speed + speedEdit / 10
                                printStringNow('~y~AIRBRAKE: ~w~Speed = ~r~'..speed, 2000)
                            end
                        end
                        if speed < 0 then speed = 0 end

                        -- SET MOUSE HEADING
                        local cx, cy, _ = getActiveCameraCoordinates()
                        local px, py, _ = getActiveCameraPointAt()
                        local camDirection = math.atan2( (px-cx), (py-cy) ) * 180 / math.pi
                        if isCharInAnyCar(PLAYER_PED) then
                            setCarHeading(storeCarCharIsInNoSave(PLAYER_PED), - camDirection)
                        else
                            setCharHeading(PLAYER_PED, - camDirection)
                        end
                    
                        -- CONTROLS
                        if isKeyDown(VK_SPACE) then
                            p.z = p.z + speed / 2
                        end
                        if isKeyDown(VK_LSHIFT) and p.z > -95.0 then
                            p.z = p.z - speed / 2
                        end
                        if isKeyDown(VK_W) then
                            p.x = p.x + speed * math.sin(-math.rad(getCharHeading(PLAYER_PED)))
                            p.y = p.y + speed * math.cos(-math.rad(getCharHeading(PLAYER_PED)))
                        end
                        if isKeyDown(VK_S) then
                            p.x = p.x - speed * math.sin(-math.rad(getCharHeading(PLAYER_PED)))
                            p.y = p.y - speed * math.cos(-math.rad(getCharHeading(PLAYER_PED)))
                        end
                        if isKeyDown(VK_A) then
                            p.x = p.x - air_brk_getAngle(speed)[1]
                            p.y = p.y - air_brk_getAngle(speed)[2]
                        end
                        if isKeyDown(VK_D) then
                            p.x = p.x + air_brk_getAngle(speed)[1] 
                            p.y = p.y + air_brk_getAngle(speed)[2] 
                        end
                    end
                    setCharCoordinates(PLAYER_PED, p.x, p.y, p.z)
                end
        end
    end)
end
 

askfmaskfaosflas

Потрачен
1,089
511
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Эм.. Изучи lua, на ютубе есть уроки от thechampguess, а так:


Lua:
act = false

function main()
    sampRegisterChatCommand("abrake", function()
        act = not act
    end)
end

function airbrake()
    if act then
    
    end
end
 

Hideme Flow

Известный
558
193

shadow80962

Известный
Автор темы
127
13
шо у тебя airbrake_settings.airbrake_state
Состояние, включено/выключено

Lua:
local airbrake_settings =
{
    airbrake_state = new.bool(),
}

Эм.. Изучи lua, на ютубе есть уроки от thechampguess, а так:


Lua:
act = false

function main()
    sampRegisterChatCommand("abrake", function()
        act = not act
    end)
end

function airbrake()
    if act then
   
    end
end
У меня активация через кнопку