Skip to content

OnPlayerDrunk

The player got drunk, or sobered up.

true when the blood-alcohol level crossed [combat] drunk_threshold upwards (the game’s drunkenness is on, the others see the body sway); false when it fell back under half of it (the hangover follows for [combat] hangover_seconds).

function OnPlayerDrunk(pid, drunk)
-- ...
end
Parameter Type
pid number the player
drunk boolean true = drunk now, false = sober again

nothing

function OnPlayerDrunk(pid, drunk)
SendClientMessageToAll(COLOUR_SERVER, GetPlayerName(pid) .. (drunk and " has had one too many" or " is sober again"))
end

GetPlayerAlcohol · IsPlayerDrunk · SetPlayerAlcohol · the Buffs and the drink group of the index