General Exports

This page explains the available exports for the r_scba script and how to use them. These client-side exports allow you to interact programmatically with the SCBA system from other resources.


1. Exports Overview

1.1 Toggle SCBA

exports['r_scba']:ToggleSCBA()

Description: Toggles the SCBA system on or off. This includes equipping or removing the oxygen mask, managing pressure, and applying visual and audio effects.


1.2 Set SCBA Pressure

exports['r_scba']:SetSCBAPressure(pressure)

Description: Sets a custom pressure value to the SCBA system.

Parameters:

  • pressure: The pressure value you want to set.


1.3 Set Player Coughing State

exports['r_scba']:SetPlayerCough(bool)

Description: Allows you to enable or disable the coughing effect on a player.

Parameters:

  • bool: Set to true to bypass coughing (e.g., during noclip), false to re-enable.


1.4 Check if SCBA is Linked

Description: Returns whether the SCBA is currently linked and active.

Returns:

  • true: If the SCBA is linked (mask equipped).

  • false: If the SCBA is not active.


1.5 Get Current SCBA Pressure

Description: Returns the current pressure value of the SCBA.

Returns:

  • The current SCBA pressure level.


1.6 Check if Player is Coughing

Description: Checks if the player is currently coughing due to exposure (and other required conditions).

Returns:

  • true: If the player is affected by coughing.

  • false: Otherwise.


2. Example Usage

Here is a basic example of how to use the SCBA exports:

Last updated