ClaimBuffClasses
Names the buff classes the server takes over from the game.
With a class claimed, a buff of that class a player’s game applies by itself - a potion drunk, a poison, the game’s own
drunkenness - is undone on their client within a second unless the server gave it (GivePlayerBuff). The way a mode keeps
the game’s own potions from opening a hole in the server-owned health: with Potion claimed, a potion only works through the
server’s consumption path. The class names are the pages of the buff list -
Potion, Poison, Alcohol, Hangover, Unconsciousness, Plague …; an unknown one is logged and ignored. The whole
list replaces the previous one and goes to every client; {} claims nothing. Nothing is claimed by default.
Syntax
Section titled “Syntax”ClaimBuffClasses(classes)| Parameter | Type | |
|---|---|---|
classes |
table | a list of class names |
Returns
Section titled “Returns”nothing
Example
Section titled “Example”function OnGameModeInit() ClaimBuffClasses({"Potion", "Poison", "Alcohol", "Hangover"})endSee also
Section titled “See also”GetClaimedBuffClasses · GivePlayerBuff · OnPlayerUseItem · the Buffs and the drink group of the index
