GetPlayerAlcohol
The player’s blood-alcohol level, 0 to 1.
Each drink adds its alcohol content × [combat] alcohol_per_content; time takes [combat] alcohol_decay off per second.
Drunk from [combat] drunk_threshold up, sober again from half of it down (OnPlayerDrunk).
Syntax
Section titled “Syntax”GetPlayerAlcohol(pid)| Parameter | Type | |
|---|---|---|
pid |
number | the player |
Returns
Section titled “Returns”number - 0 .. 1
Example
Section titled “Example”if GetPlayerAlcohol(pid) > 0.2 then SendClientMessage(pid, COLOUR_SERVER, "Steady on.") endSee also
Section titled “See also”IsPlayerDrunk · SetPlayerAlcohol · OnPlayerDrunk · the Buffs and the drink group of the index
