_addMenu( menu )
_addOption( menu, option, function, parameter )
The argument in _addMenu( menu ) is a string.
here's an example:
self _addMenu( "Menu 1" );
Here's the function:
_addOption( menu, option, function, parameter )
menu = string (This is the menu you'd want to add the option to.)
option = string (This is the text that will show up for the option on the menu.)
function = function (The function executed when you click this option)
yds
parameter = Whatever you want it to be, you don't even need it. (it's an extra variable, only intermediate coders should use this.)
here's an example of me adding an "unlock all" function to "Menu 1":
self _addOption( "Menu 1", "Unlock All", ::doUnlock );
Okay, first you must create your sub menu! Let's do so:
self _addMenu( "Submenu 1" );
Now that we've created our sub menu, we can now add options to it!
self _addOption( "Submenu 1", "God Mode", ::infiniteHealth );
Okay, now that we've added options we can link it from "Menu 1"!
Use this template:
self _addOption( parent, sub, ::_openMenu, sub );
parent = string (menu that you're linking it from, in this case, "Menu 1")
sub = string (the name of the sub menu, yes both of them should be the same.)
::_openMenu = DON'T MESS WITH THAT PART. LEAVE IT.
Here's an example of how i'd use it:
self _addOption( "Menu 1", "Submenu 1", ::_openMenu, "Submenu 1" );
And tada! You have successfully added a sub menu.
Okay, for the player menu we are using a direct entity. This is how EliteMossy's and dconnor's menu works with players.
Use this template:
self _addOption( level.players[i].name, option, function, level.players[i] );
level.players[i].name = LEAVE THIS ALONE
level.players[i] = LEAVE THIS ALONE
option = string (option that'll come up on the menu)
function = function (this is the function that will be executed and the player will be directly
Okay, so here's an example of the kick function I used:
self _addOption( level.players[i].name, "Kick", ::kickPlayer, level.players[i] );
and here's the actual kick function:
kickPlayer( ent )
{
kick( ent getEntityNumber() );
}
in this case, level.players[i] is ent in the ::kickPlayer function.
Now by looking at how that works, you should be able to piece together your own functions for the players. remember to put it inside the for loop!



self _addMenu ("Weapons")
self _addMenu ("Weapons");
self _addMenu ("Weapons")
self _addMenu ("Weapons");
self _addMenu ("Weapons")
self _addMenu ("Weapons");
Copyright © 2026, NextGenUpdate.
All Rights Reserved.