M MY Multiplayer: Wiki
Side
Kind

onPlayerQueue

ServerEventCancellable

Fired when an account is about to join the queue of a full server. Cancelling the event refuses it.

addEventHandler("onPlayerQueue", root, function(string accountId, string name, string tag) … end)

Handler parameters

NameTypeDescription
accountIdstringThe MYMP account id, the same one setQueuePriority takes.
namestringThe account's name.
tagstringThe account's tag, the part after the #.

Source

The root element (root). The player does not exist yet.

When a seat frees up, it is held for 60 seconds for the first in line, and nobody joins ahead of the queue.

Example

local banned = { ["c3f1a2"] = true }

addEventHandler("onPlayerQueue", root, function(accountId, name, tag)
    if banned[accountId] then
        cancelEvent()
    end
end)

See also