Seatbelt and Harness

Envi-Hud can handle all seatbelt and harness related functionality. You're welcome to use a different system if you wish, however if you prefer to use our hud for these features then you can follow the information in the tab for your framework to remove seatbelt and harness conflicts between our hud and the seatbelt scripts that come with that framework by default. If you prefer to use a different system to control seatbelts and harnesses then you can disable the seatbelt system in the Envi-Hud config file by setting Config.Seatbelt.enabled to false. If you do this and you would still like the seatbelt status to show in our hud then you'll need to reference our Exports to be able to set the seatbelt status and harness level for your vehicles.

If using qbx_seatbelt

  1. Delete the qbx_seatbelt script


If you need a HasHarness export

  1. Navigate to envi-hud/client/client_open.lua

  2. Add the following code to the very bottom of this file:

exports('HasHarness', function()
    if not Store.Vehicle then
        return false
    end

    local isHarnessInstalled = exports['envi-hud']:GetHarnessLevel(Store.Vehicle) > 0
    if not isHarnessInstalled then
        return false
    end

    return exports['envi-hud']:GetSeatbeltStatus()
end)
  1. Update any resources you have that need to know about the vehicle harness to now use

    exports['envi-hud']:HasHarness()

Last updated