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.
Syntax
Section titled “Syntax”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) |
Returns
Section titled “Returns”boolean - true when given
Example
Section titled “Example”-- the round's winner is well rested for two minutesGivePlayerBuff(winner, "well_rested", 120)See also
Section titled “See also”RemovePlayerBuff · HasPlayerBuff · GetPlayerBuffs · GetBuffInfo · ClaimBuffClasses · the Buffs and the drink group of the index
