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
| Name | Type | Description |
|---|---|---|
| accountId | string | The MYMP account id, the same one setQueuePriority takes. |
| name | string | The account's name. |
| tag | string | The 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)