API
You can find many data extraction and update methods here to adapt to your other scripts.
Optimization solution for HUD's
You need to add your hud this event handlers
Client-side / Server-side
s4-breathalyser:onUpdate
It will give you two arguments, argument 1 is Alcohol and argument 2 is Narco data.
Example use
```lua
RegisterNetEvent('s4-breathalyser:onUpdate')
AddEventHandler('s4-breathalyser:onUpdate', function(Alcohol, Narco)
```
Exports
Whether the menu is open
exports["s4-breathalyser"].IsMenuOpen()
Returns the alcohol value in float data
exports["s4-breathalyser"].GetAlcohol()
Returns the narco value in float data
exports["s4-breathalyser"].GetNarco()
Should be used to add alcohol data
exports["s4-breathalyser"].UpdateAlcohol(value)
Should be used to add narco data
exports["s4-breathalyser"].UpdateNarco(value)
It removes alcohol and narcos from the player.
exports["s4-breathalyser"].ClearPlayer()
Returns alcohol data as a percentage
exports["s4-breathalyser"].GetAlcoholPercentage()
Returns narco data as a percentage
exports["s4-breathalyser"].GetNarcoPercentage()
Last updated