-- Retrieve the player ped
local playerPed = PlayerPedId()
-- Retrieve the vehicle the player is currently in.
local vehicle = GetVehiclePedIsIn(playerPed, false)
-- Check if the vehicle exists in the game world.
if vehicle == 0 then return end
-- Enable activating nitrous in the vehicle using the horn button.
SetVehicleUseHornButtonForNitrous(vehicle, true)