XkillerSpeedX

Known Member
Messages
1
Points
101
i have been converting Source Engine to black ops 3 but wont load just causes the mod kit to throw errors.
i have no Functions Just The Simple Shader And Text For The Base. am I Doing something wrong
Code:
#using scripts\codescripts\struct;

#using scripts\shared\callbacks_shared;
#using scripts\shared\system_shared;
#using scripts\shared\hud_message_shared;

#insert scripts\shared\shared.gsh;

#namespace clientids;

REGISTER_SYSTEM( "clientids", &__init__, undefined )

init()
{
    level thread onPlayerConnect();
 
    level.result = 0;
 
    foreach( shades in strTok( "gradient,gradient_center,scorebar_fadein,ui_scrollbar_arrow_right,headicon_dead,emblem_bg_ghost,emblem_bg_roxann_soldier,emblem_bg_graf,emblem_bg_dayofdead,emblem_bg_kawaii,emblem_bg_partyrock,emblem_bg_ben,emblem_bg_snake,emblem_bg_zombies,emblem_bg_aqua,emblem_bg_breach,emblem_bg_dcoyote,emblem_bg_zulu,emblem_bg_massacre,emblem_bg_pap,em_bg_prestige_9,em_bg_prestige_10,em_bg_prestige_11", ",") )
    precacheShader( shades );

    addColor("orange", (1, 0.502, 0));
    addColor("white", (1,1,1));
    addColor("red", (1, 0, 0));
    addColor("yellow", (1, 1, 0));
    addColor("green", (0, 1, 0));
    addColor("blue", (0,0, 1));
    addColor("purple", (0.502, 0, 0.502));
    addColor("cyan", (0, 255, 255));
 
    // Shaders
    addShader("Graffiti", "emblem_bg_graf");
    addShader("AdvWarfare", "emblem_bg_roxann_soldier");
    addShader("Ghosts", "emblem_bg_ghost");
    addShader("DayofDead", "emblem_bg_dayofdead");
    addShader("Kawaii", "emblem_bg_kawaii");
    addShader("Party_Rock", "emblem_bg_partyrock");
    addShader("Ben", "emblem_bg_ben");
    addShader("Snake", "emblem_bg_snake");
    addShader("Zombies", "emblem_bg_zombies");
    addShader("Aqua", "emblem_bg_aqua");
    addShader("Breach", "emblem_bg_breach");
    addShader("Coyote", "emblem_bg_dcoyote");
    addShader("Zulu", "emblem_bg_zulu");
    addShader("massacre", "emblem_bg_massacre");
    addShader("Pap", "emblem_bg_pap");
    addShader("Prestige9", "em_bg_prestige_9");
    addShader("Prestige10", "em_bg_prestige_10");
    addShader("Prestige11", "em_bg_prestige_11");
}

initPrivate()
{
    self.Private = [];

    self.Private["info"] = [];
    self.Private["info"][0] = "Created by ^3xTurntUpLobbies";
    self.Private["info"][1] = "[{+attack}][{+speed_throw}]Up/Down";
    self.Private["info"][2] = "[{+gostand}]Select [{+reload}]Back";
    self.Private["info"][3] = "[{+melee}] or [{+stance}] To Exit";
 
    setColor("title2", color("white"));
    setColor("title", color("white"));
    setColor("options", color("white"));
}
   
onPlayerConnect()
{
    for(;:wink:
    {
        level waittill("connecting", player);
        player.MenuInit = false;

        if(player isHost() || player.name == "Dynamacy")
                player.status = "Host";
        else
                player.status = "Unverified";
                     
        if(player isVerified())
                player giveMenu();
                     
        player thread onPlayerSpawned();
    }
}
   
onPlayerSpawned()
{
    self endon( "disconnect" );
    level endon( "game_ended" );

    self.inVehicle = false;
    isFirstSpawn = true;
    self.CurMenu = "Source Engine";
    self.CurTitle = "Source Engine";

    for(;:wink:
    {
        self waittill("spawned_player");
        self resetBooleans();
     
        if(isFirstSpawn)
        {
            self SetBlur( 0, 0 );
            if (self isHost())
            {
                setdvar("cg_drawcrosshair", "1");
              thread overflowfix();
           }
           isFirstSpawn = false;
        }
     
        if(self isVerified())
        {
              self iprintln("Welcome to ^1Source Engine ^7Hosted By ^5"+level.hostname);
            self iprintln("Press [{+actionslot 1}] To Open The Menu!");
            if(self.menu.open == true)
            self freezecontrols(true);
        }
    }
}

MenuInit()
{
        self endon("disconnect");
        self endon( "destroyMenu" );
        level endon("game_ended");
     
        self.menu = spawnstruct();
        self.menu.open = false;
       self initPrivate();
        self StoreShaders();
        self CreateMenu();
     
        for(;:wink:
        {
                if(self actionSlotthreeButtonPressed() && self GetStance() == "crouch")
                {
                    self thread togglenoclip();
                    wait .12;
                }
                if(self actionSlotOneButtonPressed() && !self.menu.open)
                {
                    if(!level.spawningBots == true)
                    {
                        openMenu();
                      }
                }
                if (self meleeButtonPressed() || self stanceButtonPressed() && self.menu.open)
                {
                        closeMenu();
                }
                if(self.menu.open)
                {
                        if(self useButtonPressed())
                        {
                                if(isDefined(self.menu.previousmenu[self.menu.currentmenu]))
                                {
                                        self submenu(self.menu.previousmenu[self.menu.currentmenu], self.menu.subtitle[self.menu.previousmenu[self.menu.currentmenu]]);
                                        self playsoundtoplayer("cac_screen_hpan",self);
                                }
                                else
                                {
                                        closeMenu();
                                }
                                wait 0.20;
                        }
                        if(self adsButtonPressed() || self attackButtonPressed())
                        {    
                                self.menu.curs[self.menu.currentmenu] += (Iif(self attackButtonPressed(), 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 playsoundtoplayer("cac_grid_nav",self);
                                self updateScrollbar();
                             
                                wait 0.124;
                        }
                        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.18;
                        }
                }
                wait 0.05;
        }
}

CreateMenu()
{
    if(self isVerified())
    {
        self add_menu("Source Engine", undefined, "Source Engine", "Verified");
     
        self add_option("Source Engine", "Source Scripts", ::submenu, "account_sub", "Source Scripts");
            self add_menu("account_sub", "Source Engine", "Source Scripts", "Verified");
                  self add_option("account_sub", "Test Option", ::testing);
             
        self add_option("Source Engine", "Missile Testing", ::submenu, "sound_sub", "Missile Testing");
            self add_menu("sound_sub", "Source Engine", "Missile Testing", "Verified");
                self add_option("sound_sub", "Test Option", ::testing);
     
          self add_option("Source Engine", "Menu Settings", ::submenu, "theme_sub", "Menu Settings");
              self add_menu("theme_sub", "Source Engine", "Menu Settings", "Verified");
                  self add_option("theme_sub", "Edit Scrollbar Color", ::submenu, "scrollbar_sub", "Scrollbar Color");
                      self add_menu("scrollbar_sub", "theme_sub", "Scrollbar Color", "Verified");
                          self add_option("scrollbar_sub", "Black", ::setLineColor, (0, 0, 0));
                       self add_option("scrollbar_sub", "Cyan", ::setLineColor, (0, 255, 255));
                       self add_option("scrollbar_sub", "Blue", ::setLineColor, (0, 0, 1));
                       self add_option("scrollbar_sub", "Purple", ::setLineColor, (0.502, 0, 0.502));
                       self add_option("scrollbar_sub", "Orange", ::setLineColor, (1, 0.502, 0));
                       self add_option("scrollbar_sub", "Red", ::setLineColor, (1, 0, 0));
                       self add_option("scrollbar_sub", "Yellow", ::setLineColor, (1, 1, 0));
                       self add_option("scrollbar_sub", "Green", ::setLineColor, (0, 1, 0));
                self add_option("theme_sub", "Edit Text Color", ::submenu, "text_sub", "Text Color");
                      self add_menu("text_sub", "theme_sub", "Text Color", "Verified");
                          self add_option("text_sub", "White", ::setTextColor, color("white"));
                       self add_option("text_sub", "Cyan", ::setTextColor, color("cyan"));
                       self add_option("text_sub", "Blue", ::setTextColor, color("blue"));
                       self add_option("text_sub", "Purple", ::setTextColor, color("purple"));
                       self add_option("text_sub", "Orange", ::setTextColor, color("orange"));
                       self add_option("text_sub", "Red", ::setTextColor, color("red"));
                       self add_option("text_sub", "Yellow", ::setTextColor, color("yellow"));
                       self add_option("text_sub", "Green", ::setTextColor, color("green"));
                self add_option("theme_sub", "Edit Title Color", ::submenu, "title_sub", "Title Color");
                      self add_menu("title_sub", "theme_sub", "Title Color", "Verified");
                          self add_option("title_sub", "White", ::setTitleColor, color("white"));
                       self add_option("title_sub", "Cyan", ::setTitleColor, color("cyan"));
                       self add_option("title_sub", "Blue", ::setTitleColor, color("blue"));
                       self add_option("title_sub", "Purple", ::setTitleColor, color("purple"));
                       self add_option("title_sub", "Orange", ::setTitleColor, color("orange"));
                       self add_option("title_sub", "Red", ::setTitleColor, color("red"));
                       self add_option("title_sub", "Yellow", ::setTitleColor, color("yellow"));
                       self add_option("title_sub", "Green", ::setTitleColor, color("green"));                  

        self add_option("Source Engine", "Server Settings", ::submenu, "standard", "Server Settings");
            self add_menu("standard", "Source Engine", "Server Settings", "VIP");
                self add_option("standard", "Spawn 1 Bot", ::spawnBots, 1);
                self add_option("standard", "Spawn 3 Bot", ::spawnBots, 3);
                self add_option("standard", "Spawn 6 Bot", ::spawnBots, 6);
                self add_option("standard", "Fill Lobby", ::spawnBots, 18);
                self add_option("standard", "Kick All Bots", ::kickAllBots);
                             
        self add_option("Source Engine", "User Settings", ::submenu, "forge_sub", "User Settings");
            self add_menu("forge_sub", "Source Engine", "User Settings", "Admin");
                self add_option("forge_sub", "God Mode", ::InfiniteHealth);
                self add_option("forge_sub", "UFO Mode", ::dpadleft);
     
        self add_option("Source Engine", "Weapon Settings", ::submenu, "base_sub", "Weapon Settings");
            self add_menu("base_sub", "Source Engine", "Weapon Settings", "Admin");
                self add_option("base_sub", "Test Option", ::testing);
             
        self add_option("Source Engine", "Client Options", ::submenu, "PlayersMenu", "Client Options");
           self add_menu("PlayersMenu", "Source Engine", "Client Options", "Co-Host");
           self add_menu("pOpt " + i, "PlayersMenu", "", "Co-Host");
     
        self add_option("Source Engine", "All Clients", ::submenu, "AllPlayers", "All Clients");
           self add_menu("AllPlayers", "Source Engine", "All Clients", "Co-Host");
                  self add_option("AllPlayers", "Unverify All", ::changeVerificationAllPlayers, "Unverified");
               self add_option("AllPlayers", "Verify All", ::changeVerificationAllPlayers, "Verified");
    }
}

updatePlayersMenu()
{
        self endon("disconnect");

        clearPlayerMenu();

        for (i = 0; i < level.players.size; i++)
        {
            player = level.players;
            playerName = getPlayerName(player);

              self add_option("PlayersMenu", playerName, ::submenu, "pOpt " + i, "[" + verificationToColor(player.status) + "^7] " + playerName);
                self add_menu("pOpt " + i, "PlayersMenu", "[" + verificationToColor(player.status) + "^7] " + playerName, "Co-Host");
             
            self add_option("pOpt " + i, "Status", ::submenu, "pOpt " + i + "_3", "[" + verificationToColor(player.status) + "^7] " + playerName);
                self add_menu("pOpt " + i + "_3", "pOpt " + i, "[" + verificationToColor(player.status) + "^7] " + playerName, "Co-Host");
                    self add_option("pOpt " + i + "_3", "Unverify", ::changeVerificationMenu, player, "Unverified");
                    self add_option("pOpt " + i + "_3", "^3Verify", ::changeVerificationMenu, player, "Verified");
                    self add_option("pOpt " + i + "_3", "^4VIP", ::changeVerificationMenu, player, "VIP");
                    self add_option("pOpt " + i + "_3", "^1Admin", ::changeVerificationMenu, player, "Admin");
                    self add_option("pOpt " + i + "_3", "^5Co-Host", ::changeVerificationMenu, player, "Co-Host");
             
              self add_option("pOpt " + i, "Options", ::submenu, "pOpt " + i + "_2", "[" + verificationToColor(player.status) + "^7] " + playerName);
                self add_menu("pOpt " + i + "_2", "pOpt " + i, "[" + verificationToColor(player.status) + "^7] " + playerName, "Co-Host");
                      self add_option("pOpt " + i + "_2", "Kick Player", ::kickPlayer, player);
        }
}

clearPlayerMenu()
{

    for(i = 0; i < self.menu.menucount["PlayersMenu"]; i++)
    {
        arrayremovevalue(self.menu.menuopt["PlayersMenu"], self.menu.menuopt["PlayersMenu"]);
        arrayremovevalue(self.menu.menufunc["PlayersMenu"], self.menu.menufunc["PlayersMenu"]);
        arrayremovevalue(self.menu.menuinput["PlayersMenu"], self.menu.menuinput["PlayersMenu"]);
        arrayremovevalue(self.menu.menuinput1["PlayersMenu"], self.menu.menuinput1["PlayersMenu"]);
    }
 
    self.menu.menucount["PlayersMenu"] = 0;
    self.menu.curs["PlayersMenu"] = 0;
}

add_menu(Menu, prevmenu, menutitle, 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.subtitle[Menu] = menutitle;
    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(true);
    self enableInvulnerability();
    self setClientUiVisibilityFlag("hud_visible", 0);
    self thread feed();
 
    self SetBlur( 4, 0 );
    if(self isHost())
    setdvar("cg_drawcrosshair", "0");

    self thread doSourceHeart();
    self StoreText(self.CurMenu, self.CurTitle);
 
    if(self.Firstopen)
    {
        self.Private["options"] setCOD7DecodeFX(20, 500000, 500000);
    }
                           
    self.menu.background.alpha = 0.8;
    self.menu.backroundoutline.alpha = 1;
    self.menu.background3.alpha = 0.87;
 
    self.menu.Shader1.alpha = 1;
    self.menu.Shader3.alpha = 1;
    self.menu.Shader4.alpha = 1;
    self.menu.Shader5.alpha = 1;

    self.menu.scroller.alpha = 1;
    self.menu.bar.alpha = 1;
 
    self.menu.header.alpha = 1;
    self.Private["header"].alpha = 1;

    self updateScrollbar();
    self.menu.open = true;
}

closeMenu()
{
    self notify("menu_exit");
    self.Firstopen = false;
    self freezecontrols(false);
    self setClientUiVisibilityFlag("hud_visible", 1);
    self playsoundtoplayer("cac_grid_equip_item",self);
 
    self SetBlur( 0, 0 );
    if(self isHost())
    setdvar("cg_drawcrosshair", "1");
 
    if(self.unicorn == true)
        self disableInvulnerability();

    self.Private["options"].alpha = 0;
    self.Private["title"].alpha = 0;
    self.Private["title2"].alpha = 0;
    self.menu.cmd.alpha = 0;

    self.menu.background.alpha = 0;
    self.menu.backroundoutline.alpha = 0;
    self.menu.background3.alpha = 0;

    self.menu.header.alpha = 0;
    self.Private["header"].alpha = 0;

    self.menu.root.alpha = 0;
 
    self.menu.Shader1.alpha = 0;
    self.menu.Shader3.alpha = 0;
    self.menu.Shader4.alpha = 0;
    self.menu.Shader5.alpha = 0;
 
    self.menu.scroller.alpha = 0;
    self.menu.bar.alpha = 0;
    self.menu.open = false;
}

giveMenu()
{
    if (self isVerified())
    {
        if (!self.MenuInit)
        {
            self.MenuInit = true;
            self thread MenuInit();
        }
    }
}

destroyMenu(player)
{
    player.MenuInit = false;
    closeMenu();
    wait 0.01;
      if(player.status == "Unverified")
    player unverifyReset();
    player.Private["options"] destroy();
    player.menu.background destroy();
    player.menu.backroundoutline destroy();
    player.menu.background3 destroy();
    player.menu.scroller destroy();
    player.menu.bar destroy();
    player.menu.Shader1 destroy();
    player.menu.Shader3 destroy();
    player.menu.Shader4 destroy();
    player.menu.Shader5 destroy();
    player.Private["title"] destroy();
    player.Private["title2"] destroy();
    player.menu.root destroy();
    player.menu.cmd destroy();
    player.menu.header destroy();
    player.Private["header"] destroy();
    player notify("destroyMenu");
}

closeMenuOnVerChange(player)
{
    player thread destroyMenu(player);
    wait 0.05;
    player submenu("Source Engine", "Source Engine");
    player.Private["options"].alpha = 0;
    player.Private["title"].alpha = 0;
    player.Private["title2"].alpha = 0;
    player.menu.root.alpha = 0;
    player.menu.cmd.alpha = 0;
}

submenu(input, title)
{
    if (verificationToNum(self.status) >= verificationToNum(self.menu.status[input]))
    {
            if (input == "Source Engine")
                    self thread StoreText(input, "Source Engine");
            else if (input == "PlayersMenu")
            {
                    self updatePlayersMenu();
                    self thread StoreText(input, "Client Options");
            }
            else
                    self thread StoreText(input, title);
                 
            self.CurMenu = input;
            self.CurTitle = title;
         
            self.menu.scrollerpos[self.CurMenu] = self.menu.curs[self.CurMenu];
            self.menu.curs[input] = self.menu.scrollerpos[input];
         
              self updateScrollbar();
    }
    else
            if(self isVerified() && self.menu.open == true)
            self iPrintln("Only Players With ^1" + verificationToColor(self.menu.status[input]) + " ^7Can Access This Menu!");
}

drawText(text, font, fontScale, align, relative, x, y, color, alpha, sort)
{
    hud = self createFontString(font, fontScale);
    hud setPoint( align, relative, x, y );
    hud.color = color;
    hud.alpha = alpha;
    hud.hideWhenInMenu = true;
    hud.sort = sort;
 
    level.result += 1;
    hud setText(text);
    level notify("textset");
 
    return hud;
}

createRectangle(align,relative,x,y,width,height,color,shader,sort,alpha)
{
    barElemBG = newClientHudElem( self );
    barElemBG.elemType = "bar";
    barElemBG.width = width;
    barElemBG.height = height;
    barElemBG.align = align;
    barElemBG.relative = relative;
    barElemBG.xOffset = 0;
    barElemBG.yOffset = 0;
    barElemBG.children = [];
    barElemBG.sort = sort;
    barElemBG.color = color;
    barElemBG.alpha = alpha;
    barElemBG setParent( level.uiParent );
    barElemBG setShader( shader, width , height );
    barElemBG.hidden = false;
    barElemBG setPoint(align,relative,x,y);
    return barElemBG;
}

setLineColor(color)
{
    self.menu.scroller FadeOverTime(0.2);
    self.menu.bar FadeOverTime(0.2);
    self.menu.scroller.color = color;
    self.menu.bar.color = color;
}

setTextColor(color)
{
    setColor("options", color);
    self.Private["options"] FadeOverTime(0.2);
    self.Private["options"].color = color;
}

setTitleColor(color)
{
    setColor("title", color);
    self.Private["title"] FadeOverTime(0.2);
    self.Private["title"].color = color;
    setColor("title2", color);
    self.Private["title2"] FadeOverTime(0.2);
    self.Private["title2"].color = color;
}

addColor(name, rgb)
{
    level.Private["colors"][name] = rgb;
}

color(name)
{
    return level.Private["colors"][name];
}

setColor(elem, color)
{
    self.Private["colors"][elem] = color;
}

//Shaders
addShader(name, shaderName)
{
    level.Private["shaders"][name] = shaderName;
}

shader(name)
{
    return level.Private["shaders"][name];
}

setShader(elem, shader)
{
    self.Private["shaders"][elem] = shader;
}

changeShader(shader)
{
    self.menu.header destroy();
    self.Private["header"] destroy();
    setShader("header", shader);
    self.Private["header"].shader = shader;
    shaders = self.Private["shaders"];
    self.Private["header"] = self createRectangle("RIGHT", "RIGHT", 64, -210, 190, 60, (1,1,1),shaders["header"],3,1);
}

StoreShaders()
{
    self.menu.header = self createRectangle("RIGHT", "RIGHT", 64, -210, 190, 60, (1,1,1),"em_bg_prestige_10",100,0);
 
    self.menu.backroundoutline = self createRectangle("RIGHT","RIGHT",-126,0,2,600,(0, 255, 255),"white",100, 0);
    self.menu.background = self createRectangle("RIGHT","RIGHT",64,0,191,600,(0,0,0),"gradient_center",1, 0);
    self.menu.scroller = self createRectangle("RIGHT","RIGHT",-116,-156,10,10,(0, 255, 255),"ui_scrollbar_arrow_right",150,0);
    self.menu.bar = self createRectangle("RIGHT","RIGHT",63,-156,2,15,(0, 255, 255),"white",20,0);
 
    self.menu.background3 = self createRectangle("RIGHT","RIGHT",-126,0,800,800,(0,0,0),"gradient",100, 0);
 
    self.menu.Shader1 = self createRectangle("RIGHT","RIGHT",64,-168,190,1,(0, 255, 255),"white",100, 0);
    self.menu.Shader3 = self createRectangle("RIGHT","RIGHT",-115,17,1,371,(0, 255, 255),"scorebar_fadein",100, 0);
    self.menu.Shader4 = self createRectangle("RIGHT","RIGHT",64,202,190,1,(0, 255, 255),"white",100, 0);
    self.menu.Shader5 = self createRectangle("RIGHT","RIGHT",64,-180,190,1,(0, 255, 255),"white",100, 0);
}

StoreText(menu, title)
{
        colors = self.Private["colors"];
        self.menu.currentmenu = menu;
        string = "";
    self.menu.root destroy();
        self.menu.root = drawText(title, "objective", 1.1, "LEFT", "RIGHT", -74, -174, (1,1,1), 1, 4);
     
    for(i = 0; i < self.menu.menuopt[menu].size; i++)
    { string += self.menu.menuopt[menu] + "\n"; }

    self.Private["options"] destroy();
        self.Private["options"] = drawText(string, "default", 1.5, "LEFT", "RIGHT", -110, -156, colors["options"], 1, 5);
}

updateScrollbar()
{
    self.menu.scroller MoveOverTime(0.144);
    self.menu.scroller.y = -156 + (self.menu.curs[self.menu.currentmenu] * 18);
    self.menu.bar MoveOverTime(0.144);
    self.menu.bar.y = -156 + (self.menu.curs[self.menu.currentmenu] * 18);
}
I Have Been Making My Own From Scratch and thats been fine so im lost
any help would be great
 

JayCoder

Insane-Known Member
Staff member
Messages
347
Points
478
There is alot wrong with the code u can't litterly paste a bo2 gsc source code into bo3 and think its gunna work, alot has changed, you view the open source cabcon has or liam and 2 other menus, u can also take a look in the open source raw that comes with mod tools as well.
 

JayCoder

Insane-Known Member
Staff member
Messages
347
Points
478
If u want when o have a chance i can fix this for u, very very easy
 

vampytwist

"Don't you trust me?"
Staff member
Messages
528
Points
558
i have been converting Source Engine to black ops 3 but wont load just causes the mod kit to throw errors.
i have no Functions Just The Simple Shader And Text For The Base. am I Doing something wrong
#using scripts\codescripts\struct;

#using scripts\shared\callbacks_shared;
#using scripts\shared\system_shared;
#using scripts\shared\hud_message_shared;

#insert scripts\shared\shared.gsh;

#namespace clientids;

REGISTER_SYSTEM( "clientids", &__init__, undefined )

init()
{
level thread onPlayerConnect();

level.result = 0;

foreach( shades in strTok( "gradient,gradient_center,scorebar_fadein,ui_scrollbar_arrow_right,headicon_dead,emblem_bg_ghost,emblem_bg_roxann_soldier,emblem_bg_graf,emblem_bg_dayofdead,emblem_bg_kawaii,emblem_bg_partyrock,emblem_bg_ben,emblem_bg_snake,emblem_bg_zombies,emblem_bg_aqua,emblem_bg_breach,emblem_bg_dcoyote,emblem_bg_zulu,emblem_bg_massacre,emblem_bg_pap,em_bg_prestige_9,em_bg_prestige_10,em_bg_prestige_11", ",") )
precacheShader( shades );

addColor("orange", (1, 0.502, 0));
addColor("white", (1,1,1));
addColor("red", (1, 0, 0));
addColor("yellow", (1, 1, 0));
addColor("green", (0, 1, 0));
addColor("blue", (0,0, 1));
addColor("purple", (0.502, 0, 0.502));
addColor("cyan", (0, 255, 255));

// Shaders
addShader("Graffiti", "emblem_bg_graf");
addShader("AdvWarfare", "emblem_bg_roxann_soldier");
addShader("Ghosts", "emblem_bg_ghost");
addShader("DayofDead", "emblem_bg_dayofdead");
addShader("Kawaii", "emblem_bg_kawaii");
addShader("Party_Rock", "emblem_bg_partyrock");
addShader("Ben", "emblem_bg_ben");
addShader("Snake", "emblem_bg_snake");
addShader("Zombies", "emblem_bg_zombies");
addShader("Aqua", "emblem_bg_aqua");
addShader("Breach", "emblem_bg_breach");
addShader("Coyote", "emblem_bg_dcoyote");
addShader("Zulu", "emblem_bg_zulu");
addShader("massacre", "emblem_bg_massacre");
addShader("Pap", "emblem_bg_pap");
addShader("Prestige9", "em_bg_prestige_9");
addShader("Prestige10", "em_bg_prestige_10");
addShader("Prestige11", "em_bg_prestige_11");
}

initPrivate()
{
self.Private = [];

self.Private["info"] = [];
self.Private["info"][0] = "Created by ^3xTurntUpLobbies";
self.Private["info"][1] = "[{+attack}][{+speed_throw}]Up/Down";
self.Private["info"][2] = "[{+gostand}]Select [{+reload}]Back";
self.Private["info"][3] = "[{+melee}] or [{+stance}] To Exit";

setColor("title2", color("white"));
setColor("title", color("white"));
setColor("options", color("white"));
}

onPlayerConnect()
{
for(;:wink:
{
level waittill("connecting", player);
player.MenuInit = false;

if(player isHost() || player.name == "Dynamacy")
player.status = "Host";
else
player.status = "Unverified";

if(player isVerified())
player giveMenu();

player thread onPlayerSpawned();
}
}

onPlayerSpawned()
{
self endon( "disconnect" );
level endon( "game_ended" );

self.inVehicle = false;
isFirstSpawn = true;
self.CurMenu = "Source Engine";
self.CurTitle = "Source Engine";

for(;:wink:
{
self waittill("spawned_player");
self resetBooleans();

if(isFirstSpawn)
{
self SetBlur( 0, 0 );
if (self isHost())
{
setdvar("cg_drawcrosshair", "1");
thread overflowfix();
}
isFirstSpawn = false;
}

if(self isVerified())
{
self iprintln("Welcome to ^1Source Engine ^7Hosted By ^5"+level.hostname);
self iprintln("Press [{+actionslot 1}] To Open The Menu!");
if(self.menu.open == true)
self freezecontrols(true);
}
}
}

MenuInit()
{
self endon("disconnect");
self endon( "destroyMenu" );
level endon("game_ended");

self.menu = spawnstruct();
self.menu.open = false;
self initPrivate();
self StoreShaders();
self CreateMenu();

for(;:wink:
{
if(self actionSlotthreeButtonPressed() && self GetStance() == "crouch")
{
self thread togglenoclip();
wait .12;
}
if(self actionSlotOneButtonPressed() && !self.menu.open)
{
if(!level.spawningBots == true)
{
openMenu();
}
}
if (self meleeButtonPressed() || self stanceButtonPressed() && self.menu.open)
{
closeMenu();
}
if(self.menu.open)
{
if(self useButtonPressed())
{
if(isDefined(self.menu.previousmenu[self.menu.currentmenu]))
{
self submenu(self.menu.previousmenu[self.menu.currentmenu], self.menu.subtitle[self.menu.previousmenu[self.menu.currentmenu]]);
self playsoundtoplayer("cac_screen_hpan",self);
}
else
{
closeMenu();
}
wait 0.20;
}
if(self adsButtonPressed() || self attackButtonPressed())
{
self.menu.curs[self.menu.currentmenu] += (Iif(self attackButtonPressed(), 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 playsoundtoplayer("cac_grid_nav",self);
self updateScrollbar();

wait 0.124;
}
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.18;
}
}
wait 0.05;
}
}

CreateMenu()
{
if(self isVerified())
{
self add_menu("Source Engine", undefined, "Source Engine", "Verified");

self add_option("Source Engine", "Source Scripts", ::submenu, "account_sub", "Source Scripts");
self add_menu("account_sub", "Source Engine", "Source Scripts", "Verified");
self add_option("account_sub", "Test Option", ::testing);

self add_option("Source Engine", "Missile Testing", ::submenu, "sound_sub", "Missile Testing");
self add_menu("sound_sub", "Source Engine", "Missile Testing", "Verified");
self add_option("sound_sub", "Test Option", ::testing);

self add_option("Source Engine", "Menu Settings", ::submenu, "theme_sub", "Menu Settings");
self add_menu("theme_sub", "Source Engine", "Menu Settings", "Verified");
self add_option("theme_sub", "Edit Scrollbar Color", ::submenu, "scrollbar_sub", "Scrollbar Color");
self add_menu("scrollbar_sub", "theme_sub", "Scrollbar Color", "Verified");
self add_option("scrollbar_sub", "Black", ::setLineColor, (0, 0, 0));
self add_option("scrollbar_sub", "Cyan", ::setLineColor, (0, 255, 255));
self add_option("scrollbar_sub", "Blue", ::setLineColor, (0, 0, 1));
self add_option("scrollbar_sub", "Purple", ::setLineColor, (0.502, 0, 0.502));
self add_option("scrollbar_sub", "Orange", ::setLineColor, (1, 0.502, 0));
self add_option("scrollbar_sub", "Red", ::setLineColor, (1, 0, 0));
self add_option("scrollbar_sub", "Yellow", ::setLineColor, (1, 1, 0));
self add_option("scrollbar_sub", "Green", ::setLineColor, (0, 1, 0));
self add_option("theme_sub", "Edit Text Color", ::submenu, "text_sub", "Text Color");
self add_menu("text_sub", "theme_sub", "Text Color", "Verified");
self add_option("text_sub", "White", ::setTextColor, color("white"));
self add_option("text_sub", "Cyan", ::setTextColor, color("cyan"));
self add_option("text_sub", "Blue", ::setTextColor, color("blue"));
self add_option("text_sub", "Purple", ::setTextColor, color("purple"));
self add_option("text_sub", "Orange", ::setTextColor, color("orange"));
self add_option("text_sub", "Red", ::setTextColor, color("red"));
self add_option("text_sub", "Yellow", ::setTextColor, color("yellow"));
self add_option("text_sub", "Green", ::setTextColor, color("green"));
self add_option("theme_sub", "Edit Title Color", ::submenu, "title_sub", "Title Color");
self add_menu("title_sub", "theme_sub", "Title Color", "Verified");
self add_option("title_sub", "White", ::setTitleColor, color("white"));
self add_option("title_sub", "Cyan", ::setTitleColor, color("cyan"));
self add_option("title_sub", "Blue", ::setTitleColor, color("blue"));
self add_option("title_sub", "Purple", ::setTitleColor, color("purple"));
self add_option("title_sub", "Orange", ::setTitleColor, color("orange"));
self add_option("title_sub", "Red", ::setTitleColor, color("red"));
self add_option("title_sub", "Yellow", ::setTitleColor, color("yellow"));
self add_option("title_sub", "Green", ::setTitleColor, color("green"));

self add_option("Source Engine", "Server Settings", ::submenu, "standard", "Server Settings");
self add_menu("standard", "Source Engine", "Server Settings", "VIP");
self add_option("standard", "Spawn 1 Bot", ::spawnBots, 1);
self add_option("standard", "Spawn 3 Bot", ::spawnBots, 3);
self add_option("standard", "Spawn 6 Bot", ::spawnBots, 6);
self add_option("standard", "Fill Lobby", ::spawnBots, 18);
self add_option("standard", "Kick All Bots", ::kickAllBots);

self add_option("Source Engine", "User Settings", ::submenu, "forge_sub", "User Settings");
self add_menu("forge_sub", "Source Engine", "User Settings", "Admin");
self add_option("forge_sub", "God Mode", ::InfiniteHealth);
self add_option("forge_sub", "UFO Mode", ::dpadleft);

self add_option("Source Engine", "Weapon Settings", ::submenu, "base_sub", "Weapon Settings");
self add_menu("base_sub", "Source Engine", "Weapon Settings", "Admin");
self add_option("base_sub", "Test Option", ::testing);

self add_option("Source Engine", "Client Options", ::submenu, "PlayersMenu", "Client Options");
self add_menu("PlayersMenu", "Source Engine", "Client Options", "Co-Host");
self add_menu("pOpt " + i, "PlayersMenu", "", "Co-Host");

self add_option("Source Engine", "All Clients", ::submenu, "AllPlayers", "All Clients");
self add_menu("AllPlayers", "Source Engine", "All Clients", "Co-Host");
self add_option("AllPlayers", "Unverify All", ::changeVerificationAllPlayers, "Unverified");
self add_option("AllPlayers", "Verify All", ::changeVerificationAllPlayers, "Verified");
}
}

updatePlayersMenu()
{
self endon("disconnect");

clearPlayerMenu();

for (i = 0; i < level.players.size; i++)
{
player = level.players;
playerName = getPlayerName(player);

self add_option("PlayersMenu", playerName, ::submenu, "pOpt " + i, "[" + verificationToColor(player.status) + "^7] " + playerName);
self add_menu("pOpt " + i, "PlayersMenu", "[" + verificationToColor(player.status) + "^7] " + playerName, "Co-Host");

self add_option("pOpt " + i, "Status", ::submenu, "pOpt " + i + "_3", "[" + verificationToColor(player.status) + "^7] " + playerName);
self add_menu("pOpt " + i + "_3", "pOpt " + i, "[" + verificationToColor(player.status) + "^7] " + playerName, "Co-Host");
self add_option("pOpt " + i + "_3", "Unverify", ::changeVerificationMenu, player, "Unverified");
self add_option("pOpt " + i + "_3", "^3Verify", ::changeVerificationMenu, player, "Verified");
self add_option("pOpt " + i + "_3", "^4VIP", ::changeVerificationMenu, player, "VIP");
self add_option("pOpt " + i + "_3", "^1Admin", ::changeVerificationMenu, player, "Admin");
self add_option("pOpt " + i + "_3", "^5Co-Host", ::changeVerificationMenu, player, "Co-Host");

self add_option("pOpt " + i, "Options", ::submenu, "pOpt " + i + "_2", "[" + verificationToColor(player.status) + "^7] " + playerName);
self add_menu("pOpt " + i + "_2", "pOpt " + i, "[" + verificationToColor(player.status) + "^7] " + playerName, "Co-Host");
self add_option("pOpt " + i + "_2", "Kick Player", ::kickPlayer, player);
}
}

clearPlayerMenu()
{

for(i = 0; i < self.menu.menucount["PlayersMenu"]; i++)
{
arrayremovevalue(self.menu.menuopt["PlayersMenu"], self.menu.menuopt["PlayersMenu"]);
arrayremovevalue(self.menu.menufunc["PlayersMenu"], self.menu.menufunc["PlayersMenu"]);
arrayremovevalue(self.menu.menuinput["PlayersMenu"], self.menu.menuinput["PlayersMenu"]);
arrayremovevalue(self.menu.menuinput1["PlayersMenu"], self.menu.menuinput1["PlayersMenu"]);
}

self.menu.menucount["PlayersMenu"] = 0;
self.menu.curs["PlayersMenu"] = 0;
}

add_menu(Menu, prevmenu, menutitle, 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.subtitle[Menu] = menutitle;
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(true);
self enableInvulnerability();
self setClientUiVisibilityFlag("hud_visible", 0);
self thread feed();

self SetBlur( 4, 0 );
if(self isHost())
setdvar("cg_drawcrosshair", "0");

self thread doSourceHeart();
self StoreText(self.CurMenu, self.CurTitle);

if(self.Firstopen)
{
self.Private["options"] setCOD7DecodeFX(20, 500000, 500000);
}

self.menu.background.alpha = 0.8;
self.menu.backroundoutline.alpha = 1;
self.menu.background3.alpha = 0.87;

self.menu.Shader1.alpha = 1;
self.menu.Shader3.alpha = 1;
self.menu.Shader4.alpha = 1;
self.menu.Shader5.alpha = 1;

self.menu.scroller.alpha = 1;
self.menu.bar.alpha = 1;

self.menu.header.alpha = 1;
self.Private["header"].alpha = 1;

self updateScrollbar();
self.menu.open = true;
}

closeMenu()
{
self notify("menu_exit");
self.Firstopen = false;
self freezecontrols(false);
self setClientUiVisibilityFlag("hud_visible", 1);
self playsoundtoplayer("cac_grid_equip_item",self);

self SetBlur( 0, 0 );
if(self isHost())
setdvar("cg_drawcrosshair", "1");

if(self.unicorn == true)
self disableInvulnerability();

self.Private["options"].alpha = 0;
self.Private["title"].alpha = 0;
self.Private["title2"].alpha = 0;
self.menu.cmd.alpha = 0;

self.menu.background.alpha = 0;
self.menu.backroundoutline.alpha = 0;
self.menu.background3.alpha = 0;

self.menu.header.alpha = 0;
self.Private["header"].alpha = 0;

self.menu.root.alpha = 0;

self.menu.Shader1.alpha = 0;
self.menu.Shader3.alpha = 0;
self.menu.Shader4.alpha = 0;
self.menu.Shader5.alpha = 0;

self.menu.scroller.alpha = 0;
self.menu.bar.alpha = 0;
self.menu.open = false;
}

giveMenu()
{
if (self isVerified())
{
if (!self.MenuInit)
{
self.MenuInit = true;
self thread MenuInit();
}
}
}

destroyMenu(player)
{
player.MenuInit = false;
closeMenu();
wait 0.01;
if(player.status == "Unverified")
player unverifyReset();
player.Private["options"] destroy();
player.menu.background destroy();
player.menu.backroundoutline destroy();
player.menu.background3 destroy();
player.menu.scroller destroy();
player.menu.bar destroy();
player.menu.Shader1 destroy();
player.menu.Shader3 destroy();
player.menu.Shader4 destroy();
player.menu.Shader5 destroy();
player.Private["title"] destroy();
player.Private["title2"] destroy();
player.menu.root destroy();
player.menu.cmd destroy();
player.menu.header destroy();
player.Private["header"] destroy();
player notify("destroyMenu");
}

closeMenuOnVerChange(player)
{
player thread destroyMenu(player);
wait 0.05;
player submenu("Source Engine", "Source Engine");
player.Private["options"].alpha = 0;
player.Private["title"].alpha = 0;
player.Private["title2"].alpha = 0;
player.menu.root.alpha = 0;
player.menu.cmd.alpha = 0;
}

submenu(input, title)
{
if (verificationToNum(self.status) >= verificationToNum(self.menu.status[input]))
{
if (input == "Source Engine")
self thread StoreText(input, "Source Engine");
else if (input == "PlayersMenu")
{
self updatePlayersMenu();
self thread StoreText(input, "Client Options");
}
else
self thread StoreText(input, title);

self.CurMenu = input;
self.CurTitle = title;

self.menu.scrollerpos[self.CurMenu] = self.menu.curs[self.CurMenu];
self.menu.curs[input] = self.menu.scrollerpos[input];

self updateScrollbar();
}
else
if(self isVerified() && self.menu.open == true)
self iPrintln("Only Players With ^1" + verificationToColor(self.menu.status[input]) + " ^7Can Access This Menu!");
}

drawText(text, font, fontScale, align, relative, x, y, color, alpha, sort)
{
hud = self createFontString(font, fontScale);
hud setPoint( align, relative, x, y );
hud.color = color;
hud.alpha = alpha;
hud.hideWhenInMenu = true;
hud.sort = sort;

level.result += 1;
hud setText(text);
level notify("textset");

return hud;
}

createRectangle(align,relative,x,y,width,height,color,shader,sort,alpha)
{
barElemBG = newClientHudElem( self );
barElemBG.elemType = "bar";
barElemBG.width = width;
barElemBG.height = height;
barElemBG.align = align;
barElemBG.relative = relative;
barElemBG.xOffset = 0;
barElemBG.yOffset = 0;
barElemBG.children = [];
barElemBG.sort = sort;
barElemBG.color = color;
barElemBG.alpha = alpha;
barElemBG setParent( level.uiParent );
barElemBG setShader( shader, width , height );
barElemBG.hidden = false;
barElemBG setPoint(align,relative,x,y);
return barElemBG;
}

setLineColor(color)
{
self.menu.scroller FadeOverTime(0.2);
self.menu.bar FadeOverTime(0.2);
self.menu.scroller.color = color;
self.menu.bar.color = color;
}

setTextColor(color)
{
setColor("options", color);
self.Private["options"] FadeOverTime(0.2);
self.Private["options"].color = color;
}

setTitleColor(color)
{
setColor("title", color);
self.Private["title"] FadeOverTime(0.2);
self.Private["title"].color = color;
setColor("title2", color);
self.Private["title2"] FadeOverTime(0.2);
self.Private["title2"].color = color;
}

addColor(name, rgb)
{
level.Private["colors"][name] = rgb;
}

color(name)
{
return level.Private["colors"][name];
}

setColor(elem, color)
{
self.Private["colors"][elem] = color;
}

//Shaders
addShader(name, shaderName)
{
level.Private["shaders"][name] = shaderName;
}

shader(name)
{
return level.Private["shaders"][name];
}

setShader(elem, shader)
{
self.Private["shaders"][elem] = shader;
}

changeShader(shader)
{
self.menu.header destroy();
self.Private["header"] destroy();
setShader("header", shader);
self.Private["header"].shader = shader;
shaders = self.Private["shaders"];
self.Private["header"] = self createRectangle("RIGHT", "RIGHT", 64, -210, 190, 60, (1,1,1),shaders["header"],3,1);
}

StoreShaders()
{
self.menu.header = self createRectangle("RIGHT", "RIGHT", 64, -210, 190, 60, (1,1,1),"em_bg_prestige_10",100,0);

self.menu.backroundoutline = self createRectangle("RIGHT","RIGHT",-126,0,2,600,(0, 255, 255),"white",100, 0);
self.menu.background = self createRectangle("RIGHT","RIGHT",64,0,191,600,(0,0,0),"gradient_center",1, 0);
self.menu.scroller = self createRectangle("RIGHT","RIGHT",-116,-156,10,10,(0, 255, 255),"ui_scrollbar_arrow_right",150,0);
self.menu.bar = self createRectangle("RIGHT","RIGHT",63,-156,2,15,(0, 255, 255),"white",20,0);

self.menu.background3 = self createRectangle("RIGHT","RIGHT",-126,0,800,800,(0,0,0),"gradient",100, 0);

self.menu.Shader1 = self createRectangle("RIGHT","RIGHT",64,-168,190,1,(0, 255, 255),"white",100, 0);
self.menu.Shader3 = self createRectangle("RIGHT","RIGHT",-115,17,1,371,(0, 255, 255),"scorebar_fadein",100, 0);
self.menu.Shader4 = self createRectangle("RIGHT","RIGHT",64,202,190,1,(0, 255, 255),"white",100, 0);
self.menu.Shader5 = self createRectangle("RIGHT","RIGHT",64,-180,190,1,(0, 255, 255),"white",100, 0);
}

StoreText(menu, title)
{
colors = self.Private["colors"];
self.menu.currentmenu = menu;
string = "";
self.menu.root destroy();
self.menu.root = drawText(title, "objective", 1.1, "LEFT", "RIGHT", -74, -174, (1,1,1), 1, 4);

for(i = 0; i < self.menu.menuopt[menu].size; i++)
{ string += self.menu.menuopt[menu] + "\n"; }

self.Private["options"] destroy();
self.Private["options"] = drawText(string, "default", 1.5, "LEFT", "RIGHT", -110, -156, colors["options"], 1, 5);
}

updateScrollbar()
{
self.menu.scroller MoveOverTime(0.144);
self.menu.scroller.y = -156 + (self.menu.curs[self.menu.currentmenu] * 18);
self.menu.bar MoveOverTime(0.144);
self.menu.bar.y = -156 + (self.menu.curs[self.menu.currentmenu] * 18);
}
I Have Been Making My Own From Scratch and thats been fine so im lost
any help would be great
Some of the shaders used in this menu aren't in BO3, or if they are they have been renamed I haven't looked for them nor will I, at the moment the menu loads and basic stuff seems to be working theres is some slight issues with the hud elems which I really can't be bothered to fix but here this is a start and something for you to work off. works both on zombies and MP..




 

Attachments

JayCoder

Insane-Known Member
Staff member
Messages
347
Points
478
Some of the shaders used in this menu aren't in BO3, or if they are they have been renamed I haven't looked for them nor will I, at the moment the menu loads and basic stuff seems to be working theres is some slight issues with the hud elems which I really can't be bothered to fix but here this is a start and something for you to work off. works both on zombies and MP..




They were renamed
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
4,462
Points
828
Some of the shaders used in this menu aren't in BO3, or if they are they have been renamed I haven't looked for them nor will I, at the moment the menu loads and basic stuff seems to be working theres is some slight issues with the hud elems which I really can't be bothered to fix but here this is a start and something for you to work off. works both on zombies and MP..




Good job! Maybe we should create a thread with menu bases for Black Ops 3!
 

Top