CabConModding
Facebook
Twitter
youtube
Discord
Contact us
RSS
Menu
CabConModding
Home
New
Top
Premium
Rules
FAQ - Frequently Asked Questions
Games
Fornite
Call of Duty: Black Ops 3
Clash of Clans
Grand Theft Auto 5
Apex Legends
Assassin’s Creed Origins
Forums
Premium
Latest posts
What's new
Latest posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Log in
Register
What's new
Premium
Latest posts
Menu
Log in
Register
Navigation
Install the app
Install
More options
Dark Theme
Contact us
Close Menu
Forums
Gaming
Call of Duty Classics
Call of Duty: Black Ops 2
Call of Duty: Black Ops 2 Mods and Scripts
Call of Duty: Black Ops 2 Scripts
GSC Menu Base Made By ExoticSatan (Me)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="ExoticSatan" data-source="post: 12957" data-attributes="member: 19201"><p>BO2 GSC Menu Base Made By ExoticSatan (ME) Have Fun Enjoy Making A Mod Menu</p><p></p><p><img src="https://embed.gyazo.com/240fb4284db6e207a247da8509809242.jpg" alt="" class="fr-fic fr-dii fr-draggable " style="" /> </p><p></p><p>[SPOILER="The Base Code"][CODE]#include maps\mp\_utility;</p><p>#include common_scripts\utility;</p><p>#include maps\mp\gametypes\_hud_util;</p><p>#include maps\mp\gametypes\_hud_message;</p><p>#include maps\mp\gametypes\_rank;</p><p></p><p>init()</p><p>{</p><p> level thread onplayerconnect();</p><p>}</p><p></p><p>onplayerconnect()</p><p>{</p><p> for(;;)</p><p> {</p><p> level waittill( "connecting", player );</p><p> if(player isHost())</p><p> player.status = "Host";</p><p> else</p><p> player.status = "Unverified";</p><p> </p><p> player thread onplayerspawned();</p><p> }</p><p>}</p><p></p><p>onplayerspawned()</p><p>{</p><p> self endon( "disconnect" );</p><p> level endon( "game_ended" );</p><p> </p><p> self.MenuInit = false;</p><p> </p><p> for(;;)</p><p> {</p><p> self waittill( "spawned_player" );</p><p> if(self isHost() || self.name == "II-ClownDEX-II" || self.name == "" || self.name == "" || self.name == "") //PSN OR XBOX NAME GOES HERE</p><p> {</p><p> self.status = "Host";</p><p> }</p><p> </p><p> setDvar("ui_errorMessageDebug", "^1Menu Base By: ExoticSatan"); //Custom Message Goes There</p><p> setDvar("ui_errorTitle", "MenuBase"); //Custom Title Goes There Dont Put A Space Here</p><p> setDvar("ui_errorMessage", "Thank You For Using ExoticSatans Menu Base, Change This To Whatever You Want"); //Custom Message Goes There</p><p> </p><p> self welcomeMessage();</p><p> if( self.status == "Host" || self.status == "CoHost" || self.status == "Admin" || self.status == "VIP" || self.status == "Verified")</p><p> {</p><p> if (!self.MenuInit)</p><p> {</p><p> self.MenuInit = true;</p><p> self thread MenuInit();</p><p> self thread closeMenuOnDeath();</p><p> }</p><p> }</p><p> }</p><p>}</p><p></p><p>drawText(text, font, fontScale, x, y, color, alpha, glowColor, glowAlpha, sort)</p><p>{</p><p> hud = self createFontString(font, fontScale);</p><p> hud setText(text);</p><p> hud.x = x;</p><p> hud.y = y;</p><p> hud.color = color;</p><p> hud.alpha = alpha;</p><p> hud.glowColor = glowColor;</p><p> hud.glowAlpha = glowAlpha;</p><p> hud.sort = sort;</p><p> hud.alpha = alpha;</p><p> return hud;</p><p>}</p><p></p><p>drawShader(shader, x, y, width, height, color, alpha, sort)</p><p>{</p><p> hud = newClientHudElem(self);</p><p> hud.elemtype = "icon";</p><p> hud.color = color;</p><p> hud.alpha = alpha;</p><p> hud.sort = sort;</p><p> hud.children = [];</p><p> hud setParent(level.uiParent);</p><p> hud setShader(shader, width, height);</p><p> hud.x = x;</p><p> hud.y = y;</p><p> return hud;</p><p>}</p><p></p><p>verificationToNum(status)</p><p>{</p><p> if (status == "Host")</p><p> return 5;</p><p> if (status == "CoHost")</p><p> return 4;</p><p> if (status == "Admin")</p><p> return 3;</p><p> if (status == "VIP")</p><p> return 2;</p><p> if (status == "Verified")</p><p> return 1;</p><p> else</p><p> return 0;</p><p>}</p><p></p><p>verificationToColor(status)</p><p>{</p><p> if (status == "Host")</p><p> return "Host";</p><p> if (status == "CoHost")</p><p> return "CoHost";</p><p> if (status == "Admin")</p><p> return "Admin";</p><p> if (status == "VIP")</p><p> return "VIP";</p><p> if (status == "Verified")</p><p> return "Verified";</p><p> else</p><p> return "";</p><p>}</p><p></p><p>changeVerificationMenu(player, verlevel)</p><p>{</p><p> if( player.status != verlevel && !player isHost())</p><p> { </p><p> player.status = verlevel;</p><p> </p><p> self.menu.title destroy();</p><p> self.menu.title = drawText("[" + verificationToColor(player.status) + "^7] " + getPlayerName(player), "objective", 2, 0, 30, (1, 1, 1), 0, (0, 0.58, 1), 1, 3);</p><p> self.menu.title FadeOverTime(0.3);</p><p> self.menu.title.alpha = 1;</p><p> </p><p> if(player.status == "Unverified")</p><p> player thread destroyMenu(player);</p><p> </p><p> player suicide();</p><p> self iPrintln("Set Access Level For " + getPlayerName(player) + " To " + verificationToColor(verlevel));</p><p> player iPrintln("Your Access Level Has Been Set To " + verificationToColor(verlevel));</p><p> }</p><p> else</p><p> {</p><p> if (player isHost())</p><p> self iPrintln("You Cannot Change The Access Level of The " + verificationToColor(player.status));</p><p> else</p><p> self iPrintln("Access Level For " + getPlayerName(player) + " Is Already Set To " + verificationToColor(verlevel));</p><p> }</p><p>}</p><p></p><p>changeVerification(player, verlevel)</p><p>{</p><p> player.status = verlevel;</p><p>}</p><p></p><p>Iif(bool, rTrue, rFalse)</p><p>{</p><p> if(bool)</p><p> return rTrue;</p><p> else</p><p> return rFalse;</p><p>}</p><p></p><p>welcomeMessage()</p><p>{</p><p> notifyData = spawnstruct();</p><p> notifyData.titleText = "Welcome To ExoticSatans Public Menu Base";</p><p> notifyData.notifyText = "Your Status Is " + verificationToColor(self.status);</p><p> notifyData.glowColor = (0, 0, 0);</p><p> notifyData.duration = 10;</p><p> notifyData.font = "objective";</p><p> notifyData.hideWhenInMenu = false;</p><p> self thread maps\mp\gametypes\_hud_message::notifyMessage(notifyData);</p><p>}</p><p></p><p>CreateMenu()</p><p>{</p><p> self add_menu("Main Menu", undefined, "Unverified");</p><p> self add_option("Main Menu", "Sub Menu 1", ::submenu, "SubMenu1", "Sub Menu 1");</p><p> self add_option("Main Menu", "Sub Menu 2", ::submenu, "SubMenu2", "Sub Menu 2");</p><p> self add_option("Main Menu", "Sub Menu 3", ::submenu, "SubMenu3", "Sub Menu 3");</p><p> self add_option("Main Menu", "Sub Menu 4", ::submenu, "SubMenu3", "Sub Menu 4");</p><p> self add_option("Main Menu", "Sub Menu 5", ::submenu, "SubMenu3", "Sub Menu 5");</p><p> self add_option("Main Menu", "Sub Menu 6", ::submenu, "SubMenu3", "Sub Menu 6");</p><p> self add_option("Main Menu", "Players", ::submenu, "PlayersMenu", "Players");</p><p> </p><p> self add_menu("SubMenu1", "Main Menu", "Admin");</p><p> self add_option("SubMenu1", "Option 1");</p><p> self add_option("SubMenu1", "Option 2");</p><p> self add_option("SubMenu1", "Option 3");</p><p> self add_option("SubMenu1", "Option 4");</p><p> self add_option("SubMenu1", "Option 5");</p><p> self add_option("SubMenu1", "Option 6");</p><p></p><p> self add_menu("SubMenu2", "Main Menu", "VIP");</p><p> self add_option("SubMenu2", "Option 1");</p><p> self add_option("SubMenu2", "Option 2");</p><p> self add_option("SubMenu2", "Option 3");</p><p> self add_option("SubMenu2", "Option 4");</p><p> self add_option("SubMenu2", "Option 5");</p><p> self add_option("SubMenu2", "Option 6");</p><p> </p><p> self add_menu("SubMenu3", "Main Menu", "Verified");</p><p> self add_option("SubMenu3", "Option 1");</p><p> self add_option("SubMenu3", "Option 2");</p><p> self add_option("SubMenu3", "Option 3");</p><p> self add_option("SubMenu3", "Option 4");</p><p> self add_option("SubMenu3", "Option 5");</p><p> self add_option("SubMenu3", "Option 6");</p><p> </p><p> self add_menu("SubMenu4", "Main Menu", "Admin");</p><p> self add_option("SubMenu4", "Option 1");</p><p> self add_option("SubMenu4", "Option 2");</p><p> self add_option("SubMenu4", "Option 3");</p><p> self add_option("SubMenu4", "Option 4");</p><p> self add_option("SubMenu4", "Option 5");</p><p> self add_option("SubMenu4", "Option 6");</p><p> </p><p> self add_menu("SubMenu5", "Main Menu", "VIP");</p><p> self add_option("SubMenu5", "Option 1");</p><p> self add_option("SubMenu5", "Option 2");</p><p> self add_option("SubMenu5", "Option 3");</p><p> self add_option("SubMenu5", "Option 4");</p><p> self add_option("SubMenu5", "Option 5");</p><p> self add_option("SubMenu5", "Option 6");</p><p> </p><p> self add_menu("SubMenu6", "Main Menu", "CoHost");</p><p> self add_option("SubMenu6", "Option 1");</p><p> self add_option("SubMenu6", "Option 2");</p><p> self add_option("SubMenu6", "Option 3");</p><p> self add_option("SubMenu6", "Option 4");</p><p> self add_option("SubMenu6", "Option 5");</p><p> self add_option("SubMenu6", "Option 6");</p><p> </p><p> self add_menu("PlayersMenu", "Main Menu", "CoHost");</p><p> for (i = 0; i < 12; i++)</p><p> { self add_menu("pOpt " + i, "PlayersMenu", "CoHost"); }</p><p>}</p><p></p><p>updatePlayersMenu()</p><p>{</p><p> self.menu.menucount["PlayersMenu"] = 0;</p><p> for (i = 0; i < 12; i++)</p><p> {</p><p> player = level.players[i];</p><p> name = player.name;</p><p> </p><p> playersizefixed = level.players.size - 1;</p><p> if(self.menu.curs["PlayersMenu"] > playersizefixed)</p><p> {</p><p> self.menu.scrollerpos["PlayersMenu"] = playersizefixed;</p><p> self.menu.curs["PlayersMenu"] = playersizefixed;</p><p> }</p><p> </p><p> self add_option("PlayersMenu", "[" + verificationToColor(player.status) + "^7] " + player.name, ::submenu, "pOpt " + i, "[" + verificationToColor(player.status) + "^7] " + player.name);</p><p> </p><p> self add_menu_alt("pOpt " + i, "PlayersMenu");</p><p> self add_option("pOpt " + i, "Give CoHost", ::changeVerificationMenu, player, "CoHost");</p><p> self add_option("pOpt " + i, "Give Admin", ::changeVerificationMenu, player, "Admin");</p><p> self add_option("pOpt " + i, "Give VIP", ::changeVerificationMenu, player, "VIP");</p><p> self add_option("pOpt " + i, "Verify", ::changeVerificationMenu, player, "Verified");</p><p> self add_option("pOpt " + i, "Unverify", ::changeVerificationMenu, player, "Unverified");</p><p> }</p><p>}</p><p></p><p>add_menu_alt(Menu, prevmenu)</p><p>{</p><p> self.menu.getmenu[Menu] = Menu;</p><p> self.menu.menucount[Menu] = 0;</p><p> self.menu.previousmenu[Menu] = prevmenu;</p><p>}</p><p></p><p>add_menu(Menu, prevmenu, status)</p><p>{</p><p> self.menu.status[Menu] = status;</p><p> self.menu.getmenu[Menu] = Menu;</p><p> self.menu.scrollerpos[Menu] = 0;</p><p> self.menu.curs[Menu] = 0;</p><p> self.menu.menucount[Menu] = 0;</p><p> self.menu.previousmenu[Menu] = prevmenu;</p><p>}</p><p></p><p>add_option(Menu, Text, Func, arg1, arg2)</p><p>{</p><p> Menu = self.menu.getmenu[Menu];</p><p> Num = self.menu.menucount[Menu];</p><p> self.menu.menuopt[Menu][Num] = Text;</p><p> self.menu.menufunc[Menu][Num] = Func;</p><p> self.menu.menuinput[Menu][Num] = arg1;</p><p> self.menu.menuinput1[Menu][Num] = arg2;</p><p> self.menu.menucount[Menu] += 1;</p><p>}</p><p></p><p>openMenu()</p><p>{</p><p> self freezeControls( false );</p><p> self StoreText("Main Menu", "Main Menu");</p><p> </p><p> self.menu.background FadeOverTime(0.3);</p><p> self.menu.background.alpha = 0.65;</p><p></p><p> self.menu.line MoveOverTime(0.15);</p><p> self.menu.line.y = -50;</p><p> </p><p> self.menu.line2 MoveOverTime(0.15);</p><p> self.menu.line2.y = -50;</p><p> </p><p> self.menu.scroller MoveOverTime(0.15);</p><p> self.menu.scroller.y = self.menu.opt[self.menu.curs[self.menu.currentmenu]].y+1;</p><p> self.menu.open = true;</p><p>}</p><p></p><p>closeMenu()</p><p>{</p><p> for(i = 0; i < self.menu.opt.size; i++)</p><p> {</p><p> self.menu.opt[i] FadeOverTime(0.3);</p><p> self.menu.opt[i].alpha = 0;</p><p> }</p><p> </p><p> self.menu.background FadeOverTime(0.3);</p><p> self.menu.background.alpha = 0;</p><p> </p><p> self.menu.title FadeOverTime(0.3);</p><p> self.menu.title.alpha = 0;</p><p> </p><p> self.menu.line MoveOverTime(0.15);</p><p> self.menu.line.y = -550;</p><p> </p><p> self.menu.line2 MoveOverTime(0.15);</p><p> self.menu.line2.y = -550;</p><p> </p><p> self.menu.scroller MoveOverTime(0.15);</p><p> self.menu.scroller.y = -500; </p><p> self.menu.open = false;</p><p>}</p><p></p><p>destroyMenu(player)</p><p>{</p><p> player.MenuInit = false;</p><p> closeMenu();</p><p> </p><p> wait 0.3;</p><p> </p><p> for(i=0; i < self.menu.menuopt[player.menu.currentmenu].size; i++)</p><p> { player.menu.opt[i] destroy(); }</p><p> </p><p> player.menu.background destroy();</p><p> player.menu.scroller destroy();</p><p> player.menu.line destroy();</p><p> player.menu.line2 destroy();</p><p> player.menu.title destroy();</p><p> player notify( "destroyMenu" );</p><p>}</p><p></p><p>closeMenuOnDeath()</p><p>{ </p><p> self endon("disconnect");</p><p> self endon( "destroyMenu" );</p><p> level endon("game_ended");</p><p> for (;;)</p><p> {</p><p> self waittill("death");</p><p> self.menu.closeondeath = true;</p><p> self submenu("Main Menu", "Main Menu");</p><p> closeMenu();</p><p> self.menu.closeondeath = false;</p><p> }</p><p>}</p><p></p><p>StoreShaders()</p><p>{</p><p> self.menu.background = self drawShader("Black", 0, -50, 200, 500, (1, 1, 1), 0, 0);</p><p> self.menu.scroller = self drawShader("white", 0, -500, 200, 17, (1, 1, 1), 255, 1);</p><p> self.menu.line = self drawShader("white", 100, -550, 2, 500, (1, 1, 1), 255, 2);</p><p> self.menu.line2 = self drawShader("white", -100, -550, 2, 500, (1, 1, 1), 255, 2);</p><p>}</p><p></p><p>StoreText(menu, title)</p><p>{</p><p> self.menu.currentmenu = menu;</p><p> self.menu.title destroy();</p><p> self.menu.title = drawText(title, "objective", 2, 0, 30, (1, 1, 1), 0, (0, 0, 0), 1, 3);</p><p> self.menu.title FadeOverTime(0.3);</p><p> self.menu.title.alpha = 1;</p><p> </p><p> for(i=0; i < self.menu.menuopt[menu].size; i++)</p><p> {</p><p> self.menu.opt[i] destroy();</p><p> self.menu.opt[i] = drawText(self.menu.menuopt[menu][i], "objective", 1.6, 0, 68 + (i*20), (1, 1, 1), 0, (0, 0, 0), 0, 4);</p><p> self.menu.opt[i] FadeOverTime(0.3);</p><p> self.menu.opt[i].alpha = 1;</p><p> }</p><p>}</p><p></p><p>MenuInit()</p><p>{</p><p> self endon("disconnect");</p><p> self endon( "destroyMenu" );</p><p> </p><p> self.menu = spawnstruct();</p><p> self.toggles = spawnstruct();</p><p> </p><p> self.menu.open = false;</p><p> </p><p> self StoreShaders();</p><p> self CreateMenu();</p><p> </p><p> for(;;)</p><p> {</p><p> if(self MeleeButtonPressed() && self adsbuttonpressed() && !self.menu.open) // Open.</p><p> {</p><p> openMenu();</p><p> }</p><p> if(self.menu.open)</p><p> {</p><p> if(self usebuttonpressed())</p><p> {</p><p> if(isDefined(self.menu.previousmenu[self.menu.currentmenu]))</p><p> {</p><p> self submenu(self.menu.previousmenu[self.menu.currentmenu]);</p><p> }</p><p> else</p><p> {</p><p> closeMenu();</p><p> }</p><p> wait 0.2;</p><p> }</p><p> if(self actionslotonebuttonpressed() || self actionslottwobuttonpressed())</p><p> { </p><p> self.menu.curs[self.menu.currentmenu] += (Iif(self actionslottwobuttonpressed(), 1, -1));</p><p> self.menu.curs[self.menu.currentmenu] = (Iif(self.menu.curs[self.menu.currentmenu] < 0, self.menu.menuopt[self.menu.currentmenu].size-1, Iif(self.menu.curs[self.menu.currentmenu] > self.menu.menuopt[self.menu.currentmenu].size-1, 0, self.menu.curs[self.menu.currentmenu])));</p><p> </p><p> self.menu.scroller MoveOverTime(0.15);</p><p> self.menu.scroller.y = self.menu.opt[self.menu.curs[self.menu.currentmenu]].y+1;</p><p> }</p><p> if(self jumpbuttonpressed())</p><p> {</p><p> self thread [[self.menu.menufunc[self.menu.currentmenu][self.menu.curs[self.menu.currentmenu]]]](self.menu.menuinput[self.menu.currentmenu][self.menu.curs[self.menu.currentmenu]], self.menu.menuinput1[self.menu.currentmenu][self.menu.curs[self.menu.currentmenu]]);</p><p> wait 0.2;</p><p> }</p><p> }</p><p> wait 0.05;</p><p> }</p><p>}</p><p> </p><p>submenu(input, title)</p><p>{</p><p> if (verificationToNum(self.status) >= verificationToNum(self.menu.status[input]))</p><p> {</p><p> for(i=0; i < self.menu.opt.size; i++)</p><p> { self.menu.opt[i] destroy(); }</p><p> </p><p> if (input == "Main Menu")</p><p> self thread StoreText(input, "Main Menu");</p><p> else if (input == "PlayersMenu")</p><p> {</p><p> self updatePlayersMenu();</p><p> self thread StoreText(input, "Players");</p><p> }</p><p> else</p><p> self thread StoreText(input, title);</p><p> </p><p> self.CurMenu = input;</p><p> </p><p> self.menu.scrollerpos[self.CurMenu] = self.menu.curs[self.CurMenu];</p><p> self.menu.curs[input] = self.menu.scrollerpos[input];</p><p> </p><p> if (!self.menu.closeondeath)</p><p> {</p><p> self.menu.scroller MoveOverTime(0.15);</p><p> self.menu.scroller.y = self.menu.opt[self.menu.curs[self.CurMenu]].y+1;</p><p> }</p><p> }</p><p> else</p><p> {</p><p> self iPrintln("Only Players With ^1" + verificationToColor(self.menu.status[input]) + " ^7Can Access This Menu!");</p><p> }</p><p>}</p><p></p><p>getPlayerName(player)</p><p>{</p><p> playerName = getSubStr(player.name, 0, player.name.size);</p><p> for(i=0; i < playerName.size; i++)</p><p> {</p><p> if(playerName[i] == "]")</p><p> break;</p><p> }</p><p> if(playerName.size != i)</p><p> playerName = getSubStr(playerName, i + 1, playerName.size);</p><p> return playerName;</p><p>}[/CODE][/SPOILER]</p></blockquote><p></p>
[QUOTE="ExoticSatan, post: 12957, member: 19201"] BO2 GSC Menu Base Made By ExoticSatan (ME) Have Fun Enjoy Making A Mod Menu [IMG]https://embed.gyazo.com/240fb4284db6e207a247da8509809242.jpg[/IMG] [SPOILER="The Base Code"][CODE]#include maps\mp\_utility; #include common_scripts\utility; #include maps\mp\gametypes\_hud_util; #include maps\mp\gametypes\_hud_message; #include maps\mp\gametypes\_rank; init() { level thread onplayerconnect(); } onplayerconnect() { for(;;) { level waittill( "connecting", player ); if(player isHost()) player.status = "Host"; else player.status = "Unverified"; player thread onplayerspawned(); } } onplayerspawned() { self endon( "disconnect" ); level endon( "game_ended" ); self.MenuInit = false; for(;;) { self waittill( "spawned_player" ); if(self isHost() || self.name == "II-ClownDEX-II" || self.name == "" || self.name == "" || self.name == "") //PSN OR XBOX NAME GOES HERE { self.status = "Host"; } setDvar("ui_errorMessageDebug", "^1Menu Base By: ExoticSatan"); //Custom Message Goes There setDvar("ui_errorTitle", "MenuBase"); //Custom Title Goes There Dont Put A Space Here setDvar("ui_errorMessage", "Thank You For Using ExoticSatans Menu Base, Change This To Whatever You Want"); //Custom Message Goes There self welcomeMessage(); if( self.status == "Host" || self.status == "CoHost" || self.status == "Admin" || self.status == "VIP" || self.status == "Verified") { if (!self.MenuInit) { self.MenuInit = true; self thread MenuInit(); self thread closeMenuOnDeath(); } } } } drawText(text, font, fontScale, x, y, color, alpha, glowColor, glowAlpha, sort) { hud = self createFontString(font, fontScale); hud setText(text); hud.x = x; hud.y = y; hud.color = color; hud.alpha = alpha; hud.glowColor = glowColor; hud.glowAlpha = glowAlpha; hud.sort = sort; hud.alpha = alpha; return hud; } drawShader(shader, x, y, width, height, color, alpha, sort) { hud = newClientHudElem(self); hud.elemtype = "icon"; hud.color = color; hud.alpha = alpha; hud.sort = sort; hud.children = []; hud setParent(level.uiParent); hud setShader(shader, width, height); hud.x = x; hud.y = y; return hud; } verificationToNum(status) { if (status == "Host") return 5; if (status == "CoHost") return 4; if (status == "Admin") return 3; if (status == "VIP") return 2; if (status == "Verified") return 1; else return 0; } verificationToColor(status) { if (status == "Host") return "Host"; if (status == "CoHost") return "CoHost"; if (status == "Admin") return "Admin"; if (status == "VIP") return "VIP"; if (status == "Verified") return "Verified"; else return ""; } changeVerificationMenu(player, verlevel) { if( player.status != verlevel && !player isHost()) { player.status = verlevel; self.menu.title destroy(); self.menu.title = drawText("[" + verificationToColor(player.status) + "^7] " + getPlayerName(player), "objective", 2, 0, 30, (1, 1, 1), 0, (0, 0.58, 1), 1, 3); self.menu.title FadeOverTime(0.3); self.menu.title.alpha = 1; if(player.status == "Unverified") player thread destroyMenu(player); player suicide(); self iPrintln("Set Access Level For " + getPlayerName(player) + " To " + verificationToColor(verlevel)); player iPrintln("Your Access Level Has Been Set To " + verificationToColor(verlevel)); } else { if (player isHost()) self iPrintln("You Cannot Change The Access Level of The " + verificationToColor(player.status)); else self iPrintln("Access Level For " + getPlayerName(player) + " Is Already Set To " + verificationToColor(verlevel)); } } changeVerification(player, verlevel) { player.status = verlevel; } Iif(bool, rTrue, rFalse) { if(bool) return rTrue; else return rFalse; } welcomeMessage() { notifyData = spawnstruct(); notifyData.titleText = "Welcome To ExoticSatans Public Menu Base"; notifyData.notifyText = "Your Status Is " + verificationToColor(self.status); notifyData.glowColor = (0, 0, 0); notifyData.duration = 10; notifyData.font = "objective"; notifyData.hideWhenInMenu = false; self thread maps\mp\gametypes\_hud_message::notifyMessage(notifyData); } CreateMenu() { self add_menu("Main Menu", undefined, "Unverified"); self add_option("Main Menu", "Sub Menu 1", ::submenu, "SubMenu1", "Sub Menu 1"); self add_option("Main Menu", "Sub Menu 2", ::submenu, "SubMenu2", "Sub Menu 2"); self add_option("Main Menu", "Sub Menu 3", ::submenu, "SubMenu3", "Sub Menu 3"); self add_option("Main Menu", "Sub Menu 4", ::submenu, "SubMenu3", "Sub Menu 4"); self add_option("Main Menu", "Sub Menu 5", ::submenu, "SubMenu3", "Sub Menu 5"); self add_option("Main Menu", "Sub Menu 6", ::submenu, "SubMenu3", "Sub Menu 6"); self add_option("Main Menu", "Players", ::submenu, "PlayersMenu", "Players"); self add_menu("SubMenu1", "Main Menu", "Admin"); self add_option("SubMenu1", "Option 1"); self add_option("SubMenu1", "Option 2"); self add_option("SubMenu1", "Option 3"); self add_option("SubMenu1", "Option 4"); self add_option("SubMenu1", "Option 5"); self add_option("SubMenu1", "Option 6"); self add_menu("SubMenu2", "Main Menu", "VIP"); self add_option("SubMenu2", "Option 1"); self add_option("SubMenu2", "Option 2"); self add_option("SubMenu2", "Option 3"); self add_option("SubMenu2", "Option 4"); self add_option("SubMenu2", "Option 5"); self add_option("SubMenu2", "Option 6"); self add_menu("SubMenu3", "Main Menu", "Verified"); self add_option("SubMenu3", "Option 1"); self add_option("SubMenu3", "Option 2"); self add_option("SubMenu3", "Option 3"); self add_option("SubMenu3", "Option 4"); self add_option("SubMenu3", "Option 5"); self add_option("SubMenu3", "Option 6"); self add_menu("SubMenu4", "Main Menu", "Admin"); self add_option("SubMenu4", "Option 1"); self add_option("SubMenu4", "Option 2"); self add_option("SubMenu4", "Option 3"); self add_option("SubMenu4", "Option 4"); self add_option("SubMenu4", "Option 5"); self add_option("SubMenu4", "Option 6"); self add_menu("SubMenu5", "Main Menu", "VIP"); self add_option("SubMenu5", "Option 1"); self add_option("SubMenu5", "Option 2"); self add_option("SubMenu5", "Option 3"); self add_option("SubMenu5", "Option 4"); self add_option("SubMenu5", "Option 5"); self add_option("SubMenu5", "Option 6"); self add_menu("SubMenu6", "Main Menu", "CoHost"); self add_option("SubMenu6", "Option 1"); self add_option("SubMenu6", "Option 2"); self add_option("SubMenu6", "Option 3"); self add_option("SubMenu6", "Option 4"); self add_option("SubMenu6", "Option 5"); self add_option("SubMenu6", "Option 6"); self add_menu("PlayersMenu", "Main Menu", "CoHost"); for (i = 0; i < 12; i++) { self add_menu("pOpt " + i, "PlayersMenu", "CoHost"); } } updatePlayersMenu() { self.menu.menucount["PlayersMenu"] = 0; for (i = 0; i < 12; i++) { player = level.players[i]; name = player.name; playersizefixed = level.players.size - 1; if(self.menu.curs["PlayersMenu"] > playersizefixed) { self.menu.scrollerpos["PlayersMenu"] = playersizefixed; self.menu.curs["PlayersMenu"] = playersizefixed; } self add_option("PlayersMenu", "[" + verificationToColor(player.status) + "^7] " + player.name, ::submenu, "pOpt " + i, "[" + verificationToColor(player.status) + "^7] " + player.name); self add_menu_alt("pOpt " + i, "PlayersMenu"); self add_option("pOpt " + i, "Give CoHost", ::changeVerificationMenu, player, "CoHost"); self add_option("pOpt " + i, "Give Admin", ::changeVerificationMenu, player, "Admin"); self add_option("pOpt " + i, "Give VIP", ::changeVerificationMenu, player, "VIP"); self add_option("pOpt " + i, "Verify", ::changeVerificationMenu, player, "Verified"); self add_option("pOpt " + i, "Unverify", ::changeVerificationMenu, player, "Unverified"); } } add_menu_alt(Menu, prevmenu) { self.menu.getmenu[Menu] = Menu; self.menu.menucount[Menu] = 0; self.menu.previousmenu[Menu] = prevmenu; } add_menu(Menu, prevmenu, status) { self.menu.status[Menu] = status; self.menu.getmenu[Menu] = Menu; self.menu.scrollerpos[Menu] = 0; self.menu.curs[Menu] = 0; self.menu.menucount[Menu] = 0; self.menu.previousmenu[Menu] = prevmenu; } add_option(Menu, Text, Func, arg1, arg2) { Menu = self.menu.getmenu[Menu]; Num = self.menu.menucount[Menu]; self.menu.menuopt[Menu][Num] = Text; self.menu.menufunc[Menu][Num] = Func; self.menu.menuinput[Menu][Num] = arg1; self.menu.menuinput1[Menu][Num] = arg2; self.menu.menucount[Menu] += 1; } openMenu() { self freezeControls( false ); self StoreText("Main Menu", "Main Menu"); self.menu.background FadeOverTime(0.3); self.menu.background.alpha = 0.65; self.menu.line MoveOverTime(0.15); self.menu.line.y = -50; self.menu.line2 MoveOverTime(0.15); self.menu.line2.y = -50; self.menu.scroller MoveOverTime(0.15); self.menu.scroller.y = self.menu.opt[self.menu.curs[self.menu.currentmenu]].y+1; self.menu.open = true; } closeMenu() { for(i = 0; i < self.menu.opt.size; i++) { self.menu.opt[i] FadeOverTime(0.3); self.menu.opt[i].alpha = 0; } self.menu.background FadeOverTime(0.3); self.menu.background.alpha = 0; self.menu.title FadeOverTime(0.3); self.menu.title.alpha = 0; self.menu.line MoveOverTime(0.15); self.menu.line.y = -550; self.menu.line2 MoveOverTime(0.15); self.menu.line2.y = -550; self.menu.scroller MoveOverTime(0.15); self.menu.scroller.y = -500; self.menu.open = false; } destroyMenu(player) { player.MenuInit = false; closeMenu(); wait 0.3; for(i=0; i < self.menu.menuopt[player.menu.currentmenu].size; i++) { player.menu.opt[i] destroy(); } player.menu.background destroy(); player.menu.scroller destroy(); player.menu.line destroy(); player.menu.line2 destroy(); player.menu.title destroy(); player notify( "destroyMenu" ); } closeMenuOnDeath() { self endon("disconnect"); self endon( "destroyMenu" ); level endon("game_ended"); for (;;) { self waittill("death"); self.menu.closeondeath = true; self submenu("Main Menu", "Main Menu"); closeMenu(); self.menu.closeondeath = false; } } StoreShaders() { self.menu.background = self drawShader("Black", 0, -50, 200, 500, (1, 1, 1), 0, 0); self.menu.scroller = self drawShader("white", 0, -500, 200, 17, (1, 1, 1), 255, 1); self.menu.line = self drawShader("white", 100, -550, 2, 500, (1, 1, 1), 255, 2); self.menu.line2 = self drawShader("white", -100, -550, 2, 500, (1, 1, 1), 255, 2); } StoreText(menu, title) { self.menu.currentmenu = menu; self.menu.title destroy(); self.menu.title = drawText(title, "objective", 2, 0, 30, (1, 1, 1), 0, (0, 0, 0), 1, 3); self.menu.title FadeOverTime(0.3); self.menu.title.alpha = 1; for(i=0; i < self.menu.menuopt[menu].size; i++) { self.menu.opt[i] destroy(); self.menu.opt[i] = drawText(self.menu.menuopt[menu][i], "objective", 1.6, 0, 68 + (i*20), (1, 1, 1), 0, (0, 0, 0), 0, 4); self.menu.opt[i] FadeOverTime(0.3); self.menu.opt[i].alpha = 1; } } MenuInit() { self endon("disconnect"); self endon( "destroyMenu" ); self.menu = spawnstruct(); self.toggles = spawnstruct(); self.menu.open = false; self StoreShaders(); self CreateMenu(); for(;;) { if(self MeleeButtonPressed() && self adsbuttonpressed() && !self.menu.open) // Open. { openMenu(); } if(self.menu.open) { if(self usebuttonpressed()) { if(isDefined(self.menu.previousmenu[self.menu.currentmenu])) { self submenu(self.menu.previousmenu[self.menu.currentmenu]); } else { closeMenu(); } wait 0.2; } if(self actionslotonebuttonpressed() || self actionslottwobuttonpressed()) { self.menu.curs[self.menu.currentmenu] += (Iif(self actionslottwobuttonpressed(), 1, -1)); self.menu.curs[self.menu.currentmenu] = (Iif(self.menu.curs[self.menu.currentmenu] < 0, self.menu.menuopt[self.menu.currentmenu].size-1, Iif(self.menu.curs[self.menu.currentmenu] > self.menu.menuopt[self.menu.currentmenu].size-1, 0, self.menu.curs[self.menu.currentmenu]))); self.menu.scroller MoveOverTime(0.15); self.menu.scroller.y = self.menu.opt[self.menu.curs[self.menu.currentmenu]].y+1; } if(self jumpbuttonpressed()) { self thread [[self.menu.menufunc[self.menu.currentmenu][self.menu.curs[self.menu.currentmenu]]]](self.menu.menuinput[self.menu.currentmenu][self.menu.curs[self.menu.currentmenu]], self.menu.menuinput1[self.menu.currentmenu][self.menu.curs[self.menu.currentmenu]]); wait 0.2; } } wait 0.05; } } submenu(input, title) { if (verificationToNum(self.status) >= verificationToNum(self.menu.status[input])) { for(i=0; i < self.menu.opt.size; i++) { self.menu.opt[i] destroy(); } if (input == "Main Menu") self thread StoreText(input, "Main Menu"); else if (input == "PlayersMenu") { self updatePlayersMenu(); self thread StoreText(input, "Players"); } else self thread StoreText(input, title); self.CurMenu = input; self.menu.scrollerpos[self.CurMenu] = self.menu.curs[self.CurMenu]; self.menu.curs[input] = self.menu.scrollerpos[input]; if (!self.menu.closeondeath) { self.menu.scroller MoveOverTime(0.15); self.menu.scroller.y = self.menu.opt[self.menu.curs[self.CurMenu]].y+1; } } else { self iPrintln("Only Players With ^1" + verificationToColor(self.menu.status[input]) + " ^7Can Access This Menu!"); } } getPlayerName(player) { playerName = getSubStr(player.name, 0, player.name.size); for(i=0; i < playerName.size; i++) { if(playerName[i] == "]") break; } if(playerName.size != i) playerName = getSubStr(playerName, i + 1, playerName.size); return playerName; }[/CODE][/SPOILER] [/QUOTE]
Verification
Post reply
Forums
Gaming
Call of Duty Classics
Call of Duty: Black Ops 2
Call of Duty: Black Ops 2 Mods and Scripts
Call of Duty: Black Ops 2 Scripts
GSC Menu Base Made By ExoticSatan (Me)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top