OnPartyInvite
A player wants to invite another; return false to refuse.
Fires from InviteToParty before the toast goes out, after the server’s own checks (the target free, the party not
full, no invitation pending). The place for the mode’s rule: leader-only invitations, a level gate, a cooldown. Without
the callback every invitation the server admits goes through.
Syntax
Section titled “Syntax”function OnPartyInvite(from, target) -- ...end| Parameter | Type | |
|---|---|---|
from |
number | the inviter |
target |
number | the player invited |
Returns
Section titled “Returns”false refuses the invitation (InviteToParty returns false, "refused"); anything else lets it through
Example
Section titled “Example”function OnPartyInvite(from, target) -- leader-only: a member who does not lead may not invite local party = GetPlayerParty(from) if party and GetPartyLeader(party) ~= from then return false end SendClientMessage(target, COLOUR_SERVER, GetPlayerName(from) .. " invites you to a party - /accept or /decline.")endSee also
Section titled “See also”InviteToParty · OnPartyInviteResponse · the Parties group of the index
