EndDiceMatch
Ends a running dice match, with a winner or without one.
The winner takes both stakes; without one the match is called off and each player gets theirs back. Both games end
too. OnDiceMatchEnd hears it with the reason "the mode".
Syntax
Section titled “Syntax”EndDiceMatch(id, winner)| Parameter | Type | |
|---|---|---|
id |
number | the match |
winner |
number | one of its two players, or nil to call it off |
Returns
Section titled “Returns”boolean - false when the match is over already
Example
Section titled “Example”-- /dice quit: the one who quits loseslocal info = GetDiceMatchInfo(GetPlayerDiceMatch(pid) or 0)if info then EndDiceMatch(info.id, info.challenger == pid and info.opponent or info.challenger) endSee also
Section titled “See also”StartDiceMatch · OnDiceMatchEnd · the Dice group of the index
