Skip to content

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.

function OnPlayerEmote(pid, name)
-- ...
end
Parameter Type
pid number who picked it
name string the emote (“wave”, “dance” …)

false refuses the emote

-- no dancing in the chapel zone
function OnPlayerEmote(pid, name)
if name == "dance" and IsPlayerInZone(pid, chapel) then
ShowInfoText(pid, "Not in the chapel.")
return false
end
end

PlayPlayerEmote · GetPlayerEmote · the Emotes group of the index