OnPlayerEmote
A player picked an emote; return false to refuse it.
A pick on the wheel or the point on T, asked after the server’s own checks passed (an emote of the server’s list, the
player in the world and alive, standing still on foot, no weapon out, not fighting) and before anything plays.
Returning false refuses it - nothing plays and the player is told nothing, so say why yourself; nothing, nil or
true lets it play. PlayPlayerEmote - a mode’s own command - does not come here.
Syntax
Section titled “Syntax”function OnPlayerEmote(pid, name) -- ...end| Parameter | Type | |
|---|---|---|
pid |
number | who picked it |
name |
string | the emote (“wave”, “dance” …) |
Returns
Section titled “Returns”false refuses the emote
Example
Section titled “Example”-- no dancing in the chapel zonefunction OnPlayerEmote(pid, name) if name == "dance" and IsPlayerInZone(pid, chapel) then ShowInfoText(pid, "Not in the chapel.") return false endendSee also
Section titled “See also”PlayPlayerEmote · GetPlayerEmote · the Emotes group of the index
