Skip to content

GivePlayerBuff

Gives the player a buff of the game’s tables.

buff is a key of the buff list: the id, the name (well_rested, case-insensitive) or the GUID. The player’s client adds the game’s buff once; the record lasts until RemovePlayerBuff, the seconds given, HealPlayer or the respawn. seconds is the server’s own clock - 0 or none means no clock; the game’s own duration (the list’s duration column, in game minutes) may end a timed buff’s visible effect earlier, and the server does not re-apply it. false for an unknown key or a player not in the world.

GivePlayerBuff(pid, buff [, seconds])
Parameter Type
pid number the player
buff string | number the buff’s name, id or GUID
seconds number take it back after this long; 0 or none = keep it (optional)

boolean - true when given

-- the round's winner is well rested for two minutes
GivePlayerBuff(winner, "well_rested", 120)

RemovePlayerBuff · HasPlayerBuff · GetPlayerBuffs · GetBuffInfo · ClaimBuffClasses · the Buffs and the drink group of the index