What's new

Welcome to the forum 👋, Visitor

To access the forum content and all our services, you need to register or log in to the forum. Becoming a member of the forum is completely free.

Framework
  1. ESX
  2. QBCORE
  3. VRP
  4. STANDALONE

Admin

Legend
Member
Enhance your FiveM server's driving experience with our toggle drift mode script.
Simply paste into the client file, restart the script, use Numpad 9 to activate drift mode, and hold Shift to trigger car drifting.



Code:
local kmh = 3.6
local mph = 2.23693629
local carspeed = 0
-----------------
--   E D I T   --
-----------------
local driftmode = true -- on/off drift
local speed = kmh -- mph olarakda ayarlanıla biliyor
local drift_speed_limit = 200.0  -- yanlama hızı
local toggle = 118 -- Numpad 9

Citizen.CreateThread(function()

    while true do

        Citizen.Wait(100)

        if IsControlJustPressed(1, 118) then

            driftmode = not driftmode

            if driftmode then
                exports['mythic_notify']:DoLongHudText('inform', 'Drift Modu Aktif ')
            else
                exports['mythic_notify']:DoLongHudText('error', 'Drift Modu Kapalı ')
            end
        end

        if driftmode then

            if IsPedInAnyVehicle(GetPed(), false) then

                CarSpeed = GetEntitySpeed(GetCar()) * speed

                if GetPedInVehicleSeat(GetCar(), -1) == GetPed() then

                    if CarSpeed <= drift_speed_limit then

                        if IsControlPressed(1, 21) then
      
                            SetVehicleReduceGrip(GetCar(), true)
      
                        else
      
                            SetVehicleReduceGrip(GetCar(), false)
      
                        end
                    end
                end
            end
        end
    end
end)
 
Last edited by a moderator:

Attention please!

Spam comments made to download the file in the subject are prohibited.

Spam comments will cause your account to be banned.

Theme customization

"From this menu, you can customize certain areas of the forum theme to your preference."

Choose the color that reflects your taste.

Wide / Narrow view

You can check a structure that allows you to use your theme in a wide or narrow view.

Grid view forum list

You can control the layout of the forum list in grid or regular listing style.

Image grid mode

You can control the structure that allows you to show or hide images in the grid forum list.

Close the sidebar

By closing the sidebar, you can have a wider view of the forum.

Fixed sidebar

By fixing the sidebar, you can make it more useful and ease your access.

Köşe kıvrımlarını kapat

Blokların köşelerinde bulunan kıvrımları kapatıp/açarak zevkinize göre kullanabilirsiniz.

Back