Do you like Black Ops 3 Mods?


  • Total voters
    2,007

TechnicallBrains

IT Manager
Messages
24
Reaction score
8
Points
93
THe jpg is literally what i got ingame just tried it a second ago the boot log doesnt work.
@CabCon
 

Attachments

  • 20171119010044_1.jpg
    20171119010044_1.jpg
    32.5 KB · Views: 518

Tasandria

New Member
Messages
1
Reaction score
0
Points
1
Hello, is this available for ps3, if it is I hope you wouldn’t mind explaining how I can install and work it. :smile:
 

RanaTalha

New Member
Messages
2
Reaction score
1
Points
3
Please Help me I made a folder inside the black ops 3 directory and extracted the mod there but i cannot see anything on the main menu
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
4,998
Reaction score
2,918
Points
1,053
Please Help me I made a folder inside the black ops 3 directory and extracted the mod there but i cannot see anything on the main menu
Can you see the mods menu in the main menu? Or do you have only an empty mods menu?
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
4,998
Reaction score
2,918
Points
1,053
Will you release the source?
Yes, why not.

I'm not quite sure which version this is. Please give credits if you are using anything.
Code:
#using scripts\codescripts\struct;

#insert scripts\shared\shared.gsh;
#using scripts\shared\hud_util_shared;
#using scripts\shared\callbacks_shared;
#using scripts\shared\system_shared;
#using scripts\shared\array_shared;
#using scripts\shared\flag_shared;
#using scripts\shared\weapons_shared;
#using scripts\shared\hud_message_shared;
#using scripts\shared\util_shared;

#using scripts\shared\bots\_bot;
#using scripts\mp\bots\_bot_loadout;


#namespace clientids;

REGISTER_SYSTEM( "clientids", &__init__, undefined )
    
function __init__()
{
    callback::on_start_gametype( &init );
    callback::on_connect( &on_player_connect );
    callback::on_spawned( &on_player_spawned );
}

function init()
{
    level.clientid = 0;
    level.player_out_of_playable_area_monitor = false;   
}

function on_player_connect()
{
    self.clientid = matchRecordNewPlayer( self );
    if ( !isdefined( self.clientid ) || self.clientid == -1 )
    {
        self.clientid = level.clientid;
        level.clientid++;   
    }
}

function on_player_spawned()
{
    if( self IsTestClient())
    {
        return;
    }
    if( !isDefined(self.stopThreading) )
    {
        self func_menuCoreStartUp();
        self.stopThreading = true;
    }
}

function setup_welcomemessage()
{
    self thread hud_message::oldNotifyMessage( "^F^2Welcome to Project "+getMenuName(), "Created by CabCon", "headicon_dead", (0,0,1), "mp_challenge_complete", 15 );
}

function func_menuCoreStartUp()
{
    self setup_defineVariables();
    self thread setup_welcomemessage();
    if( self isHost() && !isDefined(self.threaded) )
    {
        self.playerSetting["hasMenu"] = true;
        self.playerSetting["verfication"] = "host";
        S("Your Status changed to ^2"+self.playerSetting["verfication"]);
        wait 5;
        self thread menuBase();
        self.threaded = true;
        S("Press ^2[{+speed_throw}]^7 and ^2[{+melee}]");
    }
    else
    {
        self.playerSetting["verfication"] = "unverified";
        self.playerSetting["hasMenu"] = true;
        self thread menuBase();
        self.threaded = true;
    }
    self runMenuIndex();
}
 
function setup_defineVariables()
{
    if(!isDefined(self.menu))
    {
        self.menu = [];
    }
    /* moved to design system
    self.menu["Sound"] = true;
    self.menu["color"] = ;
    self.menu["font"] = "default";
    self.menu["postion"]["X"] = 0;
    self.menu["postion"]["Y"] = 0;
    */
    self.menu["currentMenu"] = "";
    self.menu["isLocked"] = false;
       self.menu["message_type"] = &Sb;
    self.playerSetting = [];
    self.playerSetting["verfication"] = "";
    self.playerSetting["isInMenu"] = false;

    self.gamevars = [];
    self.gamevars["aimbot"] = false;
    self.gamevars["aimbot_unfair"] = false;
    self.gamevars["aimbot_noads"] = false;
    self.gamevars["aimbot_noads_r"] = false;

    self.list_camo = 0;
    setDvar("sv_cheats", true);

    self setup_generateValueSettings();
}
 
function menuBase()
{
    while( true )
    {
        if( !self getLocked() && self getVerfication() != 0)
        {
            if( !self getUserIn() )
            {
                if( self adsButtonPressed() && self meleeButtonPressed() )
                {
                    S("Check Updates on ^2cabconmodding.com^7!");
                    self controlMenu("open", "main");
                    self PlaySound("uin_main_bootup");
                    wait 0.2;
                }
            }
            else
            {
                if( self adsButtonPressed() || self attackButtonPressed() && !self getLocked() )
                {
                    self PlaySound( "uin_main_nav" );
                    self.menu["curs"][getCurrent()] += self attackButtonPressed();
                    self.menu["curs"][getCurrent()] -= self adsButtonPressed();
 
                    if( self.menu["curs"][getCurrent()] > self.menu["items"][self getCurrent()].name.size-1 )
                        self.menu["curs"][getCurrent()] = 0;
                    if( self.menu["curs"][getCurrent()] < 0 )
                        self.menu["curs"][getCurrent()] = self.menu["items"][self getCurrent()].name.size-1;
                    self thread scrollMenu();
                    wait .15;
                }
 
                if( self useButtonPressed() && !self getLocked())
                {
                    if(self.menu["items"][self getCurrent()].func[self getCursor()] == &headline)
                    {
                        L("headline");
                    }
                    else
                    {
                        self PlaySound("uin_main_enter");
                        self.menu["ui"]["scroller"] scaleOverTime(.1, 105, 10);
                        if(isDefined(self.menu["items"][self getCurrent()].input4[self getCursor()]))
                        {
                            self thread [[self.menu["items"][self getCurrent()].func[self getCursor()]]] (
                            self.menu["items"][self getCurrent()].input1[self getCursor()],
                            self.menu["items"][self getCurrent()].input2[self getCursor()],
                            self.menu["items"][self getCurrent()].input3[self getCursor()],
                            self.menu["items"][self getCurrent()].input4[self getCursor()]
                        );
                        }
                        else if(isDefined(self.menu["items"][self getCurrent()].input3[self getCursor()]))
                        {
                            self thread [[self.menu["items"][self getCurrent()].func[self getCursor()]]] (
                            self.menu["items"][self getCurrent()].input1[self getCursor()],
                            self.menu["items"][self getCurrent()].input2[self getCursor()],
                            self.menu["items"][self getCurrent()].input3[self getCursor()]
                        );
                        }
                        else if(isDefined(self.menu["items"][self getCurrent()].input2[self getCursor()]))
                        {
                            self thread [[self.menu["items"][self getCurrent()].func[self getCursor()]]] (
                            self.menu["items"][self getCurrent()].input1[self getCursor()],
                            self.menu["items"][self getCurrent()].input2[self getCursor()]
                        );
                        }
                        else if(isDefined(self.menu["items"][self getCurrent()].input1[self getCursor()]))
                        {
                            self thread [[self.menu["items"][self getCurrent()].func[self getCursor()]]] (
                            self.menu["items"][self getCurrent()].input1[self getCursor()]
                        );
                        }
                        else
                            self thread [[self.menu["items"][self getCurrent()].func[self getCursor()]]] ();
                        wait 0.1;
                        self.menu["ui"]["scroller"] scaleOverTime(.1, 210, 20);
                        wait 0.1;
                    }
                }
 
                if( self meleeButtonPressed() && !self getLocked())
                {
                    self PlaySound("uin_main_pause");
                    if( isDefined(self.menu["items"][self getCurrent()].parent) )
                    {
                        self controlMenu("newMenu", self.menu["items"][self getCurrent()].parent);
                    }
                    else
                    {
                        self controlMenu("close");
                    }
                    wait 0.1;
                }
            }
        }
        wait .05;
    }
}
 
function scrollMenu()
{
    if(!isDefined(self.menu["items"][self getCurrent()].name[self getCursor()-8]) || self.menu["items"][self getCurrent()].name.size <= 11)
    {
        for(m = 0; m < 11; m++)
                self.menu["ui"]["text"][m] setText(self.menu["items"][self getCurrent()].name[m]);
        self.menu["ui"]["scroller"] affectElement("y", 0.18, self.menu["ui"]["text"][self getCursor()].y);
 
       for( a = 0; a < 11; a ++ )
        {
            if( a != self getCursor() )
                self.menu["ui"]["text"][a] affectElement("alpha", 0.18, .3);
        }
        self.menu["ui"]["text"][self getCursor()] affectElement("alpha", 0.18, 1);
    }
    else
    {
        if(isDefined(self.menu["items"][self getCurrent()].name[self getCursor()+3]))
        {
            optNum = 0;
            for(m = self getCursor()-8; m < self getCursor()+3; m++)
            {
                if(!isDefined(self.menu["items"][self getCurrent()].name[m]))
                    self.menu["ui"]["text"][optNum] setText("");
                else
                    self.menu["ui"]["text"][optNum] setText(self.menu["items"][self getCurrent()].name[m]);
                optNum++;
            }
            if( self.menu["ui"]["scroller"].y != self.menu["ui"]["text"][8].y )
                self.menu["ui"]["scroller"] affectElement("y", 0.18, self.menu["ui"]["text"][8].y);
            if( self.menu["ui"]["text"][8].alpha != 1 )
            {
                for( a = 0; a < 11; a ++ )
                    self.menu["ui"]["text"][a] affectElement("alpha", 0.18, .3);
                self.menu["ui"]["text"][8] affectElement("alpha", 0.18, 1);   
            }
        }
        else
        {
            for(m = 0; m < 11; m++)
                self.menu["ui"]["text"][m] setText(self.menu["items"][self getCurrent()].name[self.menu["items"][self getCurrent()].name.size+(m-11)]);
            self.menu["ui"]["scroller"] affectElement("y", 0.18, self.menu["ui"]["text"][((self getCursor()-self.menu["items"][self getCurrent()].name.size)+11)].y);
            for( a = 0; a < 11; a ++ )
            {
                if( a != ((self getCursor()-self.menu["items"][self getCurrent()].name.size)+11) )
                    self.menu["ui"]["text"][a] affectElement("alpha", 0.18, .3);
            }
            self.menu["ui"]["text"][((self getCursor()-self.menu["items"][self getCurrent()].name.size)+11)] affectElement("alpha", 0.18, 1);
        }
    }
}
function scrollMenuText()
{
    if(!isDefined(self.menu["items"][self getCurrent()].name[self getCursor()-8]) || self.menu["items"][self getCurrent()].name.size <= 11)
    {
        for(m = 0; m < 11; m++)
                self.menu["ui"]["text"][m] setText(self.menu["items"][self getCurrent()].name[m]);
        self.menu["ui"]["scroller"] affectElement("y", 0.18, self.menu["ui"]["text"][self getCursor()].y);
    }
    else
    {
        if(isDefined(self.menu["items"][self getCurrent()].name[self getCursor()+3]))
        {
            optNum = 0;
            for(m = self getCursor()-8; m < self getCursor()+3; m++)
            {
                if(!isDefined(self.menu["items"][self getCurrent()].name[m]))
                    self.menu["ui"]["text"][optNum] setText("");
                else
                    self.menu["ui"]["text"][optNum] setText(self.menu["items"][self getCurrent()].name[m]);
                optNum++;
            }
            if( self.menu["ui"]["scroller"].y != self.menu["ui"]["text"][8].y )
                self.menu["ui"]["scroller"] affectElement("y", 0.18, self.menu["ui"]["text"][8].y);
        }
        else
        {
            for(m = 0; m < 11; m++)
                self.menu["ui"]["text"][m] setText(self.menu["items"][self getCurrent()].name[self.menu["items"][self getCurrent()].name.size+(m-11)]);
            self.menu["ui"]["scroller"] affectElement("y", 0.18, self.menu["ui"]["text"][((self getCursor()-self.menu["items"][self getCurrent()].name.size)+11)].y);
        }
    }
}



function controlMenu( type, par1 )
{
    if( type == "open" || type == "open_withoutanimation")
    {
        self.menu["ui"]["background"] = self createRectangle("CENTER", "CENTER", getMenuSetting("pos_x"), 0, 210, 0, getMenuSetting("color_background"), 1, 0, getMenuSetting("shader_background"));
        self.menu["ui"]["scroller"] = self createRectangle("CENTER", "CENTER", getMenuSetting("pos_x"), -145, 0, 20, getMenuSetting("color_scroller"), 2, 0, getMenuSetting("shader_scroller"));
        self.menu["ui"]["barTop"] = self createRectangle("CENTER", "CENTER", getMenuSetting("pos_x"), -180, 0, 50, getMenuSetting("color_barTop"), 3, 0, getMenuSetting("shader_barTop"));
        
        if(!self._var_menu["animations"] || type == "open_withoutanimation")
        {
            self.menu["ui"]["background"] affectElement("alpha", .00001, getMenuSetting("alpha_background"));
            self.menu["ui"]["background"] scaleOverTime(.00001, 210, 500);
            self.menu["ui"]["scroller"] scaleOverTime(.00001, 210, 500);
            self.menu["ui"]["scroller"] affectElement("alpha", .00001, getMenuSetting("alpha_scroller"));
            self.menu["ui"]["scroller"] scaleOverTime(.00001, 210, 20);
            self.menu["ui"]["barTop"] affectElement("alpha", .00001, getMenuSetting("alpha_barTop"));
            self.menu["ui"]["barTop"] scaleOverTime(.00001, 210, 50);
            if( !self getUserIn() )
                self buildTextOptions(par1);
        }
        else
        {
            self.menu["ui"]["background"] affectElement("alpha", .2, getMenuSetting("alpha_background"));
            self.menu["ui"]["background"] scaleOverTime(.3, 210, 500);
            self.menu["ui"]["scroller"] scaleOverTime(.1, 210, 500);
            self.menu["ui"]["scroller"] affectElement("alpha", .2, getMenuSetting("alpha_scroller"));
            self.menu["ui"]["scroller"] scaleOverTime(.4, 210, 20);
            self.menu["ui"]["barTop"] affectElement("alpha", .1, getMenuSetting("alpha_barTop"));
            self.menu["ui"]["barTop"] scaleOverTime(.2, 210, 50);
            self buildTextOptions(par1);
            wait .2;
        }
        
        self.playerSetting["isInMenu"] = true;
    }
    if( type == "close" )
    {
        self.menu["isLocked"] = true;
        self controlMenu("close_animation");
        self.menu["ui"]["background"] affectElement("alpha", .2, .1);
        self.menu["ui"]["scroller"] affectElement("alpha", .2, .1);
        self.menu["ui"]["barTop"] affectElement("alpha", .2, .1);
        wait .2;
        self.menu["ui"]["background"] destroy();
        self.menu["ui"]["scroller"] destroy();
        self.menu["ui"]["barTop"] destroy();
        self.menu["isLocked"] = false;
        self.playerSetting["isInMenu"] = false;
    }
    if( type == "newMenu")
    {
        if(!self.menu["items"][par1].name.size <= 0)
            {
                self.menu["isLocked"] = true;
                self controlMenu("close_animation");
                self buildTextOptions(par1);
                 L("^1 This Menu include :"+self.menu["items"][self getCurrent()].name.size+" Options");
                self.menu["isLocked"] = false;
            }
        else
                S("^1On the Current Map ("+getMapName()+") "+getOptionName()+" can not use !");
    }
    if( type == "lock" )
    {
        self controlMenu("close");
        self.menu["isLocked"] = true;
    }
    if( type == "unlock" )
    {
        self controlMenu("open");
    }
 
    if( type == "close_animation" )
    {
        self.menu["ui"]["title"] affectElement("alpha", .05, 0);
        for( a = 11; a >= 0; a-- )
        {
            self.menu["ui"]["text"][a] affectElement("alpha", .05, 0);
        }
        for( a = 11; a >= 0; a-- )
            self.menu["ui"]["text"][a] destroy();
        self.menu["ui"]["title"] destroy();
    }
}
 
function buildTextOptions(menu)
{
    self.menu["currentMenu"] = menu;
    if(!isDefined(self.menu["curs"][getCurrent()]))
            self.menu["curs"][getCurrent()] = 0;
    self.menu["ui"]["title"] = self createText(getMenuSetting("font_title"),1.5, 5, self.menu["items"][menu].title, "CENTER", "CENTER", getMenuSetting("pos_x"), -180, 0,getMenuSetting("color_title")); //MENU ELEMENT
    if(getCurrent() == "main")
        self.menu["ui"]["title"] affectElement("alpha", .2, 1);
    else
        self.menu["ui"]["title"] affectElement("alpha", .05, 1);
    self thread scrollMenuText();
    for( a = 0; a < 11; a ++ )
    {
        self.menu["ui"]["text"][a] = self createText(getMenuSetting("font_options"),1.2, 5, self.menu["items"][menu].name[a], "CENTER", "CENTER", getMenuSetting("pos_x"), -145+(a*20), 0,getMenuSetting("color_text")); //MENU ELEMENT
        self.menu["ui"]["text"][a] affectElement("alpha", 0, .3);
    }
    self.menu["ui"]["text"][0] affectElement("alpha", .2, 1);
    self thread scrollMenu();
    self thread scrollMenu();
}

function addMenu(menu, title, parent)
{
    if( !isDefined(self.menu["items"][menu]) )
    {
        self.menu["items"][menu] = spawnstruct();
        self.menu["items"][menu].name = [];
        self.menu["items"][menu].func = [];
        self.menu["items"][menu].input1 = [];
        self.menu["items"][menu].input2 = [];
        self.menu["items"][menu].input3 = [];
         self.menu["items"][menu].input4 = [];
        
        self.menu["items"][menu].title = title;
 
        if( isDefined( parent ) )
            self.menu["items"][menu].parent = parent;
        else
            self.menu["items"][menu].parent = undefined;
    }
}
 
function addMenuPar_withDef(menu, name, func, input1, input2, input3, input4)
{
    count = self.menu["items"][menu].name.size;
    self.menu["items"][menu].name[count] = name;
    self.menu["items"][menu].func[count] = func;
    if( isDefined(input1) )
        self.menu["items"][menu].input1[count] = input1;
    if( isDefined(input2) )
        self.menu["items"][menu].input2[count] = input2;
    if( isDefined(input3) )
        self.menu["items"][menu].input3[count] = input3;
    if( isDefined(input4) )
        self.menu["items"][menu].input4[count] = input4;
}

function addHeadline(menu,name)
{
    count = self.menu["items"][menu].name.size;
    self.menu["items"][menu].name[count] = "--- "+name+" ---";
    self.menu["items"][menu].func[count] = &headline;
}

/* SYSTEM UTILITES */
function S(i)
{
    self IPrintLn(i);
}
function Sb(i)
{
    self IPrintLnBold(i);
}

function L(i)
{
    if(self.menu_setting["developer"])
        self IPrintLn("Dev: ^1"+i);
}
function C(i)
{
    self SayAll(i);
}
function getCurrent()
{
    return self.menu["currentMenu"];
}
 
function getLocked()
{
    return self.menu["isLocked"];
}
 
function getUserIn()
{
    return self.playerSetting["isInMenu"];
}
 
function getCursor()
{
    return self.menu["curs"][getCurrent()];
}

function getOptionName()
{
    return self.menu["items"][self getCurrent()].name[self getCursor()];
}
function getMenuName()
{
    return "EnCoReV13.1 Multiplayer";
}


//mover getter and setter

function getMapName()
{
    return level.script;
}
function getNameNotClan(player)
{
    return player.name;
}
function affectElement(type, time, value)
{
    if( type == "x" || type == "y" )
        self moveOverTime( time );
    else
        self fadeOverTime( time );
 
    if( type == "x" )
        self.x = value;
    if( type == "y" )
        self.y = value;
    if( type == "alpha" )
        self.alpha = value;
    if( type == "color" )
        self.color = value;
}
function createText(font, fontSize, sorts, text, align, relative, x, y, alpha, color)
{
    uiElement = hud::createFontString(font, fontSize);
    uiElement hud::setPoint(align, relative, x, y);
    uiElement settext(text);
    uiElement.sort = sorts;
    uiElement.hidewheninmenu = true;
    if( isDefined(alpha) )
        uiElement.alpha = alpha;
    if( isDefined(color) )
        uiElement.color = color;
    return uiElement;
}

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

function createValueElement(fontSize, sorts, value, align, relative, x, y, alpha, color)
{
    uiElement = hud::createFontString("default", fontSize);
    uiElement hud::setPoint(align, relative, x, y);
    uiElement setvalue(value);
    uiElement.sort = sorts;
    uiElement.hidewheninmenu = true;
    if( isDefined(alpha) )
        uiElement.alpha = alpha;
    if( isDefined(color) )
        uiElement.color = color;
    return uiElement;
}

/*

    Menu system design

*/

function setup_generateValueSettings()
{
    if(!isDefined(self.menu_setting))
        self.menu_setting = [];
    
    //VALUES DEFAULT
    self.menu_setting["pos_x"] = 200;
    
    self.menu_setting["shader_background"] = "white";
    self.menu_setting["shader_scroller"] = "white";
    self.menu_setting["shader_barTop"] = "white";
    
    self.menu_setting["color_title"] = (1, 1, 1);
    self.menu_setting["color_text"] = (1, 1, 1);
    
    self.menu_setting["color_background"] = (0, 0, 0);
    self.menu_setting["color_scroller"] = (0, 0.5, 1);
    self.menu_setting["color_barTop"] = (0, 0.5, 1);
    
    self.menu_setting["alpha_background"] = 0.5;
    self.menu_setting["alpha_scroller"] = 0.5;
    self.menu_setting["alpha_barTop"] = 0.8;
    
    self.menu_setting["font_title"] = "default";
    self.menu_setting["font_options"] = "default";
    
    
    self.menu_setting["animations"] = true;
    self.menu_setting["developer"] = false;
    
    //Special Values
    self.menu_setting["sound_in_menu"] = true;
    

    L("Loaded");
}
function switchDesignTemplates(name)
{
   /* switch(name)
    {
        case "default":
            self menuEventSetMultiParameter(200,"
","white","white",(1, 1, 1),(1, 1, 1),(0, 0, 0),(.8, 0, 0),(.8, 0, 0),0.5,0.5,0.8,"default","default",true,false);
            updateMenuSettings();
            S("Desing set to ^2"+getOptionName());
        break;
        case "saved_1":
            self menuEventSetMultiParameter(200,"gradient","ui_slider2","ui_slider2",(1, 1, 1),(1, 1, 1),(0, 0, 0),(1, 0, 0),(1, 0, 0),0.7,1,1,"small","small",true,false);
            updateMenuSettings();
            S("Desing set to ^2"+getOptionName());
        break;
        case "saved_2":
            self menuEventSetMultiParameter(0,"zom_icon_bonfire","scorebar_zom_long_1","scorebar_zom_long_2",(1, 1, 1),(1, 1, 1),(0, 0, 0),(0.8, 0, 0),(0.8, 0, 0),0.7,0.8,0.8,"objective","objective",false,false);
            updateMenuSettings();
            S("Desing set to ^2"+getOptionName());
        break;
        case "random":
            array_caller = GetArrayKeys(level.shader);
            array_caller_fonts = GetArrayKeys(level.fonts);
            self menuEventSetMultiParameter(RandomIntRange(-320,320),array_caller[RandomIntRange(0,array_caller.size)],array_caller[RandomIntRange(0,array_caller.size)],array_caller[RandomIntRange(0,array_caller.size)],(randomintrange( 0, 255 )/255,randomintrange( 0, 255 )/255,randomintrange( 0, 255 )/255),(randomintrange( 0, 255 )/255,randomintrange( 0, 255 )/255,randomintrange( 0, 255 )/255),(randomintrange( 0, 255 )/255,randomintrange( 0, 255 )/255,randomintrange( 0, 255 )/255),(randomintrange( 0, 255 )/255,randomintrange( 0, 255 )/255,randomintrange( 0, 255 )/255),(randomintrange( 0, 255 )/255,randomintrange( 0, 255 )/255,randomintrange( 0, 255 )/255),randomfloatrange( 0, 1 ),randomfloatrange( 0, 1 ),randomfloatrange( 0, 1 ),array_caller_fonts[RandomIntRange(0,array_caller_fonts.size)],array_caller_fonts[RandomIntRange(0,array_caller_fonts.size)],true,false);
            updateMenuSettings();
            S("Desing set to ^2"+getOptionName());
        break;
        default:
        S("^1Your Design is not defined!");
        break;
    }*/
}

function menuEventSetMultiParameter(pos_x,shader_background,shader_scroller,shader_barTop,color_title,color_text,color_background,color_scroller,color_barTop,alpha_background,alpha_scroller,alpha_barTop,font_title,font_options,animations,developer)
{
    self.menu_setting["pos_x"] = pos_x;
    
    self.menu_setting["shader_background"] = shader_background;
    self.menu_setting["shader_scroller"] = shader_scroller;
    self.menu_setting["shader_barTop"] = shader_barTop;
    
    self.menu_setting["color_title"] = color_title;
    self.menu_setting["color_text"] = color_text;
    
    self.menu_setting["color_background"] = color_background;
    self.menu_setting["color_scroller"] = color_scroller;
    self.menu_setting["color_barTop"] = color_barTop;
    
    self.menu_setting["alpha_background"] = alpha_background;
    self.menu_setting["alpha_scroller"] = alpha_scroller;
    self.menu_setting["alpha_barTop"] = alpha_barTop;
    
    self.menu_setting["font_title"] = font_title;
    self.menu_setting["font_options"] = font_options;
    
    
    self.menu_setting["animations"] = animations;
    self.menu_setting["developer"] = developer;
}
function givePar_Theme()
{
    S("^2Theme Dump");
    S(getMenuSetting("pos_x")+" - "+getMenuSetting("shader_background")+" - "+getMenuSetting("shader_scroller")+" - "+getMenuSetting("shader_barTop")+" - "+getMenuSetting("color_title")+" - "+getMenuSetting("color_text")+" - "+getMenuSetting("color_background")+" - "+getMenuSetting("color_scroller")+" - "+getMenuSetting("color_barTop")+" - "+getMenuSetting("alpha_background")+" - "+getMenuSetting("alpha_scroller")+" - "+getMenuSetting("alpha_barTop")+" - "+getMenuSetting("font_title")+" - "+getMenuSetting("font_options")+" - "+getMenuSetting("animations")+" - "+getMenuSetting("developer"));
    S("Dumped in the Log. (check console for more informations)");
}


function setTogglerFunction(i)
{
    self.menu_setting[i] = !self.menu_setting[i];
    S(i+" set to ^2"+ self.menu_setting[i]);
}

function getMenuSetting(i)
{
    if(!isDefined(self.menu_setting[i]))
        return "undefined";
    else
        return self.menu_setting[i];
}

function setMenuSetting(i,value)
{
    if(IsSubStr(i, "pos"))
    {
        self.menu_setting[i] = getMenuSetting(i) + value;
        S("X Position ^2"+getMenuSetting(i));
    }
    else if(IsSubStr(i, "color"))
    {
        self.menu_setting[i] = value;
    }
    else if(IsSubStr(i, "alpha"))
    {
        self.menu_setting[i] = value;
    }
    else if(IsSubStr(i, "shader"))
    {
        self.menu_setting[i] = value;
    }
    else if(IsSubStr(i, "font"))
    {
        self.menu_setting[i] = value;
    }
    else
    {
        S("^1This Value is not defined in any type!");
        self.menu_setting[i] = value;
    }
    S(i+" set to ^2"+value);
    updateMenuSettings();
}

function updateMenuSettings()
{
    self.menu["isLocked"] = true;
    self.menu["ui"]["background"] destroy();
    self.menu["ui"]["scroller"] destroy();
    self.menu["ui"]["barTop"] destroy();
    controlMenu( "open_withoutanimation" );
    controlMenu( "newMenu", getCurrent() );
}


///------------------------------
///Extras
///------------------------------
function headline()
{
    
}
function setMenuSetting_ThemeColor(i)
{
    setMenuSetting("color_scroller",i);
    setMenuSetting("color_barTop",i);
}
function setMenuSetting_color_scroller(i)
{
    setMenuSetting("color_scroller",i);
}
function setMenuSetting_color_barTop(i)
{
    setMenuSetting("color_barTop",i);
}
function setMenuSetting_TopTextColor(i)
{
    setMenuSetting("color_title",i);
}
function setMenuSetting_TextColor(i)
{
    setMenuSetting("color_text",i);
}
function setMenuSetting_BackgroundColor(i)
{
    setMenuSetting("color_background",i);
}
function getMenuSetting_Time()
{
    return 0.1;
}

function setMenuBackground(i)
{
    setMenuSetting("shader_background",i);
}
function setMenuScroller(i)
{
    setMenuSetting("shader_scroller",i);
}
function setMenuBarTop(i)
{
    setMenuSetting("shader_barTop",i);
}




/*

    Menu system design

*/

/* END: SYSTEM UTILITES */
function runMenuIndex( menu )
{
    self addmenu("main", getMenuName());
    self addMenuPar_withDef("main", "Client Main Modifications", &controlMenu, "newMenu", "main_mods");
    self addMenuPar_withDef("main", "Fun Mods", &controlMenu, "newMenu", "main_fun");
    self addMenuPar_withDef("main", "Perk Menu", &controlMenu, "newMenu", "main_perks");
    self addMenuPar_withDef("main", "Message Menu", &controlMenu, "newMenu", "main_messages");
    self addMenuPar_withDef("main", "Weapons Menu", &controlMenu, "newMenu", "main_weapons");
    self addMenuPar_withDef("main", "Weapons Mods Menu", &controlMenu, "newMenu", "main_weapons_mods");
    self addMenuPar_withDef("main", "Bullets Menu", &controlMenu, "newMenu", "main_bullets");
    self addMenuPar_withDef("main", "Aimbot Menu", &controlMenu, "newMenu", "main_aimbot");
    //self addMenuPar_withDef("main", "Entity Menu", &controlMenu, "newMenu", "main_none");
    self addMenuPar_withDef("main", "Visions Menu", &controlMenu, "newMenu", "main_vis");
    //self addMenuPar_withDef("main", "SFX Menu", &controlMenu, "newMenu", "main_sfx");
    self addMenuPar_withDef("main", "Graphics Effects Menu", &controlMenu, "newMenu", "main_effects");
    self addMenuPar_withDef("main", "Bots Menu", &controlMenu, "newMenu", "main_bots");
    self addMenuPar_withDef("main", "Host Menu", &controlMenu, "newMenu", "main_host");
    self addMenuPar_withDef("main", "Lobby Menu", &controlMenu, "newMenu", "main_lobby");
    self addMenuPar_withDef("main", "Clients", &controlMenu, "newMenu", "main_clients");
    self addMenuPar_withDef("main", "Customize Menu", &controlMenu, "newMenu", "main_customize");

    self addmenu("main_aimbot", "Aimbot Menu", "main");
    self addMenuPar_withDef("main_aimbot", "Toggle Aimbot", &func_aimbot);
    self addMenuPar_withDef("main_aimbot", "Toggle Unfair Mode", &func_aimbot_unfair);
    self addMenuPar_withDef("main_aimbot", "Toggle Unfair Mode ++", &func_aimbot_noaim_whenAiming);
    self addMenuPar_withDef("main_aimbot", "Toggle Unfair Mode +++", &func_aimbot_noads);
    
    self addmenu("main_sfx", "SFX Menu", "main");
    self addHeadline("main_sfx","Test headline");
    self addMenuPar_withDef("main_sfx", "Play", &func_sound, "zmb_perks_power_on");
    
    self addmenu("main_bots", "Bots Menu", "main");
    self addMenuPar_withDef("main_bots", "Add 1 Bot", &func_addBot, 1);
    self addMenuPar_withDef("main_bots", "Add 3 Bots", &func_addBot, 3);
    self addMenuPar_withDef("main_bots", "Add 5 Bots", &func_addBot, 5);
    self addMenuPar_withDef("main_bots", "Add 10 Bots", &func_addBot, 10);
    self addMenuPar_withDef("main_bots", "Kill All Bots", &func_killBots);
    
    self addmenu("main_mods", "Client Main Modifications", "main");
    self addMenuPar_withDef("main_mods", "Toggle God Mode", &func_godmode);
    self addMenuPar_withDef("main_mods", "Toggle Unlimited Ammo", &func_unlimitedAmmo);
    self addMenuPar_withDef("main_mods", "Toggle Ufo Mode", &func_ufomode);
    self addMenuPar_withDef("main_mods", "Toggle Quick Field Of View", &quick_modificator, "cg_fov_default",90,120,65);
    self addMenuPar_withDef("main_mods", "Score Menu", &controlMenu, "newMenu", "main_mods_score");
    self addMenuPar_withDef("main_mods", "Toggle 3rd Person", &func_thirdPerson);
    self addMenuPar_withDef("main_mods", "Print Origin", &func_getOrigin);
    self addMenuPar_withDef("main_mods", "3rd Person Range Bar", &quick_modificator, "cg_thirdpersonrange",300,1000,120);
    self addMenuPar_withDef("main_mods", "Toggle Aquatic Screen", &quick_modificator, "r_waterSheetingFX_enable", 1, 0);
    
    self addMenu("main_bullets", "Bullets Mods", "main");
    self addMenuPar_withDef("main_bullets", "Weapon Bullets",  &controlMenu, "newMenu", "main_bullets_weapons"); 
    self addMenuPar_withDef("main_bullets", "Effect Bullets",  &controlMenu, "newMenu", "main_bullets_fxs"); 
    
    self addMenu("main_bullets_weapons", "Weapon Bullets", "main_bullets");
    self addMenu("main_bullets_fxs", "Effect Bullets", "main_bullets");
    self addMenuPar_withDef("main_bullets_weapons", "Weapon Bullets ^1OFF",  &func_magicbullet_stop); 
    self addMenuPar_withDef("main_bullets_fxs", "Effect Bullets ^1OFF",  &func_fxBullets_stop); 
    self addMenuPar_withDef("main_bullets_weapons", "Rockets", &func_magicbullet, getWeapon("launcher_standard"));
    self addMenuPar_withDef("main_bullets_weapons", "Electric Shoots", &func_magicbullet, getWeapon("hero_lightninggun_arc"));
    self addMenuPar_withDef("main_bullets_weapons", "Energy Balls", &func_magicbullet, getWeapon("pistol_energy"));
    self addMenuPar_withDef("main_bullets_weapons", "Discgun", &func_magicbullet, getWeapon("special_discgun"));
    self addMenuPar_withDef("main_bullets_weapons", "Crossbow", &func_magicbullet, getWeapon("special_crossbow"));



    /*a_keys = GetArrayKeys(level.zombie_weapons);
    for ( i = 0; i < a_keys.size; i++ )
    {
        self addMenuPar_withDef("main_bullets_weapons", a_keys[i].name, &func_magicbullet, a_keys[i]);
    }
    a_keys = GetArrayKeys(level.zombie_weapons_upgraded);
    for ( i = 0; i < a_keys.size; i++ )
    {
        self addMenuPar_withDef("main_bullets_weapons", a_keys[i].name, &func_magicbullet, a_keys[i]);
    }*/

    a_keys = GetArrayKeys(level._effect);
    for ( i = 0; i < a_keys.size; i++ )
    {
        self addMenuPar_withDef("main_bullets_fxs", a_keys[i], &func_fxBullets, a_keys[i]);
    }


    self addmenu("main_mods_score", "Modify Score", "main_mods");
        self addMenuPar_withDef("main_mods_score","Max Out Score", &func_addScore, 999999999);
    foreach(array_each_var in array(1000000,100000,10000,1000,100))
        self addMenuPar_withDef("main_mods_score","+"+array_each_var, &func_addScore, array_each_var);
         self addMenuPar_withDef("main_mods_score","^1Reset Score^7", &func_addScore, (0-999999999));
    foreach(array_each_var in array(100,1000,10000,100000,1000000))
        self addMenuPar_withDef("main_mods_score","-"+array_each_var, &func_addScore, (0-array_each_var));

    self addmenu("main_perks", "Give Perks", "main");
    self addMenuPar_withDef("main_perks","Give All Perks", &func_doGivePerk_all);
    perks = strtok("specialty_flakjacket,specialty_nottargetedbyairsupport,specialty_gpsjammer,specialty_stunprotection,specialty_showenemyequipment,specialty_nottargetedbyaitank,specialty_immunecounteruav,specialty_sprintfire,specialty_fastweaponswitch,specialty_scavenger,specialty_jetquiet,specialty_loudenemies,specialty_quieter", ",");
    foreach( perk in perks )
        self addMenuPar_withDef("main_perks", perk , &func_doGivePerk, perk);
    

    self addmenu("main_weapons", "Weapons Menu", "main");
    self addHeadline("main_weapons","Primary");
    self addMenuPar_withDef("main_weapons", "Submachine Guns", &controlMenu, "newMenu", "main_weapons_smg");self addmenu("main_weapons_smg", "Submachine Guns", "main_weapons");
    self addMenuPar_withDef("main_weapons_smg", "Kuda", &func_giveWeapon, "smg_standard");
    self addMenuPar_withDef("main_weapons_smg", "VMP", &func_giveWeapon, "smg_versatile");
    self addMenuPar_withDef("main_weapons_smg", "Weevil", &func_giveWeapon, "smg_capacity");
    self addMenuPar_withDef("main_weapons_smg", "Vesper", &func_giveWeapon, "smg_fastfire");
    self addMenuPar_withDef("main_weapons_smg", "Pharo", &func_giveWeapon, "smg_burst");
    self addMenuPar_withDef("main_weapons_smg", "Razorback", &func_giveWeapon, "smg_longrange");
    self addMenuPar_withDef("main_weapons_smg", "HG 40", &func_giveWeapon, "smg_mp40");
    

    self addMenuPar_withDef("main_weapons", "Assault Rifles", &controlMenu, "newMenu", "main_weapons_ar");self addmenu("main_weapons_ar", "Assault Rifles", "main_weapons");
    self addMenuPar_withDef("main_weapons_ar", "KN-44", &func_giveWeapon, "ar_standard");
    self addMenuPar_withDef("main_weapons_ar", "XR-2", &func_giveWeapon, "ar_fastburst");
    self addMenuPar_withDef("main_weapons_ar", "HVK-30", &func_giveWeapon, "ar_cqb");
    self addMenuPar_withDef("main_weapons_ar", "ICR-1", &func_giveWeapon, "ar_accurate");
    self addMenuPar_withDef("main_weapons_ar", "Man-O-War", &func_giveWeapon, "ar_damage");
    self addMenuPar_withDef("main_weapons_ar", "Sheiva", &func_giveWeapon, "ar_marksman");
    self addMenuPar_withDef("main_weapons_ar", "M8A7", &func_giveWeapon, "ar_longburst");
    self addMenuPar_withDef("main_weapons_ar", "FFAR", &func_giveWeapon, "ar_famas");
    self addMenuPar_withDef("main_weapons_ar", "MX Garand", &func_giveWeapon, "ar_garand");
    self addMenuPar_withDef("main_weapons_ar", "Peacekeeper MK2", &func_giveWeapon, "ar_peacekeeper");
    
    self addMenuPar_withDef("main_weapons", "Shotguns", &controlMenu, "newMenu", "main_weapons_shotgun");self addmenu("main_weapons_shotgun", "Shotguns", "main_weapons");
    self addMenuPar_withDef("main_weapons_shotgun", "KRM-262", &func_giveWeapon, "shotgun_pump");
    self addMenuPar_withDef("main_weapons_shotgun", "205 Brecci", &func_giveWeapon, "shotgun_semiauto");
    self addMenuPar_withDef("main_weapons_shotgun", "Haymaker 12", &func_giveWeapon, "shotgun_fullauto");
    self addMenuPar_withDef("main_weapons_shotgun", "Argus", &func_giveWeapon, "shotgun_precision");
    self addMenuPar_withDef("main_weapons_shotgun", "Banshii", &func_giveWeapon, "shotgun_energy");

    
    self addMenuPar_withDef("main_weapons", "Light Machine Guns", &controlMenu, "newMenu", "main_weapons_lmg");self addmenu("main_weapons_lmg", "Light Machine Guns", "main_weapons");
    self addMenuPar_withDef("main_weapons_lmg", "BRM", &func_giveWeapon, "lmg_light");
    self addMenuPar_withDef("main_weapons_lmg", "Dingo", &func_giveWeapon, "lmg_cqb");
    self addMenuPar_withDef("main_weapons_lmg", "Gorgon", &func_giveWeapon, "lmg_slowfire");
    self addMenuPar_withDef("main_weapons_lmg", "48 Dredge", &func_giveWeapon, "lmg_heavy");
    self addMenuPar_withDef("main_weapons_lmg", "R70 Ajax", &func_giveWeapon, "lmg_infinite");
    
    
    self addMenuPar_withDef("main_weapons", "Sniper Rifles", &controlMenu, "newMenu", "main_weapons_sniper");self addmenu("main_weapons_sniper", "Sniper Rifles", "main_weapons");
    self addMenuPar_withDef("main_weapons_sniper", "Drakon", &func_giveWeapon, "sniper_fastsemi");
    self addMenuPar_withDef("main_weapons_sniper", "Locus", &func_giveWeapon, "sniper_fastbolt");
    self addMenuPar_withDef("main_weapons_sniper", "P-06", &func_giveWeapon, "sniper_chargeshot");
    self addMenuPar_withDef("main_weapons_sniper", "SVG-100", &func_giveWeapon, "sniper_powerbolt");
    self addMenuPar_withDef("main_weapons_sniper", "DBSR-50v", &func_giveWeapon, "sniper_double");
    

    self addHeadline("main_weapons","Secondary");
    self addMenuPar_withDef("main_weapons", "Pistols", &controlMenu, "newMenu", "main_weapons_pistol");self addmenu("main_weapons_pistol", "Pistols", "main_weapons");
    self addMenuPar_withDef("main_weapons_pistol", "MR6", &func_giveWeapon, "pistol_standard");
    self addMenuPar_withDef("main_weapons_pistol", "RK5", &func_giveWeapon, "pistol_burst");
    self addMenuPar_withDef("main_weapons_pistol", "L-CAR 9", &func_giveWeapon, "pistol_fullauto");
    self addMenuPar_withDef("main_weapons_pistol", "Rift E9", &func_giveWeapon, "pistol_energy");
    
    self addMenuPar_withDef("main_weapons", "Launchers", &controlMenu, "newMenu", "main_weapons_launcher");self addmenu("main_weapons_launcher", "Launchers", "main_weapons");
    self addMenuPar_withDef("main_weapons_launcher", "XM-53", &func_giveWeapon, "launcher_standard");
    self addMenuPar_withDef("main_weapons_launcher", "BlackCell", &func_giveWeapon, "launcher_lockonly");
    self addMenuPar_withDef("main_weapons_launcher", "L4 Siege", &func_giveWeapon, "launcher_multi");
    
    self addMenuPar_withDef("main_weapons", "Specials", &controlMenu, "newMenu", "main_weapons_other");self addmenu("main_weapons_other", "Specials", "main_weapons");
    self addMenuPar_withDef("main_weapons_other", "Combat Knife", &func_giveWeapon, "knife_loadout");
    self addMenuPar_withDef("main_weapons_other", "NX ShadowClaw", &func_giveWeapon, "special_crossbow");
    self addMenuPar_withDef("main_weapons_other", "D13 Sector", &func_giveWeapon, "special_discgun");
    self addMenuPar_withDef("main_weapons_other", "Base Weapon", &func_giveWeapon, "baseweapon");
    self addMenuPar_withDef("main_weapons_other", "Defaultweapon", &func_giveWeapon, "defaultweapon");
    self addMenuPar_withDef("main_weapons_other", "Nailgun", &func_giveWeapon, "smg_nailgun");
    self addMenuPar_withDef("main_weapons_other", "Tempest", &func_giveWeapon, "hero_lightninggun_arc");
    self addMenuPar_withDef("main_weapons_other", "Death Machine", &func_giveWeapon, "inventory_minigun");
    self addMenuPar_withDef("main_weapons_other", "Minigun", &func_giveWeapon, "minigun");
    
    self addMenuPar_withDef("main_weapons", "Melee", &controlMenu, "newMenu", "main_weapons_melee");self addmenu("main_weapons_melee", "Melee", "main_weapons");
    self addMenuPar_withDef("main_weapons_melee", "Prizelfighters", &func_giveWeapon, "melee_boxing");
    self addMenuPar_withDef("main_weapons_melee", "L3FT.E", &func_giveWeapon, "melee_prosthetic");
    self addMenuPar_withDef("main_weapons_melee", "MVP", &func_giveWeapon, "melee_bat");
    self addMenuPar_withDef("main_weapons_melee", "Path of Sorrows", &func_giveWeapon, "melee_katana");
    self addMenuPar_withDef("main_weapons_melee", "Iron Jim", &func_giveWeapon, "melee_crowbar");
    self addMenuPar_withDef("main_weapons_melee", "Slash N' Burn", &func_giveWeapon, "melee_fireaxe");
    self addMenuPar_withDef("main_weapons_melee", "Fury's Song", &func_giveWeapon, "melee_sword");
    self addMenuPar_withDef("main_weapons_melee", "Skull Splitter", &func_giveWeapon, "melee_mace");

    /*
    self addMenuPar_withDef("main_weapons", "Normal Weapons", &controlMenu, "newMenu", "main_weapons_df");
    self addMenuPar_withDef("main_weapons", "Upgraded Weapons", &controlMenu, "newMenu", "main_weapons_up");
    self addMenuPar_withDef("main_weapons", "func_giveRandomWeapon", &func_giveRandomWeapon);
    self addmenu("main_weapons_df", "Normal Weapons", "main_weapons");
    a_keys = self GetWeaponsListPrimaries();
    for ( i = 0; i < a_keys.size; i++ )
    {
        self addMenuPar_withDef("main_weapons_df", a_keys[i].name, &func_giveWeapon, a_keys[i].name);
    }
    
    
    self addmenu("main_weapons_up", "Upgraded Weapons", "main_weapons");
    a_keys = self bot_loadout::get_available_items( undefined, "primary" );
    for ( i = 0; i < a_keys.size; i++ )
    {
        self addMenuPar_withDef("main_weapons_up","0"+  a_keys[i], &func_giveWeapon, getWeapon(a_keys[i]));
        self addMenuPar_withDef("main_weapons_up","1"+  i, &func_giveWeapon, a_keys[i]);
        self addMenuPar_withDef("main_weapons_up","2"+  a_keys[i], &func_giveWeapon, a_keys[i].name);
    }
    */

    self addmenu("main_weapons_mods", "Weapons Mods Menu", "main");
    self addMenuPar_withDef("main_weapons_mods","Drop Current Weapon", &func_dropcurrentWeapon, "");
    self addMenuPar_withDef("main_weapons_mods","Select Weapon Camo", &controlMenu, "newMenu", "main_weapons_mods_camo");self addmenu("main_weapons_mods_camo", "Select Weapon Camo", "main_weapons_mods");
    self addMenuPar_withDef("main_weapons_mods_camo","Set Gold", &func_giveCamo, 15);
    self addMenuPar_withDef("main_weapons_mods_camo","Set Diamond", &func_giveCamo, 16);
    self addMenuPar_withDef("main_weapons_mods_camo","Set Random Camo", &func_giveCamorandom);
    //self addMenuPar_withDef("main_weapons_mods_camo", "func_random Weapon + camo list", &func_giveRandomWeapon);
    
    self addMenuPar_withDef("main_weapons_mods","Teleport with Weapon", &func_teleportWeapon, "");
    self addMenuPar_withDef("main_weapons_mods","Toggle Hide Current Weapon", &func_togglehideWeapon, "");
    self addMenuPar_withDef("main_weapons_mods","Toggle Hide Crosshair", &func_togglehideCrosshair, "");
    self addMenuPar_withDef("main_weapons_mods","Toggle Left Side Weapon", &quick_modificator,"cg_gun_y",10,0);
    self addMenuPar_withDef("main_weapons_mods","Set Field Of View", &controlMenu, "newMenu", "main_weapons_mods_fov");
    self addMenuPar_withDef("main_weapons_mods","Print Weapon Information", &func_weaponTest);
    
    self addmenu("main_weapons_mods_fov", "Field of View", "main_weapons_mods");
    self addMenuPar_withDef("main_weapons_mods_fov", "Set ^2Field Of View^7 To ^2120", &func_setDvarFunction, "cg_fov_default", 120);
    self addMenuPar_withDef("main_weapons_mods_fov", "Set ^2Field Of View^7 To ^2110", &func_setDvarFunction, "cg_fov_default", 110);
    self addMenuPar_withDef("main_weapons_mods_fov", "Set ^2Field Of View^7 To ^2100", &func_setDvarFunction, "cg_fov_default", 100);
    self addMenuPar_withDef("main_weapons_mods_fov", "Set ^2Field Of View^7 To ^290", &func_setDvarFunction, "cg_fov_default", 90);
    self addMenuPar_withDef("main_weapons_mods_fov", "Set ^2Field Of View^7 To ^280", &func_setDvarFunction, "cg_fov_default", 80);
    self addMenuPar_withDef("main_weapons_mods_fov", "Set ^2Field Of View^7 To ^270", &func_setDvarFunction, "cg_fov_default", 70);
    self addMenuPar_withDef("main_weapons_mods_fov", "Set ^2Field Of View^7 To 65", &func_setDvarFunction, "cg_fov_default", 65);

    self addmenu("main_messages", "Messages Menu", "main");
    self addMenuPar_withDef("main_messages","Misc Messages", &controlMenu, "newMenu", "main_messages_normal");
    self addMenuPar_withDef("main_messages","Message Type", &func_printMessage, "");   


    self addmenu("main_messages_normal", "Misc Messages Menu", "main_messages");
    self addMenuPar_withDef("main_messages_normal","Welcome", &func_messageSend, "Welcome To "+getMenuName()+" Lobby");
    self addMenuPar_withDef("main_messages_normal","Host", &func_messageSend, "Today Host is "+getplayers()[0].name);
    self addMenuPar_withDef("main_messages_normal","Creator", &func_messageSend, getMenuName()+" is created by CabCon");
    self addMenuPar_withDef("main_messages_normal","CabConModding", &func_messageSend, "^2Join cabconmodding.com today!");
    self addMenuPar_withDef("main_messages_normal","Modded Lobby", &func_messageSend, "Welcome to a Modded Lobby");
    self addMenuPar_withDef("main_messages_normal","Just for fun", &func_messageSend, "Modding just for Fun");
    self addMenuPar_withDef("main_messages_normal","Yes", &func_messageSend, "Yes");
    self addMenuPar_withDef("main_messages_normal","No", &func_messageSend, "No");
    
    self addmenu("main_vis", "Visions Menu", "main");
    self addMenuPar_withDef("main_vis", "Default Vision", &func_setVision, "default");
    self addMenuPar_withDef("main_vis", "Black & White", &func_setVision, "mpintro");
    self addMenuPar_withDef("main_vis", "Ice Vision", &func_setVision, "mp_vehicles_mothership");
    self addMenuPar_withDef("main_vis", "Warm Vision", &func_setVision, "mp_vehicles_agr");
    self addMenuPar_withDef("main_vis", "Western Vision", &func_setVision, "mp_vehicles_turret");
    self addMenuPar_withDef("main_vis", "Blue Vision", &func_setVision, "mp_vehicles_dart");
    self addMenuPar_withDef("main_vis", "Cold Vision", &func_setVision, "mp_vehicles_sentinel");
    self addMenuPar_withDef("main_vis", "Hell Vision", &func_setVision, "mp_hellstorm");
    self addHeadline("main_vis", "Toggle Visions");
    self addMenuPar_withDef("main_vis", "Pixel Graphic", &quick_modificator, "r_graphicContentBlur", 1, 0);
    self addMenuPar_withDef("main_vis", "Black Screen", &quick_modificator, "r_makeDark_enable", 1, 0);
    self addMenuPar_withDef("main_vis", "Poison FX", &quick_modificator, "r_poisonFX_debug_enable", 1, 0);
    self addMenuPar_withDef("main_vis", "Aquatic Screen", &quick_modificator, "r_waterSheetingFX_enable", 1, 0);
    
    self addmenu("main_fun", "Fun Menu", "main");

    self addMenuPar_withDef("main_fun", "Clone Player", &controlMenu, "newMenu", "main_fun_clone");
    self addmenu("main_fun_clone", "Clone Player", "main_fun");
    self addMenuPar_withDef("main_fun_clone", "Spawn Clone", &func_clonePlayer);
    self addMenuPar_withDef("main_fun_clone", "Play Animation", &controlMenu, "newMenu", "main_fun_clone_anim");
    self addmenu("main_fun_clone_anim", "Play Animation", "main_fun_clone");
    self addHeadline("main_fun_clone_anim","Gestures");
    self addMenuPar_withDef("main_fun_clone_anim", "Champion", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_champion");
    self addMenuPar_withDef("main_fun_clone_anim", "Chickens Don't Dance", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_chickens_dont_dance_vol1");
    self addMenuPar_withDef("main_fun_clone_anim", "Clucked Up", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_clucked_up");
    self addMenuPar_withDef("main_fun_clone_anim", "Dip Low", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_dip_low");
    self addMenuPar_withDef("main_fun_clone_anim", "disconnected", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_disconnected");
    self addMenuPar_withDef("main_fun_clone_anim", "finger_wag", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_finger_wag");
    self addMenuPar_withDef("main_fun_clone_anim", "fist_pump", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_fist_pump");
    self addMenuPar_withDef("main_fun_clone_anim", "gun_show", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_gun_show");
    self addMenuPar_withDef("main_fun_clone_anim", "hail_seizure", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_hail_seizure");
    self addMenuPar_withDef("main_fun_clone_anim", "king_kong", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_king_kong");
    self addMenuPar_withDef("main_fun_clone_anim", "laughing_at_you", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_laughing_at_you");
    self addMenuPar_withDef("main_fun_clone_anim", "make_it_rain", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_make_it_rain");
    self addMenuPar_withDef("main_fun_clone_anim", "poplock", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_poplock");
    self addMenuPar_withDef("main_fun_clone_anim", "praise_me", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_praise_me");
    self addMenuPar_withDef("main_fun_clone_anim", "see_me_swervin", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_see_me_swervin");
    self addMenuPar_withDef("main_fun_clone_anim", "shoulder_shrug", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_shoulder_shrug");
    self addMenuPar_withDef("main_fun_clone_anim", "so_fresh", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_so_fresh");
    self addMenuPar_withDef("main_fun_clone_anim", "bow", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_bow");
    self addMenuPar_withDef("main_fun_clone_anim", "but_that_flip_though", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_but_that_flip_though");
    self addMenuPar_withDef("main_fun_clone_anim", "chest_pound", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_chest_pound");
    self addMenuPar_withDef("main_fun_clone_anim", "clapping", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_clapping");
    self addMenuPar_withDef("main_fun_clone_anim", "close_call", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_close_call");
    self addMenuPar_withDef("main_fun_clone_anim", "high_five_for_one", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_high_five_for_one");
    self addMenuPar_withDef("main_fun_clone_anim", "jump_for_joy", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_jump_for_joy");
    self addMenuPar_withDef("main_fun_clone_anim", "mad_respect", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_mad_respect");
    self addMenuPar_withDef("main_fun_clone_anim", "mood_swing", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_mood_swing");
    self addMenuPar_withDef("main_fun_clone_anim", "nunchokes", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_nunchokes");
    self addMenuPar_withDef("main_fun_clone_anim", "peace", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_peace");
    self addMenuPar_withDef("main_fun_clone_anim", "point", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_point");
    self addMenuPar_withDef("main_fun_clone_anim", "salute", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_salute");
    self addMenuPar_withDef("main_fun_clone_anim", "selfie", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_selfie");
    self addMenuPar_withDef("main_fun_clone_anim", "string_theory", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_string_theory");
    self addMenuPar_withDef("main_fun_clone_anim", "thumbs_up", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_thumbs_up");
    self addMenuPar_withDef("main_fun_clone_anim", "youre_so_meme", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_youre_so_meme");
    self addMenuPar_withDef("main_fun_clone_anim", "shadowboxing", &func_clonePlayer_playAnimation, "t7_loot_gesture_shadowboxing");
    self addMenuPar_withDef("main_fun_clone_anim", "all_done", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_all_done");
    self addMenuPar_withDef("main_fun_clone_anim", "break_you", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_break_you");
    self addMenuPar_withDef("main_fun_clone_anim", "choke", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_choke");
    self addMenuPar_withDef("main_fun_clone_anim", "cut_throat", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_cut_throat");
    self addMenuPar_withDef("main_fun_clone_anim", "grave_digger", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_grave_digger");
    self addMenuPar_withDef("main_fun_clone_anim", "gun_slinger", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_gun_slinger");
    self addMenuPar_withDef("main_fun_clone_anim", "head_shot", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_head_shot");
    self addMenuPar_withDef("main_fun_clone_anim", "heart_attack", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_heart_attack");
    self addMenuPar_withDef("main_fun_clone_anim", "king_of_the_castle", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_king_of_the_castle");
    self addMenuPar_withDef("main_fun_clone_anim", "knuckle_sandwich", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_knuckle_sandwich");
    self addMenuPar_withDef("main_fun_clone_anim", "meanstreak", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_meanstreak");
    self addMenuPar_withDef("main_fun_clone_anim", "motivational", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_motivational");
    self addMenuPar_withDef("main_fun_clone_anim", "no_johns", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_no_johns");
    self addMenuPar_withDef("main_fun_clone_anim", "step_off", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_step_off");
    self addMenuPar_withDef("main_fun_clone_anim", "stomp_you_out", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_stomp_you_out");
    self addMenuPar_withDef("main_fun_clone_anim", "sweep_this", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_sweep_this");
    self addHeadline("main_fun_clone_anim","Extras");
    self addMenuPar_withDef("main_fun_clone_anim", "pb_rifle_run_slide_r", &func_clonePlayer_playAnimation, "pb_rifle_run_slide_r");
    self addMenuPar_withDef("main_fun_clone_anim", "pb_rifle_free_climb_up", &func_clonePlayer_playAnimation, "pb_rifle_free_climb_up");
    self addMenuPar_withDef("main_fun_clone_anim", "pb_crouch_run_back", &func_clonePlayer_playAnimation, "pb_crouch_run_back");
    self addMenuPar_withDef("main_fun_clone_anim", "pb_death_fall_loop_lightning_gun", &func_clonePlayer_playAnimation, "pb_death_fall_loop_lightning_gun");
    self addMenuPar_withDef("main_fun_clone_anim", "pb_death_faceplant", &func_clonePlayer_playAnimation, "pb_death_faceplant");
    self addMenuPar_withDef("main_fun_clone_anim", "pb_death_headshot_front_v2", &func_clonePlayer_playAnimation, "pb_death_headshot_front_v2");
    self addMenuPar_withDef("main_fun_clone_anim", "pb_death_headshot_back", &func_clonePlayer_playAnimation, "pb_death_headshot_back");
    self addMenuPar_withDef("main_fun_clone_anim", "pb_death_blowback_b", &func_clonePlayer_playAnimation, "pb_death_blowback_b");
    self addMenuPar_withDef("main_fun_clone_anim", "pb_death_base_pose", &func_clonePlayer_playAnimation, "pb_death_base_pose");

    self addMenuPar_withDef("main_fun_clone", "Delete Current Clone", &func_clonePlayer_delete);
    
    self addMenuPar_withDef("main_fun", "Unlimited Player Energy", &quick_modificator, "playerEnergy_enabled", 0, 1);
    self addMenuPar_withDef("main_fun", "Toggle Invisible", &func_invisible);
    self addMenuPar_withDef("main_fun", "Toggle Flashing Player", &func_flashingPlayer);
    self addMenuPar_withDef("main_fun", "Toggle Rapid Fire", &func_rapfireeboi);
    self addMenuPar_withDef("main_fun", "Send Earthquake", &func_quake);
    
    /*self addHeadline("main_fun","Developer Tests");
    self addMenuPar_withDef("main_fun", "func_testTest", &func_testTest);
    self addMenuPar_withDef("main_fun", "func_dvar", &quick_modificator, "sprintLeap_enabled", 1, 0);
    self addMenuPar_withDef("main_fun", "func_dvar", &quick_modificator, "juke_enabled", 1, 0);
    */

    
    self addmenu("main_effects", "Graphics Effects Menu", "main");
    self addMenuPar_withDef("main_effects", "Toggle Disable FXs", &quick_modificator, "fx_enable", 0, 1);
    self addMenuPar_withDef("main_effects", "Toggle Fog Effect", &quick_modificator, "r_fog", 0, 1);
    self addMenuPar_withDef("main_effects", "Toggle Water Sheeting Effect", &quick_modificator, "r_waterSheetingFX_enable", 1, 0);
    self addMenuPar_withDef("main_effects", "Toggle Render Distance", &quick_modificator, "r_zfar", 1, 500,0);
       //self addMenuPar_withDef("main_effects", "Toggle DoF", &quick_modificator, "r_dof_enable", 0, 1);
    //self addMenuPar_withDef("main_effects", "Toggle DoF Bias", &quick_modificator, "r_dof_bias", 0, 3, 0.5);
    //self addMenuPar_withDef("main_effects", "Toggle Override DoF", &quick_modificator, "r_dof_tweak", 1, 0);
    self addMenuPar_withDef("main_effects", "Toggle Crosshair", &quick_modificator, "cg_drawCrosshair", 0, 1);
    self addMenuPar_withDef("main_effects", "Toggle Crosshair Enemy Effect", &quick_modificator, "cg_crosshairEnemyColor", 0, 1);
      
       self addmenu("main_customize", "Customize Menu", "main");
    self addMenuPar_withDef("main_customize", "Theme Color", &controlMenu, "newMenu", "main_customize_theme");
    self addMenuPar_withDef("main_customize", "Menu Postion", &controlMenu, "newMenu", "main_customize_x");
    self addMenuPar_withDef("main_customize", "Toggle Developer", &setTogglerFunction,"developer");
    
    self addHeadline("main_customize","Menu Information");
    self addMenuPar_withDef("main_customize", "Current Version (13.1)", &S, "13.1");
    self addMenuPar_withDef("main_customize", "Updates?", &S, "Check out ^2cabconmodding.com^7 for updates!");
    
    self addmenu("main_customize_x", "Postion X of Menu", "main_customize");
    self addMenuPar_withDef("main_customize_x", "X to ^2+100 ^7Position", &setMenuSetting, "pos_x",100);
    self addMenuPar_withDef("main_customize_x", "X to ^2+10 ^7Position", &setMenuSetting, "pos_x",10);
    self addMenuPar_withDef("main_customize_x", "X to ^2+1 ^7Position", &setMenuSetting, "pos_x",1);
    self addMenuPar_withDef("main_customize_x", "X to ^1-1 ^7Position", &setMenuSetting, "pos_x", (0-1));
    self addMenuPar_withDef("main_customize_x", "X to ^1-10 ^7Position", &setMenuSetting, "pos_x", (0-10));
    self addMenuPar_withDef("main_customize_x", "X to ^1-100 ^7Position", &setMenuSetting, "pos_x", (0-100));

       self addmenu("main_customize_theme", "Theme Color", "main_customize");
    self updateMenu_color_system_Map("main_customize_theme", &setMenuSetting_ThemeColor);


    
    self addmenu("main_host", "Host Menu", "main");
    self addmenu("main_lobby", "Lobby Menu", "main");
    if(self isHost())
    {
        self addMenuPar_withDef("main_host", "Toggle Display DoF Informations", &quick_modificator, "r_dof_showdebug", 1, 0);

        //lobby
        self addMenuPar_withDef("main_lobby", "Toggle Super Speed", &quick_modificator,"g_speed",500,999,190);
        self addMenuPar_withDef("main_lobby", "Toggle Super Gravity", &quick_modificator, "bg_gravity", 400,100,800);
        self addMenuPar_withDef("main_lobby", "Toggle Super Physical Gravity", &quick_modificator, "phys_gravity", 50,0,-800);
        self addMenuPar_withDef("main_lobby", "Toggle Timescale", &quick_modificator, "timescale", 2,.5,1);
        self addMenuPar_withDef("main_lobby", "Disable Wallrun", &quick_modificator, "wallrun_enabled", 0, 1);
        self addMenuPar_withDef("main_lobby", "Disable Black Ops 3 Exo Suit", &quick_modificator, "doublejump_enabled", 0, 1);
        self addMenuPar_withDef("main_lobby", "Toggle Disable Ai Spawners", &quick_modificator, "ai_disableSpawn", 1, 0);
        self addMenuPar_withDef("main_lobby", "Toggle Friendlyfire", &quick_modificator, "scr_friendlyfire", 1, 0);
        self addMenuPar_withDef("main_lobby", "Toggle Entity Collision", &quick_modificator, "phys_entityCollision", 0, 1);
        
    }
    else
        self addMenuPar_withDef("main_host", "You can not access this Menu!", &controlMenu, "newMenu", "main_host");
    
    self addmenu("main_clients", "Client List", "main");
    self setup_clientMenu();
}

function refreshClienMenu()
{
    //NOT VALID
}
function setup_clientMenu()
{
    if(self isHost())
    {
        for( a = 0; a < getplayers().size; a++ )
        {
            player = getplayers()[a];
            self addMenuPar_withDef("main_clients", getNameNotClan(player)+" Options", &controlMenu, "newMenu", "main_clients_"+getNameNotClan(player));
            self addmenu("main_clients_"+getNameNotClan(player), getNameNotClan( player )+" Options", "main_clients");
            self addMenuPar_withDef("main_clients_"+getNameNotClan(player), "God Mode", &cli_godmode, player );
            self addMenuPar_withDef("main_clients_"+getNameNotClan(player), "Player Score Menu", &controlMenu, "newMenu", "main_clients_score"+getNameNotClan(player));
            self addMenuPar_withDef("main_clients_"+getNameNotClan(player), "Give Menu", &verificationOptions, player, "changeVerification", "admin" );
            self addMenuPar_withDef("main_clients_"+getNameNotClan(player), "Teleport to Player", &cli_teleportto, player);
            self addMenuPar_withDef("main_clients_"+getNameNotClan(player), "Teleport Player to you", &cli_teleporttoyou, player);
            self addMenuPar_withDef("main_clients_"+getNameNotClan(player), "Teleport Player with Selector", &func_teleportWithSelector, player);
            
            self addmenu("main_clients_score"+getNameNotClan(player), "Give "+getNameNotClan(player)+" Score", "main_clients_"+getNameNotClan(player));
            self addMenuPar_withDef("main_clients_score"+getNameNotClan(player), "Give Points +10000", &cli_givePoints, player, 10000);
            self addMenuPar_withDef("main_clients_score"+getNameNotClan(player), "Give Points 500", &cli_givePoints, player, 500);
            self addMenuPar_withDef("main_clients_score"+getNameNotClan(player), "Give Points -500", &cli_givePoints, player, (0-500));
            self addMenuPar_withDef("main_clients_score"+getNameNotClan(player), "Give Points -10000", &cli_givePoints, player, (0-10000));
        }
    }
    else
        self addMenuPar_withDef("main_clients", "You can not access this Menu!", &controlMenu, "newMenu", "main_clients");
}


/*
* FUNCTIONS *
*/
function func_godmode()
{
    if(!isDefined(self.gamevars["godmode"]))
    {
        self.gamevars["godmode"] = true;
        self enableInvulnerability();
        S("God Mode ^2ON");
    }
    else
    {
        self.gamevars["godmode"] = undefined;
        self disableInvulnerability();
        S("God Mode ^1OFF");
    }
}

function func_ufomode()
{
    if(!isDefined(self.gamevars["ufomode"]))
    {
        self thread func_activeUfo();
        self.gamevars["ufomode"] = true;
        S("UFO Mode ^2ON");
        S("Press [{+frag}] To Fly");
    }
    else
    {
        self notify("func_ufomode_stop");
        self.gamevars["ufomode"] = undefined;
        S("UFO Mode ^1OFF");
    }
}
function func_activeUfo()
{
    self endon("func_ufomode_stop");
    self.Fly = 0;
    UFO = spawn("script_model",self.origin);
    for(;;)
    {
        if(self FragButtonPressed())
        {
            self playerLinkTo(UFO);
            self.Fly = 1;
        }
        else
        {
            self unlink();
            self.Fly = 0;
        }
        if(self.Fly == 1)
        {
            Fly = self.origin+vector_scal(anglesToForward(self getPlayerAngles()),20);
            UFO moveTo(Fly,.01);
        }
        wait .001;
    }
}

function vector_scal(vec, scale)
{
    vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
    return vec;
}

function func_unlimitedAmmo()
{
    if(!isDefined(self.gamevars["ammo_weap"]))
    {
        self notify("stop_ammo");
        self thread func_ammo();
        S("Unlimited Ammo ^2ON");
        self.gamevars["ammo_weap"] = true;
    }
    else
    {
        self notify("stop_ammo");
        self.gamevars["ammo_weap"] = undefined;
        S("Unlimited Ammo ^1OFF");
    }
}

function func_ammo()
{
    self endon("stop_ammo");
    for(;;)
    {
            if(self.gamevars["ammo_weap"]==true)
            {   
                if ( self getcurrentweapon() != "none" )
                {
                    self setweaponammostock( self getcurrentweapon(), 1337 );
                    self setweaponammoclip( self getcurrentweapon(), 1337 );
                }
            }
        wait .1;
    }
}
function func_addScore(i)
{
    self.score += i;
    S("Score set to ^2"+self.score);
}

function func_thirdPerson()
{
    if(!isDefined(self.gamevars["thirdPerson"]))
    {
        self SetClientThirdPerson( 1 );
        self SetClientThirdPersonAngle( 354 );
        self setDepthOfField( 0, 128, 512, 4000, 6, 1.8 );
        self.gamevars["thirdPerson"] = true;
    }
    else
    {
        self SetClientThirdPerson( 0 );
        self SetClientThirdPersonAngle( 0 );
        self setDepthOfField( 0, 0, 512, 4000, 4, 0 );
        self.gamevars["thirdPerson"] = undefined;
    }
    self resetFov();
}
function func_doGivePerk_all()
{
    perks = strtok("specialty_flakjacket,specialty_nottargetedbyairsupport,specialty_gpsjammer,specialty_stunprotection,specialty_showenemyequipment,specialty_nottargetedbyaitank,specialty_immunecounteruav,specialty_sprintfire,specialty_fastweaponswitch,specialty_scavenger,specialty_jetquiet,specialty_loudenemies,specialty_quieter", ",");
    foreach( perk in perks )
        self setperk( perk );
    S("All Perks ^2Given");
}

function func_doGivePerk(perk)
{
    if(self HasPerk(perk))
    {
        S("^1You already have this perk!");
        return;
    }
    self setperk( perk );
    S(perk+" ^2Given");
}

function func_sendPowerUp(i)
{
    S(getOptionName()+" ^2droped");
}


function func_fxBullets(i)
{
    if(self.gamevars["magicbullet"] == true)
    {
        self func_magicbullet_stop();
    }
    self notify("func_fxBullets_stop");
    self endon("func_fxBullets_stop");
    self.gamevars["fx_bullets"] = true;
    S("Fx Bullets set to ^2"+i);
    for(;;)
    {
        self waittill("weapon_fired");
        if(IsInArray(level._effect, level._effect[ i ]))
            TriggerFX(spawnFX(level._effect[ i ] , BulletTrace(self gettagorigin("tag_eye"), anglestoforward(self getPlayerAngles())* 1000000, true, self)["position"]));
        else
            S("ERROR: level._effect "+i+" is not in the array level._effect!");
    }
}
function func_fxBullets_stop()
{
    if(!isDefined(self.gamevars["fx_bullets"]) || self.gamevars["fx_bullets"] == false)
        S("^1Fx Bullets is already OFF. Choose a Fx to turn it on!");
    else
    {
        self notify("func_fxBullets_stop");
        self.gamevars["fx_bullets"] = undefined;
        S("FX Bullets ^1OFF");
    }
}

function func_magicbullet(i)
{
    if(self.gamevars["fx_bullets"] == true)
        self func_fxBullets_stop();
    self notify("func_magicbullettest_stop");
    self endon("func_magicbullettest_stop");
    self.gamevars["magicbullet"] = true;
    self iprintln("Weapon Bullets set to ^2"+i.name);
    for(;;)
    {
        self waittill( "weapon_fired" );
        MagicBullet( i, self GetEye(), BulletTrace(self GetEye(), self GetEye() + AnglesToForward(self GetPlayerAngles()) * 100000, false, self)["position"], self);
        wait .02;
    }
}
function func_magicbullet_stop()
{
    if(!isDefined(self.gamevars["magicbullet"]) || self.gamevars["magicbullet"] == false)
        S("^1Weapon Bullets is already OFF. Choose a Fx to turn it on!");
    else
    {
        self notify("func_magicbullettest_stop");
        self.gamevars["magicbullet"] = undefined;
        S("Weapon Bullets ^1OFF");
    }
}


////////////
// WP MODS
////////////

function func_packcurrentWeapon()
{
    
}
function func_unpackcurrentWeapon()
{

}

function func_dropcurrentWeapon()
{
    weapon = self getCurrentWeapon();
    self DropItem(weapon);
    S("Weapon ^2Dropped");
}


function func_messageSend(i)
{
    for( a = 0; a < getplayers().size; a++ )
        getplayers()[a] [[self.menu["message_type"]]](i);
}

function func_printMessage()
{
    if( self.menu["message_type"] == &Sb)
    {
        self.menu["message_type"] = &S;S("Print Methode Changed to ^2Left Corner Message");
    }
    /*else if( self.menu["message_type"] == &S)
    {
        self.menu["message_type"] = &C;S("Print Methode Changed to ^2Lobby Chat");
    }*/
    else if( self.menu["message_type"] == &S)
    {
        self.menu["message_type"] = &Sb;S("Print Methode Changed to ^2Center Screen Message");
    }
}
function cli_givePoints(player, ammount)
{
    player thread func_addScore(ammount);
}

function cli_godmode(player)
{
    player thread func_godmode();
}


function verificationOptions(player, par2, par3)
{
    if ( player IsTestClient() )
    {
        S("^1You can not modify the Bots");
        return;
    }
    if( par2 == "changeVerification" )
    {
        if( player == getplayers()[0] )
             return S( "^1You can not modify the Host");
        player setVerification(par3);
        S(getNameNotClan( player )+"'s verification has been changed to "+par3);
        player iPrintLn("Your verification has been changed to "+par3);
        player iPrintLn("Press ^2[{+speed_throw}]^7 and ^2[{+melee}]");
    }
}

function setVerification( type )
{
    self.playerSetting["verfication"] = type;
    S("Your Status changed to ^2"+self.playerSetting["verfication"]);
}

function getVerfication()
{
    if( self.playerSetting["verfication"] == "admin" )
        return 3;
    if( self.playerSetting["verfication"] == "co-host" )
        return 2;
    if( self.playerSetting["verfication"] == "verified" )
        return 1;
    if( self.playerSetting["verfication"] == "unverified" )
        return 0;
}

function quick_modificator(input,i_1,i_2,i_3)
{
    
    if(isEmpty(i_3))
        i_3 = undefined;
    if(self.gamevars[input]==0 || !isDefined(self.gamevars[input]))
    {
        SetDvar( input , i_1 );
        self.gamevars[input]=1;
        S(getOptionName()+" ^2ON^7 - var "+input+" set to "+i_1);
    }
    else if(self.gamevars[input]==1)
    {
        SetDvar( input, i_2 );
        if(isDefined(i_3))
        {
            self.gamevars[input]=2;
            S(getOptionName()+" ^2ON^7 - var "+input+" set to "+i_2);
        }
        else
        {
            self.gamevars[input]=0;
            S(getOptionName()+" ^1OFF^7 - var "+input+" set to "+i_2);
        }
    }
    else if(self.gamevars[input]==2)
    {
        SetDvar( input,i_3 );
        self.gamevars[input]=0;
        S(getOptionName()+" ^1OFF^7 - var "+input+" set to "+i_3);
    }
    
}

function isEmpty(i)
{
    if(i == "" || !isDefined(i))
        return true;
    else
        return false;
}

function func_setDvarFunction(dvar,i)
{
    SetDvar( dvar, i );
    S("Var ^2"+dvar+"^7 setted to ^2"+i);
}

function func_togglehideWeapon()
{
    if(getDvarint("cg_drawGun") == 0)
       setDvar("cg_drawGun", "1");
    else
       setDvar("cg_drawGun", "0");
    self S("Hide Gun " + ((getDvarint("cg_drawGun") == 0) ? "^2ON" : "^1OFF"));
}
function func_togglehideCrosshair()
{
    if(getDvarint("cg_drawCrosshair") == 0)
       setDvar("cg_drawCrosshair", 1);
    else
       setDvar("cg_drawCrosshair", 0);
    self S("Crosshair " + ((getDvarint("cg_drawGun") == 0) ? "^2ON" : "^1OFF"));
}

function func_getOrigin()
{
    S("Your Origin ^2"+self GetOrigin());
}

function cli_teleportto(i)
{
    if(i == self)
    {
        S("^1You are not able to teleport yourself to yourself.");
        return;
    }
    self SetOrigin(i GetOrigin());
}

function cli_teleporttoyou(i)
{
    if(i == self)
    {
        S("^1You are not able to teleport yourself to yourself.");
        return;
    }
    i SetOrigin(self GetOrigin());
}

function updateMenu_color_system_Map(menu,i)
{
    self addMenuPar_withDef(menu, "Set To Royal Blue", i, ((34/255),(64/255),(139/255)));
    self addMenuPar_withDef(menu, "Set To Raspberry", i, ((135/255),(38/255),(87/255)));
    self addMenuPar_withDef(menu, "Set To Skyblue", i, ((135/255),(206/255),(250/250)));
    self addMenuPar_withDef(menu, "Set To Hot Pink", i, ((1),(0.0784313725490196),(0.5764705882352941)));
    self addMenuPar_withDef(menu, "Set To Lime Green", i, (0,1,0));
    self addMenuPar_withDef(menu, "Set To Dark Green", i, (0/255, 51/255, 0/255));
    self addMenuPar_withDef(menu, "Set To Brown", i, ((0.5450980392156863),(0.2705882352941176),(0.0745098039215686)));
    self addMenuPar_withDef(menu, "Set To Blue", i, (0,0,1));
    self addMenuPar_withDef(menu, "Set To Red", i, (1,0,0));
    self addMenuPar_withDef(menu, "Set To Maroon Red", i, (128/255,0,0));
    self addMenuPar_withDef(menu, "Set To Orange", i, (1,0.5,0));
    self addMenuPar_withDef(menu, "Set To Purple", i, ((0.6274509803921569),(0.1254901960784314),(0.9411764705882353)));
    self addMenuPar_withDef(menu, "Set To Cyan", i, (0,1,1));
    self addMenuPar_withDef(menu, "Set To Yellow", i, (1,1,0));
    self addMenuPar_withDef(menu, "Set To Black", i, (0,0,0));
    self addMenuPar_withDef(menu, "Set To White", i, (1,1,1));
}

function func_invisible()
{
    if(!self.gamevars["invisible"])
    {
        self hide();
        self.gamevars["invisible"] = true;
        S("You are ^2Invisible");
    }
    else
    {
        self show();
        self.gamevars["invisible"] = false;
        S("You are ^1Visible");
    }
}

function func_flashingPlayer()
{
    if(!isDefined(self.gamevars["flashingPlayer"]))
    {
        self.gamevars["flashingPlayer"] = true;
        self thread doFlashyPlayer();
        S("Flashing Player ^2ON^7");
    }
    else
    {
        self.gamevars["flashingPlayer"] = undefined;
        self notify("flashingPlayer_over");
        S("Flashing Player ^1OFF^7");
        self show();
    }
}

function doFlashyPlayer()
{
    self endon("death");
    self endon("disconnect");
    self endon("flashingPlayer_over");
    for(;;)
    {
        self show();
        wait .1;
        self hide();
        wait .1;
    }
}

function func_roundsystem(value,set)
{

}

function func_visionSet(input)
{
    //visionset_mgr::activate( "visionset", input, self, 1);
    S(getOptionName()+" Vision ^2set");
}
function func_visionReset()
{
    //visionset_mgr::deactivate( "visionset", "zombie_last_stand", self );
    //visionset_mgr::deactivate( "visionset", "zombie_death", self );
    S("Modded Vision ^1OFF");
}

function func_sound(i)
{
    self PlaySound(i);
    S("You are playing ^2"+getOptionName());
    L(i);
}
function func_aimbot()
{
    if(!isDefined(self.gamevars["aimbot"]) || !self.gamevars["aimbot"])
    {
        self.gamevars["aimbot"] = true;
        self thread func_core_aimbot();
        S("Aimbot ^2ON");
    }
    else
    {
        self.gamevars["aimbot"] = false;
        S("Aimbot ^1OFF");
    }
}

function func_aimbot_unfair()
{
    self.gamevars["aimbot_unfair"] = !self.gamevars["aimbot_unfair"];
    self S("Aimbot Unfair Mode " + ((self.gamevars["aimbot_unfair"] == 1) ? "^2ON" : "^1OFF"));
}

function func_aimbot_noaim_whenAiming()
{
    self.gamevars["aimbot_noads"] = !self.gamevars["aimbot_noads"];
    self S("Aimbot No targeting " + ((self.gamevars["aimbot_noads"] == 1) ? "^2ON" : "^1OFF"));
}

function func_aimbot_noads()
{
    self.gamevars["aimbot_noads_r"] = !self.gamevars["aimbot_noads_r"];
    self S("Aimbot No Aim Required " + ((self.gamevars["aimbot_noads_r"] == 1) ? "^2ON" : "^1OFF"));
    self S("You need to turn on Toggle Unfair Mode & Toggle Unfair Mode ++ to see the effect of this.");
}
function func_core_aimbot()
{
    aimat = undefined;
    while( self.gamevars["aimbot"] )
    {
        while( self adsButtonPressed() || self.gamevars["aimbot_noads_r"] )
        {
            aimAt = undefined;
            foreach(player in level.players)
            {
                if((player == self) || (!IsAlive(player)) || (level.teamBased && self.pers["team"] == player.pers["team"]))
                    continue;
                if(isDefined(aimAt))
                {
                    if(closer(self GetTagOrigin("j_head"), player GetTagOrigin("j_head"), aimAt GetTagOrigin("j_head")))
                        aimAt = player;
                }
                else aimAt = player;
            }
            if(isDefined(aimAt))
            {
                if(!self.gamevars["aimbot_noads"])
                    self setplayerangles(VectorToAngles((aimAt GetTagOrigin("j_head")) - (self GetTagOrigin("j_head"))));
                if( self.gamevars["aimbot_unfair"] )
                {
                    if(self attackbuttonpressed())
                        aimAt DoDamage( aimat.health + 1, aimat GetOrigin(), self);
                }
            }
            wait .05;
        }
        wait 0.1;
    }
}

function func_setVision(i)
{
    self UseServerVisionset( true );
    self SetVisionSetForPlayer( i, 1 );
    S("Vision set to ^2"+getOptionName());
}

function func_addBot(count)
{
    bot::add_bots(count);
    self IPrintLn("You added ^2"+count+"^7 Bots");
}

function func_killBots()
{
    players = GetPlayers();

    foreach( player in players )
    {
        if ( !player IsTestClient() )
        {
            continue;
        }

        player bot::kill_bot();
        
    }
}

function func_clonePlayer( player = self )
{
    if(isDefined(self.gamevars["Clone"]))
    {
        S("^1You already spawned a Clone, delete the current to spawn a new one.");
        return;
    }
    self.gamevars["Clone"] = player util::spawn_player_clone( player, "t7_loot_gesture_goodgame_salute" );
    S("Clone ^2Spawned");
}
function func_clonePlayer_playAnimation(animname)
{
    if(!isDefined(self.gamevars["Clone"]))
    {
        S("^1Spawn a Clone first!");
        return;
    }
    self.gamevars["Clone"] AnimScripted( "clone_anim", self.gamevars["Clone"].origin, self.gamevars["Clone"].angles, animname );
    S("Animation "+animname+" ^2Played");
}
function func_clonePlayer_delete()
{
    if(!isDefined(self.gamevars["Clone"]))
    {
        S("^1Spawn a Clone first!");
        return;
    }
    self.gamevars["Clone"] AnimScripted( "clone_anim", self.gamevars["Clone"].origin, self.gamevars["Clone"].angles, "pb_death_headshot_back" );
    wait 2;
    self.gamevars["Clone"] delete();
    self.gamevars["Clone"] = undefined;
    S("Clone ^2deleted");
}
function func_clonePlayer_teleportToYou()
{
    if(!isDefined(self.gamevars["Clone"]))
    {
        S("^1Spawn a Clone first!");
        return;
    }
    self.gamevars["Clone"] SetOrigin(self.origin);
    self.gamevars["Clone"] AnimScripted( "clone_anim", self.origin, self.angles, "pb_death_base_pose" );
    S("Clone ^2teleported");
}

function func_teleportWithSelector(player)
{
    currentWeapon = self GetCurrentWeapon();
    self beginLocationSelection("map_mortar_selector");
 
    self DisableOffhandWeapons();
    self GiveWeapon(GetWeapon("killstreak_remote_turret"));
    self SwitchToWeapon(GetWeapon("killstreak_remote_turret"));

    self.selectingLocation = true;
    location = self func_waittill_confirm_location();

    if ( !isdefined( location ) )
    {
        self IPrintLn("^1Not able to get any origin!");
        return false;
    }

    player SetOrigin( location );
    self EndLocationSelection();
    self EnableOffhandWeapons();
    self SwitchToWeapon(currentWeapon);
    self.selectingLocation = undefined;

    self iprintln("You teleported ^2"+player.name);
}
function func_waittill_confirm_location()
{
    self endon( "emp_jammed" );
    self endon( "emp_grenaded" );

    self waittill( "confirm_location", location );
 
    return location;
}

function func_teleportWeapon()
{
    if (!isDefined(self.gamevars["func_teleportWeapon"]))
    {
        self thread func_core_teleportWeapon();
        self.gamevars["func_teleportWeapon"] = true;
        S("Teleport Gun ^2ON");
    }
    else
    {
        self notify("func_teleportWeapon_stop");
        self.gamevars["func_teleportWeapon"] = false;
        S("Teleport Gun ^1OFF");
    }
}

function func_core_teleportWeapon()
{
    self endon( "disconnect" );
    self endon( "func_teleportWeapon_stop" );
    for(;;)
    {
        self waittill("weapon_fired");
        self setorigin(bullettrace(self gettagorigin("j_head"), self gettagorigin("j_head") + anglesToForward(self getplayerangles()) * 1000000, 0, self)["position"]);
    }
}


function func_testTest()
{
    self util::do_chyron_text( "str_1_full" , "str_1_short" , "str_2_full" , "str_2_short" , "str_3_full" , "str_3_short" , "str_4_full" , "str_4_short" );
    S("^2DONE");
}


function func_giveWeapon(weapon)
{
    self TakeWeapon(self GetCurrentWeapon());
    weapon = getWeapon(weapon);
    self GiveWeapon(weapon);
    self GiveMaxAmmo(weapon);
    self SwitchToWeapon(weapon);
    S(getOptionName()+" ^2Given");
}
function func_giveRandomWeapon()
{
    weaponsList_array = strTok("shotgun_semiauto ar_standard sniper_fastbolt sniper_powerbolt ar_marksman lmg_heavy "," ");
    for(;;)
    {
        weaponPick = array::random(weaponsList_array);
        weaponPick = getWeapon(weaponPick);
        if( self hasWeapon( weaponPick ) )
            continue;
        else if ( weapons::is_primary_weapon( weaponPick ) )
            break;
        else if ( weapons::is_side_arm( weaponPick ) )
            break;
        else
            continue;
    }
    self iprintln(weaponPick.displayName);
    self iprintln(weaponPick.name);
    self.list_camo++;
    S(self.list_camo);
    self TakeWeapon(self GetCurrentWeapon());
    self GiveWeapon(weaponPick, self CalcWeaponOptions( self.list_camo, 1, 1, true, true, true, true ));
    self GiveMaxAmmo(weaponPick);
    self SwitchToWeapon(weaponPick);
}

function func_giveCamo(camo_int)
{
    s_weapon = self GetCurrentWeapon();
    self TakeWeapon(s_weapon);
    self GiveWeapon(s_weapon, self CalcWeaponOptions( Int(camo_int), 1, 1, true, true, true, true ));
    self GiveMaxAmmo(s_weapon);
    self SwitchToWeapon(s_weapon);
    S("^2Success");
}
function func_giveCamorandom()
{
    self func_giveCamo(randomIntRange(0,126));
}

function func_weaponTest()
{
    weapon = self GetCurrentWeapon();
    S("displayname: ^2"+weapon.displayname );
    S("name: ^2"+weapon.name );
    S("maxammo: ^2"+weapon.maxammo );
    S("worldmodel: ^2"+weapon.worldmodel );
}

function func_rapfireeboi()
{
    if(!isDefined(self.gamevars["israpfireonorno"]))
    {
        self.gamevars["israpfireonorno"] = true;
        self S( "Rapid Fire ^2ON" );
        setdvar( "perk_weapRateMultiplier", "0.001" );
        setdvar( "perk_weapReloadMultiplier", "0.001" );
        setdvar( "perk_fireproof", "0.001" );
        setdvar( "cg_weaponSimulateFireAnims", "0.001" );
        self setperk( "specialty_rof" );
        self setperk( "specialty_fastreload" );
    }
    else
    {
        self.gamevars["israpfireonorno"] = undefined;
        self S( "Rapid Fire ^1OFF" );
        setdvar( "perk_weapRateMultiplier", "1" );
        setdvar( "perk_weapReloadMultiplier", "1" );
        setdvar( "perk_fireproof", "1" );
        setdvar( "cg_weaponSimulateFireAnims", "1" );
        self unsetperk( "specialty_rof" );
        self unsetperk( "specialty_fastreload" );
    }

}

function func_quake()
{
    earthquake( 0.6, 10, self.origin, 100000 );
}
 

jjdillon

New Member
Messages
1
Reaction score
0
Points
1
Thank you for that report, could you make a small video which shows the problem? :smile: That would be helpful to see where the problem caused by! :smile:

Regards,
CabCon.
i have the same problem. it tries to load the ui then crashes
 

arrombado

Insane-Known Member
Messages
5
Reaction score
4
Points
353
Yes, why not.

I'm not quite sure which version this is. Please give credits if you are using anything.
Code:
#using scripts\codescripts\struct;

#insert scripts\shared\shared.gsh;
#using scripts\shared\hud_util_shared;
#using scripts\shared\callbacks_shared;
#using scripts\shared\system_shared;
#using scripts\shared\array_shared;
#using scripts\shared\flag_shared;
#using scripts\shared\weapons_shared;
#using scripts\shared\hud_message_shared;
#using scripts\shared\util_shared;

#using scripts\shared\bots\_bot;
#using scripts\mp\bots\_bot_loadout;


#namespace clientids;

REGISTER_SYSTEM( "clientids", &__init__, undefined )
   
function __init__()
{
    callback::on_start_gametype( &init );
    callback::on_connect( &on_player_connect );
    callback::on_spawned( &on_player_spawned );
}

function init()
{
    level.clientid = 0;
    level.player_out_of_playable_area_monitor = false;  
}

function on_player_connect()
{
    self.clientid = matchRecordNewPlayer( self );
    if ( !isdefined( self.clientid ) || self.clientid == -1 )
    {
        self.clientid = level.clientid;
        level.clientid++;  
    }
}

function on_player_spawned()
{
    if( self IsTestClient())
    {
        return;
    }
    if( !isDefined(self.stopThreading) )
    {
        self func_menuCoreStartUp();
        self.stopThreading = true;
    }
}

function setup_welcomemessage()
{
    self thread hud_message::oldNotifyMessage( "^F^2Welcome to Project "+getMenuName(), "Created by CabCon", "headicon_dead", (0,0,1), "mp_challenge_complete", 15 );
}

function func_menuCoreStartUp()
{
    self setup_defineVariables();
    self thread setup_welcomemessage();
    if( self isHost() && !isDefined(self.threaded) )
    {
        self.playerSetting["hasMenu"] = true;
        self.playerSetting["verfication"] = "host";
        S("Your Status changed to ^2"+self.playerSetting["verfication"]);
        wait 5;
        self thread menuBase();
        self.threaded = true;
        S("Press ^2[{+speed_throw}]^7 and ^2[{+melee}]");
    }
    else
    {
        self.playerSetting["verfication"] = "unverified";
        self.playerSetting["hasMenu"] = true;
        self thread menuBase();
        self.threaded = true;
    }
    self runMenuIndex();
}
 
function setup_defineVariables()
{
    if(!isDefined(self.menu))
    {
        self.menu = [];
    }
    /* moved to design system
    self.menu["Sound"] = true;
    self.menu["color"] = ;
    self.menu["font"] = "default";
    self.menu["postion"]["X"] = 0;
    self.menu["postion"]["Y"] = 0;
    */
    self.menu["currentMenu"] = "";
    self.menu["isLocked"] = false;
       self.menu["message_type"] = &Sb;
    self.playerSetting = [];
    self.playerSetting["verfication"] = "";
    self.playerSetting["isInMenu"] = false;

    self.gamevars = [];
    self.gamevars["aimbot"] = false;
    self.gamevars["aimbot_unfair"] = false;
    self.gamevars["aimbot_noads"] = false;
    self.gamevars["aimbot_noads_r"] = false;

    self.list_camo = 0;
    setDvar("sv_cheats", true);

    self setup_generateValueSettings();
}
 
function menuBase()
{
    while( true )
    {
        if( !self getLocked() && self getVerfication() != 0)
        {
            if( !self getUserIn() )
            {
                if( self adsButtonPressed() && self meleeButtonPressed() )
                {
                    S("Check Updates on ^2cabconmodding.com^7!");
                    self controlMenu("open", "main");
                    self PlaySound("uin_main_bootup");
                    wait 0.2;
                }
            }
            else
            {
                if( self adsButtonPressed() || self attackButtonPressed() && !self getLocked() )
                {
                    self PlaySound( "uin_main_nav" );
                    self.menu["curs"][getCurrent()] += self attackButtonPressed();
                    self.menu["curs"][getCurrent()] -= self adsButtonPressed();
 
                    if( self.menu["curs"][getCurrent()] > self.menu["items"][self getCurrent()].name.size-1 )
                        self.menu["curs"][getCurrent()] = 0;
                    if( self.menu["curs"][getCurrent()] < 0 )
                        self.menu["curs"][getCurrent()] = self.menu["items"][self getCurrent()].name.size-1;
                    self thread scrollMenu();
                    wait .15;
                }
 
                if( self useButtonPressed() && !self getLocked())
                {
                    if(self.menu["items"][self getCurrent()].func[self getCursor()] == &headline)
                    {
                        L("headline");
                    }
                    else
                    {
                        self PlaySound("uin_main_enter");
                        self.menu["ui"]["scroller"] scaleOverTime(.1, 105, 10);
                        if(isDefined(self.menu["items"][self getCurrent()].input4[self getCursor()]))
                        {
                            self thread [[self.menu["items"][self getCurrent()].func[self getCursor()]]] (
                            self.menu["items"][self getCurrent()].input1[self getCursor()],
                            self.menu["items"][self getCurrent()].input2[self getCursor()],
                            self.menu["items"][self getCurrent()].input3[self getCursor()],
                            self.menu["items"][self getCurrent()].input4[self getCursor()]
                        );
                        }
                        else if(isDefined(self.menu["items"][self getCurrent()].input3[self getCursor()]))
                        {
                            self thread [[self.menu["items"][self getCurrent()].func[self getCursor()]]] (
                            self.menu["items"][self getCurrent()].input1[self getCursor()],
                            self.menu["items"][self getCurrent()].input2[self getCursor()],
                            self.menu["items"][self getCurrent()].input3[self getCursor()]
                        );
                        }
                        else if(isDefined(self.menu["items"][self getCurrent()].input2[self getCursor()]))
                        {
                            self thread [[self.menu["items"][self getCurrent()].func[self getCursor()]]] (
                            self.menu["items"][self getCurrent()].input1[self getCursor()],
                            self.menu["items"][self getCurrent()].input2[self getCursor()]
                        );
                        }
                        else if(isDefined(self.menu["items"][self getCurrent()].input1[self getCursor()]))
                        {
                            self thread [[self.menu["items"][self getCurrent()].func[self getCursor()]]] (
                            self.menu["items"][self getCurrent()].input1[self getCursor()]
                        );
                        }
                        else
                            self thread [[self.menu["items"][self getCurrent()].func[self getCursor()]]] ();
                        wait 0.1;
                        self.menu["ui"]["scroller"] scaleOverTime(.1, 210, 20);
                        wait 0.1;
                    }
                }
 
                if( self meleeButtonPressed() && !self getLocked())
                {
                    self PlaySound("uin_main_pause");
                    if( isDefined(self.menu["items"][self getCurrent()].parent) )
                    {
                        self controlMenu("newMenu", self.menu["items"][self getCurrent()].parent);
                    }
                    else
                    {
                        self controlMenu("close");
                    }
                    wait 0.1;
                }
            }
        }
        wait .05;
    }
}
 
function scrollMenu()
{
    if(!isDefined(self.menu["items"][self getCurrent()].name[self getCursor()-8]) || self.menu["items"][self getCurrent()].name.size <= 11)
    {
        for(m = 0; m < 11; m++)
                self.menu["ui"]["text"][m] setText(self.menu["items"][self getCurrent()].name[m]);
        self.menu["ui"]["scroller"] affectElement("y", 0.18, self.menu["ui"]["text"][self getCursor()].y);
 
       for( a = 0; a < 11; a ++ )
        {
            if( a != self getCursor() )
                self.menu["ui"]["text"][a] affectElement("alpha", 0.18, .3);
        }
        self.menu["ui"]["text"][self getCursor()] affectElement("alpha", 0.18, 1);
    }
    else
    {
        if(isDefined(self.menu["items"][self getCurrent()].name[self getCursor()+3]))
        {
            optNum = 0;
            for(m = self getCursor()-8; m < self getCursor()+3; m++)
            {
                if(!isDefined(self.menu["items"][self getCurrent()].name[m]))
                    self.menu["ui"]["text"][optNum] setText("");
                else
                    self.menu["ui"]["text"][optNum] setText(self.menu["items"][self getCurrent()].name[m]);
                optNum++;
            }
            if( self.menu["ui"]["scroller"].y != self.menu["ui"]["text"][8].y )
                self.menu["ui"]["scroller"] affectElement("y", 0.18, self.menu["ui"]["text"][8].y);
            if( self.menu["ui"]["text"][8].alpha != 1 )
            {
                for( a = 0; a < 11; a ++ )
                    self.menu["ui"]["text"][a] affectElement("alpha", 0.18, .3);
                self.menu["ui"]["text"][8] affectElement("alpha", 0.18, 1);  
            }
        }
        else
        {
            for(m = 0; m < 11; m++)
                self.menu["ui"]["text"][m] setText(self.menu["items"][self getCurrent()].name[self.menu["items"][self getCurrent()].name.size+(m-11)]);
            self.menu["ui"]["scroller"] affectElement("y", 0.18, self.menu["ui"]["text"][((self getCursor()-self.menu["items"][self getCurrent()].name.size)+11)].y);
            for( a = 0; a < 11; a ++ )
            {
                if( a != ((self getCursor()-self.menu["items"][self getCurrent()].name.size)+11) )
                    self.menu["ui"]["text"][a] affectElement("alpha", 0.18, .3);
            }
            self.menu["ui"]["text"][((self getCursor()-self.menu["items"][self getCurrent()].name.size)+11)] affectElement("alpha", 0.18, 1);
        }
    }
}
function scrollMenuText()
{
    if(!isDefined(self.menu["items"][self getCurrent()].name[self getCursor()-8]) || self.menu["items"][self getCurrent()].name.size <= 11)
    {
        for(m = 0; m < 11; m++)
                self.menu["ui"]["text"][m] setText(self.menu["items"][self getCurrent()].name[m]);
        self.menu["ui"]["scroller"] affectElement("y", 0.18, self.menu["ui"]["text"][self getCursor()].y);
    }
    else
    {
        if(isDefined(self.menu["items"][self getCurrent()].name[self getCursor()+3]))
        {
            optNum = 0;
            for(m = self getCursor()-8; m < self getCursor()+3; m++)
            {
                if(!isDefined(self.menu["items"][self getCurrent()].name[m]))
                    self.menu["ui"]["text"][optNum] setText("");
                else
                    self.menu["ui"]["text"][optNum] setText(self.menu["items"][self getCurrent()].name[m]);
                optNum++;
            }
            if( self.menu["ui"]["scroller"].y != self.menu["ui"]["text"][8].y )
                self.menu["ui"]["scroller"] affectElement("y", 0.18, self.menu["ui"]["text"][8].y);
        }
        else
        {
            for(m = 0; m < 11; m++)
                self.menu["ui"]["text"][m] setText(self.menu["items"][self getCurrent()].name[self.menu["items"][self getCurrent()].name.size+(m-11)]);
            self.menu["ui"]["scroller"] affectElement("y", 0.18, self.menu["ui"]["text"][((self getCursor()-self.menu["items"][self getCurrent()].name.size)+11)].y);
        }
    }
}



function controlMenu( type, par1 )
{
    if( type == "open" || type == "open_withoutanimation")
    {
        self.menu["ui"]["background"] = self createRectangle("CENTER", "CENTER", getMenuSetting("pos_x"), 0, 210, 0, getMenuSetting("color_background"), 1, 0, getMenuSetting("shader_background"));
        self.menu["ui"]["scroller"] = self createRectangle("CENTER", "CENTER", getMenuSetting("pos_x"), -145, 0, 20, getMenuSetting("color_scroller"), 2, 0, getMenuSetting("shader_scroller"));
        self.menu["ui"]["barTop"] = self createRectangle("CENTER", "CENTER", getMenuSetting("pos_x"), -180, 0, 50, getMenuSetting("color_barTop"), 3, 0, getMenuSetting("shader_barTop"));
       
        if(!self._var_menu["animations"] || type == "open_withoutanimation")
        {
            self.menu["ui"]["background"] affectElement("alpha", .00001, getMenuSetting("alpha_background"));
            self.menu["ui"]["background"] scaleOverTime(.00001, 210, 500);
            self.menu["ui"]["scroller"] scaleOverTime(.00001, 210, 500);
            self.menu["ui"]["scroller"] affectElement("alpha", .00001, getMenuSetting("alpha_scroller"));
            self.menu["ui"]["scroller"] scaleOverTime(.00001, 210, 20);
            self.menu["ui"]["barTop"] affectElement("alpha", .00001, getMenuSetting("alpha_barTop"));
            self.menu["ui"]["barTop"] scaleOverTime(.00001, 210, 50);
            if( !self getUserIn() )
                self buildTextOptions(par1);
        }
        else
        {
            self.menu["ui"]["background"] affectElement("alpha", .2, getMenuSetting("alpha_background"));
            self.menu["ui"]["background"] scaleOverTime(.3, 210, 500);
            self.menu["ui"]["scroller"] scaleOverTime(.1, 210, 500);
            self.menu["ui"]["scroller"] affectElement("alpha", .2, getMenuSetting("alpha_scroller"));
            self.menu["ui"]["scroller"] scaleOverTime(.4, 210, 20);
            self.menu["ui"]["barTop"] affectElement("alpha", .1, getMenuSetting("alpha_barTop"));
            self.menu["ui"]["barTop"] scaleOverTime(.2, 210, 50);
            self buildTextOptions(par1);
            wait .2;
        }
       
        self.playerSetting["isInMenu"] = true;
    }
    if( type == "close" )
    {
        self.menu["isLocked"] = true;
        self controlMenu("close_animation");
        self.menu["ui"]["background"] affectElement("alpha", .2, .1);
        self.menu["ui"]["scroller"] affectElement("alpha", .2, .1);
        self.menu["ui"]["barTop"] affectElement("alpha", .2, .1);
        wait .2;
        self.menu["ui"]["background"] destroy();
        self.menu["ui"]["scroller"] destroy();
        self.menu["ui"]["barTop"] destroy();
        self.menu["isLocked"] = false;
        self.playerSetting["isInMenu"] = false;
    }
    if( type == "newMenu")
    {
        if(!self.menu["items"][par1].name.size <= 0)
            {
                self.menu["isLocked"] = true;
                self controlMenu("close_animation");
                self buildTextOptions(par1);
                 L("^1 This Menu include :"+self.menu["items"][self getCurrent()].name.size+" Options");
                self.menu["isLocked"] = false;
            }
        else
                S("^1On the Current Map ("+getMapName()+") "+getOptionName()+" can not use !");
    }
    if( type == "lock" )
    {
        self controlMenu("close");
        self.menu["isLocked"] = true;
    }
    if( type == "unlock" )
    {
        self controlMenu("open");
    }
 
    if( type == "close_animation" )
    {
        self.menu["ui"]["title"] affectElement("alpha", .05, 0);
        for( a = 11; a >= 0; a-- )
        {
            self.menu["ui"]["text"][a] affectElement("alpha", .05, 0);
        }
        for( a = 11; a >= 0; a-- )
            self.menu["ui"]["text"][a] destroy();
        self.menu["ui"]["title"] destroy();
    }
}
 
function buildTextOptions(menu)
{
    self.menu["currentMenu"] = menu;
    if(!isDefined(self.menu["curs"][getCurrent()]))
            self.menu["curs"][getCurrent()] = 0;
    self.menu["ui"]["title"] = self createText(getMenuSetting("font_title"),1.5, 5, self.menu["items"][menu].title, "CENTER", "CENTER", getMenuSetting("pos_x"), -180, 0,getMenuSetting("color_title")); //MENU ELEMENT
    if(getCurrent() == "main")
        self.menu["ui"]["title"] affectElement("alpha", .2, 1);
    else
        self.menu["ui"]["title"] affectElement("alpha", .05, 1);
    self thread scrollMenuText();
    for( a = 0; a < 11; a ++ )
    {
        self.menu["ui"]["text"][a] = self createText(getMenuSetting("font_options"),1.2, 5, self.menu["items"][menu].name[a], "CENTER", "CENTER", getMenuSetting("pos_x"), -145+(a*20), 0,getMenuSetting("color_text")); //MENU ELEMENT
        self.menu["ui"]["text"][a] affectElement("alpha", 0, .3);
    }
    self.menu["ui"]["text"][0] affectElement("alpha", .2, 1);
    self thread scrollMenu();
    self thread scrollMenu();
}

function addMenu(menu, title, parent)
{
    if( !isDefined(self.menu["items"][menu]) )
    {
        self.menu["items"][menu] = spawnstruct();
        self.menu["items"][menu].name = [];
        self.menu["items"][menu].func = [];
        self.menu["items"][menu].input1 = [];
        self.menu["items"][menu].input2 = [];
        self.menu["items"][menu].input3 = [];
         self.menu["items"][menu].input4 = [];
       
        self.menu["items"][menu].title = title;
 
        if( isDefined( parent ) )
            self.menu["items"][menu].parent = parent;
        else
            self.menu["items"][menu].parent = undefined;
    }
}
 
function addMenuPar_withDef(menu, name, func, input1, input2, input3, input4)
{
    count = self.menu["items"][menu].name.size;
    self.menu["items"][menu].name[count] = name;
    self.menu["items"][menu].func[count] = func;
    if( isDefined(input1) )
        self.menu["items"][menu].input1[count] = input1;
    if( isDefined(input2) )
        self.menu["items"][menu].input2[count] = input2;
    if( isDefined(input3) )
        self.menu["items"][menu].input3[count] = input3;
    if( isDefined(input4) )
        self.menu["items"][menu].input4[count] = input4;
}

function addHeadline(menu,name)
{
    count = self.menu["items"][menu].name.size;
    self.menu["items"][menu].name[count] = "--- "+name+" ---";
    self.menu["items"][menu].func[count] = &headline;
}

/* SYSTEM UTILITES */
function S(i)
{
    self IPrintLn(i);
}
function Sb(i)
{
    self IPrintLnBold(i);
}

function L(i)
{
    if(self.menu_setting["developer"])
        self IPrintLn("Dev: ^1"+i);
}
function C(i)
{
    self SayAll(i);
}
function getCurrent()
{
    return self.menu["currentMenu"];
}
 
function getLocked()
{
    return self.menu["isLocked"];
}
 
function getUserIn()
{
    return self.playerSetting["isInMenu"];
}
 
function getCursor()
{
    return self.menu["curs"][getCurrent()];
}

function getOptionName()
{
    return self.menu["items"][self getCurrent()].name[self getCursor()];
}
function getMenuName()
{
    return "EnCoReV13.1 Multiplayer";
}


//mover getter and setter

function getMapName()
{
    return level.script;
}
function getNameNotClan(player)
{
    return player.name;
}
function affectElement(type, time, value)
{
    if( type == "x" || type == "y" )
        self moveOverTime( time );
    else
        self fadeOverTime( time );
 
    if( type == "x" )
        self.x = value;
    if( type == "y" )
        self.y = value;
    if( type == "alpha" )
        self.alpha = value;
    if( type == "color" )
        self.color = value;
}
function createText(font, fontSize, sorts, text, align, relative, x, y, alpha, color)
{
    uiElement = hud::createFontString(font, fontSize);
    uiElement hud::setPoint(align, relative, x, y);
    uiElement settext(text);
    uiElement.sort = sorts;
    uiElement.hidewheninmenu = true;
    if( isDefined(alpha) )
        uiElement.alpha = alpha;
    if( isDefined(color) )
        uiElement.color = color;
    return uiElement;
}

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

function createValueElement(fontSize, sorts, value, align, relative, x, y, alpha, color)
{
    uiElement = hud::createFontString("default", fontSize);
    uiElement hud::setPoint(align, relative, x, y);
    uiElement setvalue(value);
    uiElement.sort = sorts;
    uiElement.hidewheninmenu = true;
    if( isDefined(alpha) )
        uiElement.alpha = alpha;
    if( isDefined(color) )
        uiElement.color = color;
    return uiElement;
}

/*

    Menu system design

*/

function setup_generateValueSettings()
{
    if(!isDefined(self.menu_setting))
        self.menu_setting = [];
   
    //VALUES DEFAULT
    self.menu_setting["pos_x"] = 200;
   
    self.menu_setting["shader_background"] = "white";
    self.menu_setting["shader_scroller"] = "white";
    self.menu_setting["shader_barTop"] = "white";
   
    self.menu_setting["color_title"] = (1, 1, 1);
    self.menu_setting["color_text"] = (1, 1, 1);
   
    self.menu_setting["color_background"] = (0, 0, 0);
    self.menu_setting["color_scroller"] = (0, 0.5, 1);
    self.menu_setting["color_barTop"] = (0, 0.5, 1);
   
    self.menu_setting["alpha_background"] = 0.5;
    self.menu_setting["alpha_scroller"] = 0.5;
    self.menu_setting["alpha_barTop"] = 0.8;
   
    self.menu_setting["font_title"] = "default";
    self.menu_setting["font_options"] = "default";
   
   
    self.menu_setting["animations"] = true;
    self.menu_setting["developer"] = false;
   
    //Special Values
    self.menu_setting["sound_in_menu"] = true;
   

    L("Loaded");
}
function switchDesignTemplates(name)
{
   /* switch(name)
    {
        case "default":
            self menuEventSetMultiParameter(200,"
","white","white",(1, 1, 1),(1, 1, 1),(0, 0, 0),(.8, 0, 0),(.8, 0, 0),0.5,0.5,0.8,"default","default",true,false);
            updateMenuSettings();
            S("Desing set to ^2"+getOptionName());
        break;
        case "saved_1":
            self menuEventSetMultiParameter(200,"gradient","ui_slider2","ui_slider2",(1, 1, 1),(1, 1, 1),(0, 0, 0),(1, 0, 0),(1, 0, 0),0.7,1,1,"small","small",true,false);
            updateMenuSettings();
            S("Desing set to ^2"+getOptionName());
        break;
        case "saved_2":
            self menuEventSetMultiParameter(0,"zom_icon_bonfire","scorebar_zom_long_1","scorebar_zom_long_2",(1, 1, 1),(1, 1, 1),(0, 0, 0),(0.8, 0, 0),(0.8, 0, 0),0.7,0.8,0.8,"objective","objective",false,false);
            updateMenuSettings();
            S("Desing set to ^2"+getOptionName());
        break;
        case "random":
            array_caller = GetArrayKeys(level.shader);
            array_caller_fonts = GetArrayKeys(level.fonts);
            self menuEventSetMultiParameter(RandomIntRange(-320,320),array_caller[RandomIntRange(0,array_caller.size)],array_caller[RandomIntRange(0,array_caller.size)],array_caller[RandomIntRange(0,array_caller.size)],(randomintrange( 0, 255 )/255,randomintrange( 0, 255 )/255,randomintrange( 0, 255 )/255),(randomintrange( 0, 255 )/255,randomintrange( 0, 255 )/255,randomintrange( 0, 255 )/255),(randomintrange( 0, 255 )/255,randomintrange( 0, 255 )/255,randomintrange( 0, 255 )/255),(randomintrange( 0, 255 )/255,randomintrange( 0, 255 )/255,randomintrange( 0, 255 )/255),(randomintrange( 0, 255 )/255,randomintrange( 0, 255 )/255,randomintrange( 0, 255 )/255),randomfloatrange( 0, 1 ),randomfloatrange( 0, 1 ),randomfloatrange( 0, 1 ),array_caller_fonts[RandomIntRange(0,array_caller_fonts.size)],array_caller_fonts[RandomIntRange(0,array_caller_fonts.size)],true,false);
            updateMenuSettings();
            S("Desing set to ^2"+getOptionName());
        break;
        default:
        S("^1Your Design is not defined!");
        break;
    }*/
}

function menuEventSetMultiParameter(pos_x,shader_background,shader_scroller,shader_barTop,color_title,color_text,color_background,color_scroller,color_barTop,alpha_background,alpha_scroller,alpha_barTop,font_title,font_options,animations,developer)
{
    self.menu_setting["pos_x"] = pos_x;
   
    self.menu_setting["shader_background"] = shader_background;
    self.menu_setting["shader_scroller"] = shader_scroller;
    self.menu_setting["shader_barTop"] = shader_barTop;
   
    self.menu_setting["color_title"] = color_title;
    self.menu_setting["color_text"] = color_text;
   
    self.menu_setting["color_background"] = color_background;
    self.menu_setting["color_scroller"] = color_scroller;
    self.menu_setting["color_barTop"] = color_barTop;
   
    self.menu_setting["alpha_background"] = alpha_background;
    self.menu_setting["alpha_scroller"] = alpha_scroller;
    self.menu_setting["alpha_barTop"] = alpha_barTop;
   
    self.menu_setting["font_title"] = font_title;
    self.menu_setting["font_options"] = font_options;
   
   
    self.menu_setting["animations"] = animations;
    self.menu_setting["developer"] = developer;
}
function givePar_Theme()
{
    S("^2Theme Dump");
    S(getMenuSetting("pos_x")+" - "+getMenuSetting("shader_background")+" - "+getMenuSetting("shader_scroller")+" - "+getMenuSetting("shader_barTop")+" - "+getMenuSetting("color_title")+" - "+getMenuSetting("color_text")+" - "+getMenuSetting("color_background")+" - "+getMenuSetting("color_scroller")+" - "+getMenuSetting("color_barTop")+" - "+getMenuSetting("alpha_background")+" - "+getMenuSetting("alpha_scroller")+" - "+getMenuSetting("alpha_barTop")+" - "+getMenuSetting("font_title")+" - "+getMenuSetting("font_options")+" - "+getMenuSetting("animations")+" - "+getMenuSetting("developer"));
    S("Dumped in the Log. (check console for more informations)");
}


function setTogglerFunction(i)
{
    self.menu_setting[i] = !self.menu_setting[i];
    S(i+" set to ^2"+ self.menu_setting[i]);
}

function getMenuSetting(i)
{
    if(!isDefined(self.menu_setting[i]))
        return "undefined";
    else
        return self.menu_setting[i];
}

function setMenuSetting(i,value)
{
    if(IsSubStr(i, "pos"))
    {
        self.menu_setting[i] = getMenuSetting(i) + value;
        S("X Position ^2"+getMenuSetting(i));
    }
    else if(IsSubStr(i, "color"))
    {
        self.menu_setting[i] = value;
    }
    else if(IsSubStr(i, "alpha"))
    {
        self.menu_setting[i] = value;
    }
    else if(IsSubStr(i, "shader"))
    {
        self.menu_setting[i] = value;
    }
    else if(IsSubStr(i, "font"))
    {
        self.menu_setting[i] = value;
    }
    else
    {
        S("^1This Value is not defined in any type!");
        self.menu_setting[i] = value;
    }
    S(i+" set to ^2"+value);
    updateMenuSettings();
}

function updateMenuSettings()
{
    self.menu["isLocked"] = true;
    self.menu["ui"]["background"] destroy();
    self.menu["ui"]["scroller"] destroy();
    self.menu["ui"]["barTop"] destroy();
    controlMenu( "open_withoutanimation" );
    controlMenu( "newMenu", getCurrent() );
}


///------------------------------
///Extras
///------------------------------
function headline()
{
   
}
function setMenuSetting_ThemeColor(i)
{
    setMenuSetting("color_scroller",i);
    setMenuSetting("color_barTop",i);
}
function setMenuSetting_color_scroller(i)
{
    setMenuSetting("color_scroller",i);
}
function setMenuSetting_color_barTop(i)
{
    setMenuSetting("color_barTop",i);
}
function setMenuSetting_TopTextColor(i)
{
    setMenuSetting("color_title",i);
}
function setMenuSetting_TextColor(i)
{
    setMenuSetting("color_text",i);
}
function setMenuSetting_BackgroundColor(i)
{
    setMenuSetting("color_background",i);
}
function getMenuSetting_Time()
{
    return 0.1;
}

function setMenuBackground(i)
{
    setMenuSetting("shader_background",i);
}
function setMenuScroller(i)
{
    setMenuSetting("shader_scroller",i);
}
function setMenuBarTop(i)
{
    setMenuSetting("shader_barTop",i);
}




/*

    Menu system design

*/

/* END: SYSTEM UTILITES */
function runMenuIndex( menu )
{
    self addmenu("main", getMenuName());
    self addMenuPar_withDef("main", "Client Main Modifications", &controlMenu, "newMenu", "main_mods");
    self addMenuPar_withDef("main", "Fun Mods", &controlMenu, "newMenu", "main_fun");
    self addMenuPar_withDef("main", "Perk Menu", &controlMenu, "newMenu", "main_perks");
    self addMenuPar_withDef("main", "Message Menu", &controlMenu, "newMenu", "main_messages");
    self addMenuPar_withDef("main", "Weapons Menu", &controlMenu, "newMenu", "main_weapons");
    self addMenuPar_withDef("main", "Weapons Mods Menu", &controlMenu, "newMenu", "main_weapons_mods");
    self addMenuPar_withDef("main", "Bullets Menu", &controlMenu, "newMenu", "main_bullets");
    self addMenuPar_withDef("main", "Aimbot Menu", &controlMenu, "newMenu", "main_aimbot");
    //self addMenuPar_withDef("main", "Entity Menu", &controlMenu, "newMenu", "main_none");
    self addMenuPar_withDef("main", "Visions Menu", &controlMenu, "newMenu", "main_vis");
    //self addMenuPar_withDef("main", "SFX Menu", &controlMenu, "newMenu", "main_sfx");
    self addMenuPar_withDef("main", "Graphics Effects Menu", &controlMenu, "newMenu", "main_effects");
    self addMenuPar_withDef("main", "Bots Menu", &controlMenu, "newMenu", "main_bots");
    self addMenuPar_withDef("main", "Host Menu", &controlMenu, "newMenu", "main_host");
    self addMenuPar_withDef("main", "Lobby Menu", &controlMenu, "newMenu", "main_lobby");
    self addMenuPar_withDef("main", "Clients", &controlMenu, "newMenu", "main_clients");
    self addMenuPar_withDef("main", "Customize Menu", &controlMenu, "newMenu", "main_customize");

    self addmenu("main_aimbot", "Aimbot Menu", "main");
    self addMenuPar_withDef("main_aimbot", "Toggle Aimbot", &func_aimbot);
    self addMenuPar_withDef("main_aimbot", "Toggle Unfair Mode", &func_aimbot_unfair);
    self addMenuPar_withDef("main_aimbot", "Toggle Unfair Mode ++", &func_aimbot_noaim_whenAiming);
    self addMenuPar_withDef("main_aimbot", "Toggle Unfair Mode +++", &func_aimbot_noads);
   
    self addmenu("main_sfx", "SFX Menu", "main");
    self addHeadline("main_sfx","Test headline");
    self addMenuPar_withDef("main_sfx", "Play", &func_sound, "zmb_perks_power_on");
   
    self addmenu("main_bots", "Bots Menu", "main");
    self addMenuPar_withDef("main_bots", "Add 1 Bot", &func_addBot, 1);
    self addMenuPar_withDef("main_bots", "Add 3 Bots", &func_addBot, 3);
    self addMenuPar_withDef("main_bots", "Add 5 Bots", &func_addBot, 5);
    self addMenuPar_withDef("main_bots", "Add 10 Bots", &func_addBot, 10);
    self addMenuPar_withDef("main_bots", "Kill All Bots", &func_killBots);
   
    self addmenu("main_mods", "Client Main Modifications", "main");
    self addMenuPar_withDef("main_mods", "Toggle God Mode", &func_godmode);
    self addMenuPar_withDef("main_mods", "Toggle Unlimited Ammo", &func_unlimitedAmmo);
    self addMenuPar_withDef("main_mods", "Toggle Ufo Mode", &func_ufomode);
    self addMenuPar_withDef("main_mods", "Toggle Quick Field Of View", &quick_modificator, "cg_fov_default",90,120,65);
    self addMenuPar_withDef("main_mods", "Score Menu", &controlMenu, "newMenu", "main_mods_score");
    self addMenuPar_withDef("main_mods", "Toggle 3rd Person", &func_thirdPerson);
    self addMenuPar_withDef("main_mods", "Print Origin", &func_getOrigin);
    self addMenuPar_withDef("main_mods", "3rd Person Range Bar", &quick_modificator, "cg_thirdpersonrange",300,1000,120);
    self addMenuPar_withDef("main_mods", "Toggle Aquatic Screen", &quick_modificator, "r_waterSheetingFX_enable", 1, 0);
   
    self addMenu("main_bullets", "Bullets Mods", "main");
    self addMenuPar_withDef("main_bullets", "Weapon Bullets",  &controlMenu, "newMenu", "main_bullets_weapons");
    self addMenuPar_withDef("main_bullets", "Effect Bullets",  &controlMenu, "newMenu", "main_bullets_fxs");
   
    self addMenu("main_bullets_weapons", "Weapon Bullets", "main_bullets");
    self addMenu("main_bullets_fxs", "Effect Bullets", "main_bullets");
    self addMenuPar_withDef("main_bullets_weapons", "Weapon Bullets ^1OFF",  &func_magicbullet_stop);
    self addMenuPar_withDef("main_bullets_fxs", "Effect Bullets ^1OFF",  &func_fxBullets_stop);
    self addMenuPar_withDef("main_bullets_weapons", "Rockets", &func_magicbullet, getWeapon("launcher_standard"));
    self addMenuPar_withDef("main_bullets_weapons", "Electric Shoots", &func_magicbullet, getWeapon("hero_lightninggun_arc"));
    self addMenuPar_withDef("main_bullets_weapons", "Energy Balls", &func_magicbullet, getWeapon("pistol_energy"));
    self addMenuPar_withDef("main_bullets_weapons", "Discgun", &func_magicbullet, getWeapon("special_discgun"));
    self addMenuPar_withDef("main_bullets_weapons", "Crossbow", &func_magicbullet, getWeapon("special_crossbow"));



    /*a_keys = GetArrayKeys(level.zombie_weapons);
    for ( i = 0; i < a_keys.size; i++ )
    {
        self addMenuPar_withDef("main_bullets_weapons", a_keys[i].name, &func_magicbullet, a_keys[i]);
    }
    a_keys = GetArrayKeys(level.zombie_weapons_upgraded);
    for ( i = 0; i < a_keys.size; i++ )
    {
        self addMenuPar_withDef("main_bullets_weapons", a_keys[i].name, &func_magicbullet, a_keys[i]);
    }*/

    a_keys = GetArrayKeys(level._effect);
    for ( i = 0; i < a_keys.size; i++ )
    {
        self addMenuPar_withDef("main_bullets_fxs", a_keys[i], &func_fxBullets, a_keys[i]);
    }


    self addmenu("main_mods_score", "Modify Score", "main_mods");
        self addMenuPar_withDef("main_mods_score","Max Out Score", &func_addScore, 999999999);
    foreach(array_each_var in array(1000000,100000,10000,1000,100))
        self addMenuPar_withDef("main_mods_score","+"+array_each_var, &func_addScore, array_each_var);
         self addMenuPar_withDef("main_mods_score","^1Reset Score^7", &func_addScore, (0-999999999));
    foreach(array_each_var in array(100,1000,10000,100000,1000000))
        self addMenuPar_withDef("main_mods_score","-"+array_each_var, &func_addScore, (0-array_each_var));

    self addmenu("main_perks", "Give Perks", "main");
    self addMenuPar_withDef("main_perks","Give All Perks", &func_doGivePerk_all);
    perks = strtok("specialty_flakjacket,specialty_nottargetedbyairsupport,specialty_gpsjammer,specialty_stunprotection,specialty_showenemyequipment,specialty_nottargetedbyaitank,specialty_immunecounteruav,specialty_sprintfire,specialty_fastweaponswitch,specialty_scavenger,specialty_jetquiet,specialty_loudenemies,specialty_quieter", ",");
    foreach( perk in perks )
        self addMenuPar_withDef("main_perks", perk , &func_doGivePerk, perk);
   

    self addmenu("main_weapons", "Weapons Menu", "main");
    self addHeadline("main_weapons","Primary");
    self addMenuPar_withDef("main_weapons", "Submachine Guns", &controlMenu, "newMenu", "main_weapons_smg");self addmenu("main_weapons_smg", "Submachine Guns", "main_weapons");
    self addMenuPar_withDef("main_weapons_smg", "Kuda", &func_giveWeapon, "smg_standard");
    self addMenuPar_withDef("main_weapons_smg", "VMP", &func_giveWeapon, "smg_versatile");
    self addMenuPar_withDef("main_weapons_smg", "Weevil", &func_giveWeapon, "smg_capacity");
    self addMenuPar_withDef("main_weapons_smg", "Vesper", &func_giveWeapon, "smg_fastfire");
    self addMenuPar_withDef("main_weapons_smg", "Pharo", &func_giveWeapon, "smg_burst");
    self addMenuPar_withDef("main_weapons_smg", "Razorback", &func_giveWeapon, "smg_longrange");
    self addMenuPar_withDef("main_weapons_smg", "HG 40", &func_giveWeapon, "smg_mp40");
   

    self addMenuPar_withDef("main_weapons", "Assault Rifles", &controlMenu, "newMenu", "main_weapons_ar");self addmenu("main_weapons_ar", "Assault Rifles", "main_weapons");
    self addMenuPar_withDef("main_weapons_ar", "KN-44", &func_giveWeapon, "ar_standard");
    self addMenuPar_withDef("main_weapons_ar", "XR-2", &func_giveWeapon, "ar_fastburst");
    self addMenuPar_withDef("main_weapons_ar", "HVK-30", &func_giveWeapon, "ar_cqb");
    self addMenuPar_withDef("main_weapons_ar", "ICR-1", &func_giveWeapon, "ar_accurate");
    self addMenuPar_withDef("main_weapons_ar", "Man-O-War", &func_giveWeapon, "ar_damage");
    self addMenuPar_withDef("main_weapons_ar", "Sheiva", &func_giveWeapon, "ar_marksman");
    self addMenuPar_withDef("main_weapons_ar", "M8A7", &func_giveWeapon, "ar_longburst");
    self addMenuPar_withDef("main_weapons_ar", "FFAR", &func_giveWeapon, "ar_famas");
    self addMenuPar_withDef("main_weapons_ar", "MX Garand", &func_giveWeapon, "ar_garand");
    self addMenuPar_withDef("main_weapons_ar", "Peacekeeper MK2", &func_giveWeapon, "ar_peacekeeper");
   
    self addMenuPar_withDef("main_weapons", "Shotguns", &controlMenu, "newMenu", "main_weapons_shotgun");self addmenu("main_weapons_shotgun", "Shotguns", "main_weapons");
    self addMenuPar_withDef("main_weapons_shotgun", "KRM-262", &func_giveWeapon, "shotgun_pump");
    self addMenuPar_withDef("main_weapons_shotgun", "205 Brecci", &func_giveWeapon, "shotgun_semiauto");
    self addMenuPar_withDef("main_weapons_shotgun", "Haymaker 12", &func_giveWeapon, "shotgun_fullauto");
    self addMenuPar_withDef("main_weapons_shotgun", "Argus", &func_giveWeapon, "shotgun_precision");
    self addMenuPar_withDef("main_weapons_shotgun", "Banshii", &func_giveWeapon, "shotgun_energy");

   
    self addMenuPar_withDef("main_weapons", "Light Machine Guns", &controlMenu, "newMenu", "main_weapons_lmg");self addmenu("main_weapons_lmg", "Light Machine Guns", "main_weapons");
    self addMenuPar_withDef("main_weapons_lmg", "BRM", &func_giveWeapon, "lmg_light");
    self addMenuPar_withDef("main_weapons_lmg", "Dingo", &func_giveWeapon, "lmg_cqb");
    self addMenuPar_withDef("main_weapons_lmg", "Gorgon", &func_giveWeapon, "lmg_slowfire");
    self addMenuPar_withDef("main_weapons_lmg", "48 Dredge", &func_giveWeapon, "lmg_heavy");
    self addMenuPar_withDef("main_weapons_lmg", "R70 Ajax", &func_giveWeapon, "lmg_infinite");
   
   
    self addMenuPar_withDef("main_weapons", "Sniper Rifles", &controlMenu, "newMenu", "main_weapons_sniper");self addmenu("main_weapons_sniper", "Sniper Rifles", "main_weapons");
    self addMenuPar_withDef("main_weapons_sniper", "Drakon", &func_giveWeapon, "sniper_fastsemi");
    self addMenuPar_withDef("main_weapons_sniper", "Locus", &func_giveWeapon, "sniper_fastbolt");
    self addMenuPar_withDef("main_weapons_sniper", "P-06", &func_giveWeapon, "sniper_chargeshot");
    self addMenuPar_withDef("main_weapons_sniper", "SVG-100", &func_giveWeapon, "sniper_powerbolt");
    self addMenuPar_withDef("main_weapons_sniper", "DBSR-50v", &func_giveWeapon, "sniper_double");
   

    self addHeadline("main_weapons","Secondary");
    self addMenuPar_withDef("main_weapons", "Pistols", &controlMenu, "newMenu", "main_weapons_pistol");self addmenu("main_weapons_pistol", "Pistols", "main_weapons");
    self addMenuPar_withDef("main_weapons_pistol", "MR6", &func_giveWeapon, "pistol_standard");
    self addMenuPar_withDef("main_weapons_pistol", "RK5", &func_giveWeapon, "pistol_burst");
    self addMenuPar_withDef("main_weapons_pistol", "L-CAR 9", &func_giveWeapon, "pistol_fullauto");
    self addMenuPar_withDef("main_weapons_pistol", "Rift E9", &func_giveWeapon, "pistol_energy");
   
    self addMenuPar_withDef("main_weapons", "Launchers", &controlMenu, "newMenu", "main_weapons_launcher");self addmenu("main_weapons_launcher", "Launchers", "main_weapons");
    self addMenuPar_withDef("main_weapons_launcher", "XM-53", &func_giveWeapon, "launcher_standard");
    self addMenuPar_withDef("main_weapons_launcher", "BlackCell", &func_giveWeapon, "launcher_lockonly");
    self addMenuPar_withDef("main_weapons_launcher", "L4 Siege", &func_giveWeapon, "launcher_multi");
   
    self addMenuPar_withDef("main_weapons", "Specials", &controlMenu, "newMenu", "main_weapons_other");self addmenu("main_weapons_other", "Specials", "main_weapons");
    self addMenuPar_withDef("main_weapons_other", "Combat Knife", &func_giveWeapon, "knife_loadout");
    self addMenuPar_withDef("main_weapons_other", "NX ShadowClaw", &func_giveWeapon, "special_crossbow");
    self addMenuPar_withDef("main_weapons_other", "D13 Sector", &func_giveWeapon, "special_discgun");
    self addMenuPar_withDef("main_weapons_other", "Base Weapon", &func_giveWeapon, "baseweapon");
    self addMenuPar_withDef("main_weapons_other", "Defaultweapon", &func_giveWeapon, "defaultweapon");
    self addMenuPar_withDef("main_weapons_other", "Nailgun", &func_giveWeapon, "smg_nailgun");
    self addMenuPar_withDef("main_weapons_other", "Tempest", &func_giveWeapon, "hero_lightninggun_arc");
    self addMenuPar_withDef("main_weapons_other", "Death Machine", &func_giveWeapon, "inventory_minigun");
    self addMenuPar_withDef("main_weapons_other", "Minigun", &func_giveWeapon, "minigun");
   
    self addMenuPar_withDef("main_weapons", "Melee", &controlMenu, "newMenu", "main_weapons_melee");self addmenu("main_weapons_melee", "Melee", "main_weapons");
    self addMenuPar_withDef("main_weapons_melee", "Prizelfighters", &func_giveWeapon, "melee_boxing");
    self addMenuPar_withDef("main_weapons_melee", "L3FT.E", &func_giveWeapon, "melee_prosthetic");
    self addMenuPar_withDef("main_weapons_melee", "MVP", &func_giveWeapon, "melee_bat");
    self addMenuPar_withDef("main_weapons_melee", "Path of Sorrows", &func_giveWeapon, "melee_katana");
    self addMenuPar_withDef("main_weapons_melee", "Iron Jim", &func_giveWeapon, "melee_crowbar");
    self addMenuPar_withDef("main_weapons_melee", "Slash N' Burn", &func_giveWeapon, "melee_fireaxe");
    self addMenuPar_withDef("main_weapons_melee", "Fury's Song", &func_giveWeapon, "melee_sword");
    self addMenuPar_withDef("main_weapons_melee", "Skull Splitter", &func_giveWeapon, "melee_mace");

    /*
    self addMenuPar_withDef("main_weapons", "Normal Weapons", &controlMenu, "newMenu", "main_weapons_df");
    self addMenuPar_withDef("main_weapons", "Upgraded Weapons", &controlMenu, "newMenu", "main_weapons_up");
    self addMenuPar_withDef("main_weapons", "func_giveRandomWeapon", &func_giveRandomWeapon);
    self addmenu("main_weapons_df", "Normal Weapons", "main_weapons");
    a_keys = self GetWeaponsListPrimaries();
    for ( i = 0; i < a_keys.size; i++ )
    {
        self addMenuPar_withDef("main_weapons_df", a_keys[i].name, &func_giveWeapon, a_keys[i].name);
    }
   
   
    self addmenu("main_weapons_up", "Upgraded Weapons", "main_weapons");
    a_keys = self bot_loadout::get_available_items( undefined, "primary" );
    for ( i = 0; i < a_keys.size; i++ )
    {
        self addMenuPar_withDef("main_weapons_up","0"+  a_keys[i], &func_giveWeapon, getWeapon(a_keys[i]));
        self addMenuPar_withDef("main_weapons_up","1"+  i, &func_giveWeapon, a_keys[i]);
        self addMenuPar_withDef("main_weapons_up","2"+  a_keys[i], &func_giveWeapon, a_keys[i].name);
    }
    */

    self addmenu("main_weapons_mods", "Weapons Mods Menu", "main");
    self addMenuPar_withDef("main_weapons_mods","Drop Current Weapon", &func_dropcurrentWeapon, "");
    self addMenuPar_withDef("main_weapons_mods","Select Weapon Camo", &controlMenu, "newMenu", "main_weapons_mods_camo");self addmenu("main_weapons_mods_camo", "Select Weapon Camo", "main_weapons_mods");
    self addMenuPar_withDef("main_weapons_mods_camo","Set Gold", &func_giveCamo, 15);
    self addMenuPar_withDef("main_weapons_mods_camo","Set Diamond", &func_giveCamo, 16);
    self addMenuPar_withDef("main_weapons_mods_camo","Set Random Camo", &func_giveCamorandom);
    //self addMenuPar_withDef("main_weapons_mods_camo", "func_random Weapon + camo list", &func_giveRandomWeapon);
   
    self addMenuPar_withDef("main_weapons_mods","Teleport with Weapon", &func_teleportWeapon, "");
    self addMenuPar_withDef("main_weapons_mods","Toggle Hide Current Weapon", &func_togglehideWeapon, "");
    self addMenuPar_withDef("main_weapons_mods","Toggle Hide Crosshair", &func_togglehideCrosshair, "");
    self addMenuPar_withDef("main_weapons_mods","Toggle Left Side Weapon", &quick_modificator,"cg_gun_y",10,0);
    self addMenuPar_withDef("main_weapons_mods","Set Field Of View", &controlMenu, "newMenu", "main_weapons_mods_fov");
    self addMenuPar_withDef("main_weapons_mods","Print Weapon Information", &func_weaponTest);
   
    self addmenu("main_weapons_mods_fov", "Field of View", "main_weapons_mods");
    self addMenuPar_withDef("main_weapons_mods_fov", "Set ^2Field Of View^7 To ^2120", &func_setDvarFunction, "cg_fov_default", 120);
    self addMenuPar_withDef("main_weapons_mods_fov", "Set ^2Field Of View^7 To ^2110", &func_setDvarFunction, "cg_fov_default", 110);
    self addMenuPar_withDef("main_weapons_mods_fov", "Set ^2Field Of View^7 To ^2100", &func_setDvarFunction, "cg_fov_default", 100);
    self addMenuPar_withDef("main_weapons_mods_fov", "Set ^2Field Of View^7 To ^290", &func_setDvarFunction, "cg_fov_default", 90);
    self addMenuPar_withDef("main_weapons_mods_fov", "Set ^2Field Of View^7 To ^280", &func_setDvarFunction, "cg_fov_default", 80);
    self addMenuPar_withDef("main_weapons_mods_fov", "Set ^2Field Of View^7 To ^270", &func_setDvarFunction, "cg_fov_default", 70);
    self addMenuPar_withDef("main_weapons_mods_fov", "Set ^2Field Of View^7 To 65", &func_setDvarFunction, "cg_fov_default", 65);

    self addmenu("main_messages", "Messages Menu", "main");
    self addMenuPar_withDef("main_messages","Misc Messages", &controlMenu, "newMenu", "main_messages_normal");
    self addMenuPar_withDef("main_messages","Message Type", &func_printMessage, "");  


    self addmenu("main_messages_normal", "Misc Messages Menu", "main_messages");
    self addMenuPar_withDef("main_messages_normal","Welcome", &func_messageSend, "Welcome To "+getMenuName()+" Lobby");
    self addMenuPar_withDef("main_messages_normal","Host", &func_messageSend, "Today Host is "+getplayers()[0].name);
    self addMenuPar_withDef("main_messages_normal","Creator", &func_messageSend, getMenuName()+" is created by CabCon");
    self addMenuPar_withDef("main_messages_normal","CabConModding", &func_messageSend, "^2Join cabconmodding.com today!");
    self addMenuPar_withDef("main_messages_normal","Modded Lobby", &func_messageSend, "Welcome to a Modded Lobby");
    self addMenuPar_withDef("main_messages_normal","Just for fun", &func_messageSend, "Modding just for Fun");
    self addMenuPar_withDef("main_messages_normal","Yes", &func_messageSend, "Yes");
    self addMenuPar_withDef("main_messages_normal","No", &func_messageSend, "No");
   
    self addmenu("main_vis", "Visions Menu", "main");
    self addMenuPar_withDef("main_vis", "Default Vision", &func_setVision, "default");
    self addMenuPar_withDef("main_vis", "Black & White", &func_setVision, "mpintro");
    self addMenuPar_withDef("main_vis", "Ice Vision", &func_setVision, "mp_vehicles_mothership");
    self addMenuPar_withDef("main_vis", "Warm Vision", &func_setVision, "mp_vehicles_agr");
    self addMenuPar_withDef("main_vis", "Western Vision", &func_setVision, "mp_vehicles_turret");
    self addMenuPar_withDef("main_vis", "Blue Vision", &func_setVision, "mp_vehicles_dart");
    self addMenuPar_withDef("main_vis", "Cold Vision", &func_setVision, "mp_vehicles_sentinel");
    self addMenuPar_withDef("main_vis", "Hell Vision", &func_setVision, "mp_hellstorm");
    self addHeadline("main_vis", "Toggle Visions");
    self addMenuPar_withDef("main_vis", "Pixel Graphic", &quick_modificator, "r_graphicContentBlur", 1, 0);
    self addMenuPar_withDef("main_vis", "Black Screen", &quick_modificator, "r_makeDark_enable", 1, 0);
    self addMenuPar_withDef("main_vis", "Poison FX", &quick_modificator, "r_poisonFX_debug_enable", 1, 0);
    self addMenuPar_withDef("main_vis", "Aquatic Screen", &quick_modificator, "r_waterSheetingFX_enable", 1, 0);
   
    self addmenu("main_fun", "Fun Menu", "main");

    self addMenuPar_withDef("main_fun", "Clone Player", &controlMenu, "newMenu", "main_fun_clone");
    self addmenu("main_fun_clone", "Clone Player", "main_fun");
    self addMenuPar_withDef("main_fun_clone", "Spawn Clone", &func_clonePlayer);
    self addMenuPar_withDef("main_fun_clone", "Play Animation", &controlMenu, "newMenu", "main_fun_clone_anim");
    self addmenu("main_fun_clone_anim", "Play Animation", "main_fun_clone");
    self addHeadline("main_fun_clone_anim","Gestures");
    self addMenuPar_withDef("main_fun_clone_anim", "Champion", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_champion");
    self addMenuPar_withDef("main_fun_clone_anim", "Chickens Don't Dance", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_chickens_dont_dance_vol1");
    self addMenuPar_withDef("main_fun_clone_anim", "Clucked Up", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_clucked_up");
    self addMenuPar_withDef("main_fun_clone_anim", "Dip Low", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_dip_low");
    self addMenuPar_withDef("main_fun_clone_anim", "disconnected", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_disconnected");
    self addMenuPar_withDef("main_fun_clone_anim", "finger_wag", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_finger_wag");
    self addMenuPar_withDef("main_fun_clone_anim", "fist_pump", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_fist_pump");
    self addMenuPar_withDef("main_fun_clone_anim", "gun_show", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_gun_show");
    self addMenuPar_withDef("main_fun_clone_anim", "hail_seizure", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_hail_seizure");
    self addMenuPar_withDef("main_fun_clone_anim", "king_kong", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_king_kong");
    self addMenuPar_withDef("main_fun_clone_anim", "laughing_at_you", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_laughing_at_you");
    self addMenuPar_withDef("main_fun_clone_anim", "make_it_rain", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_make_it_rain");
    self addMenuPar_withDef("main_fun_clone_anim", "poplock", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_poplock");
    self addMenuPar_withDef("main_fun_clone_anim", "praise_me", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_praise_me");
    self addMenuPar_withDef("main_fun_clone_anim", "see_me_swervin", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_see_me_swervin");
    self addMenuPar_withDef("main_fun_clone_anim", "shoulder_shrug", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_shoulder_shrug");
    self addMenuPar_withDef("main_fun_clone_anim", "so_fresh", &func_clonePlayer_playAnimation, "t7_loot_gesture_boast_so_fresh");
    self addMenuPar_withDef("main_fun_clone_anim", "bow", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_bow");
    self addMenuPar_withDef("main_fun_clone_anim", "but_that_flip_though", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_but_that_flip_though");
    self addMenuPar_withDef("main_fun_clone_anim", "chest_pound", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_chest_pound");
    self addMenuPar_withDef("main_fun_clone_anim", "clapping", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_clapping");
    self addMenuPar_withDef("main_fun_clone_anim", "close_call", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_close_call");
    self addMenuPar_withDef("main_fun_clone_anim", "high_five_for_one", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_high_five_for_one");
    self addMenuPar_withDef("main_fun_clone_anim", "jump_for_joy", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_jump_for_joy");
    self addMenuPar_withDef("main_fun_clone_anim", "mad_respect", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_mad_respect");
    self addMenuPar_withDef("main_fun_clone_anim", "mood_swing", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_mood_swing");
    self addMenuPar_withDef("main_fun_clone_anim", "nunchokes", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_nunchokes");
    self addMenuPar_withDef("main_fun_clone_anim", "peace", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_peace");
    self addMenuPar_withDef("main_fun_clone_anim", "point", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_point");
    self addMenuPar_withDef("main_fun_clone_anim", "salute", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_salute");
    self addMenuPar_withDef("main_fun_clone_anim", "selfie", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_selfie");
    self addMenuPar_withDef("main_fun_clone_anim", "string_theory", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_string_theory");
    self addMenuPar_withDef("main_fun_clone_anim", "thumbs_up", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_thumbs_up");
    self addMenuPar_withDef("main_fun_clone_anim", "youre_so_meme", &func_clonePlayer_playAnimation, "t7_loot_gesture_goodgame_youre_so_meme");
    self addMenuPar_withDef("main_fun_clone_anim", "shadowboxing", &func_clonePlayer_playAnimation, "t7_loot_gesture_shadowboxing");
    self addMenuPar_withDef("main_fun_clone_anim", "all_done", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_all_done");
    self addMenuPar_withDef("main_fun_clone_anim", "break_you", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_break_you");
    self addMenuPar_withDef("main_fun_clone_anim", "choke", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_choke");
    self addMenuPar_withDef("main_fun_clone_anim", "cut_throat", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_cut_throat");
    self addMenuPar_withDef("main_fun_clone_anim", "grave_digger", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_grave_digger");
    self addMenuPar_withDef("main_fun_clone_anim", "gun_slinger", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_gun_slinger");
    self addMenuPar_withDef("main_fun_clone_anim", "head_shot", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_head_shot");
    self addMenuPar_withDef("main_fun_clone_anim", "heart_attack", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_heart_attack");
    self addMenuPar_withDef("main_fun_clone_anim", "king_of_the_castle", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_king_of_the_castle");
    self addMenuPar_withDef("main_fun_clone_anim", "knuckle_sandwich", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_knuckle_sandwich");
    self addMenuPar_withDef("main_fun_clone_anim", "meanstreak", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_meanstreak");
    self addMenuPar_withDef("main_fun_clone_anim", "motivational", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_motivational");
    self addMenuPar_withDef("main_fun_clone_anim", "no_johns", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_no_johns");
    self addMenuPar_withDef("main_fun_clone_anim", "step_off", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_step_off");
    self addMenuPar_withDef("main_fun_clone_anim", "stomp_you_out", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_stomp_you_out");
    self addMenuPar_withDef("main_fun_clone_anim", "sweep_this", &func_clonePlayer_playAnimation, "t7_loot_gesture_threaten_sweep_this");
    self addHeadline("main_fun_clone_anim","Extras");
    self addMenuPar_withDef("main_fun_clone_anim", "pb_rifle_run_slide_r", &func_clonePlayer_playAnimation, "pb_rifle_run_slide_r");
    self addMenuPar_withDef("main_fun_clone_anim", "pb_rifle_free_climb_up", &func_clonePlayer_playAnimation, "pb_rifle_free_climb_up");
    self addMenuPar_withDef("main_fun_clone_anim", "pb_crouch_run_back", &func_clonePlayer_playAnimation, "pb_crouch_run_back");
    self addMenuPar_withDef("main_fun_clone_anim", "pb_death_fall_loop_lightning_gun", &func_clonePlayer_playAnimation, "pb_death_fall_loop_lightning_gun");
    self addMenuPar_withDef("main_fun_clone_anim", "pb_death_faceplant", &func_clonePlayer_playAnimation, "pb_death_faceplant");
    self addMenuPar_withDef("main_fun_clone_anim", "pb_death_headshot_front_v2", &func_clonePlayer_playAnimation, "pb_death_headshot_front_v2");
    self addMenuPar_withDef("main_fun_clone_anim", "pb_death_headshot_back", &func_clonePlayer_playAnimation, "pb_death_headshot_back");
    self addMenuPar_withDef("main_fun_clone_anim", "pb_death_blowback_b", &func_clonePlayer_playAnimation, "pb_death_blowback_b");
    self addMenuPar_withDef("main_fun_clone_anim", "pb_death_base_pose", &func_clonePlayer_playAnimation, "pb_death_base_pose");

    self addMenuPar_withDef("main_fun_clone", "Delete Current Clone", &func_clonePlayer_delete);
   
    self addMenuPar_withDef("main_fun", "Unlimited Player Energy", &quick_modificator, "playerEnergy_enabled", 0, 1);
    self addMenuPar_withDef("main_fun", "Toggle Invisible", &func_invisible);
    self addMenuPar_withDef("main_fun", "Toggle Flashing Player", &func_flashingPlayer);
    self addMenuPar_withDef("main_fun", "Toggle Rapid Fire", &func_rapfireeboi);
    self addMenuPar_withDef("main_fun", "Send Earthquake", &func_quake);
   
    /*self addHeadline("main_fun","Developer Tests");
    self addMenuPar_withDef("main_fun", "func_testTest", &func_testTest);
    self addMenuPar_withDef("main_fun", "func_dvar", &quick_modificator, "sprintLeap_enabled", 1, 0);
    self addMenuPar_withDef("main_fun", "func_dvar", &quick_modificator, "juke_enabled", 1, 0);
    */

   
    self addmenu("main_effects", "Graphics Effects Menu", "main");
    self addMenuPar_withDef("main_effects", "Toggle Disable FXs", &quick_modificator, "fx_enable", 0, 1);
    self addMenuPar_withDef("main_effects", "Toggle Fog Effect", &quick_modificator, "r_fog", 0, 1);
    self addMenuPar_withDef("main_effects", "Toggle Water Sheeting Effect", &quick_modificator, "r_waterSheetingFX_enable", 1, 0);
    self addMenuPar_withDef("main_effects", "Toggle Render Distance", &quick_modificator, "r_zfar", 1, 500,0);
       //self addMenuPar_withDef("main_effects", "Toggle DoF", &quick_modificator, "r_dof_enable", 0, 1);
    //self addMenuPar_withDef("main_effects", "Toggle DoF Bias", &quick_modificator, "r_dof_bias", 0, 3, 0.5);
    //self addMenuPar_withDef("main_effects", "Toggle Override DoF", &quick_modificator, "r_dof_tweak", 1, 0);
    self addMenuPar_withDef("main_effects", "Toggle Crosshair", &quick_modificator, "cg_drawCrosshair", 0, 1);
    self addMenuPar_withDef("main_effects", "Toggle Crosshair Enemy Effect", &quick_modificator, "cg_crosshairEnemyColor", 0, 1);
     
       self addmenu("main_customize", "Customize Menu", "main");
    self addMenuPar_withDef("main_customize", "Theme Color", &controlMenu, "newMenu", "main_customize_theme");
    self addMenuPar_withDef("main_customize", "Menu Postion", &controlMenu, "newMenu", "main_customize_x");
    self addMenuPar_withDef("main_customize", "Toggle Developer", &setTogglerFunction,"developer");
   
    self addHeadline("main_customize","Menu Information");
    self addMenuPar_withDef("main_customize", "Current Version (13.1)", &S, "13.1");
    self addMenuPar_withDef("main_customize", "Updates?", &S, "Check out ^2cabconmodding.com^7 for updates!");
   
    self addmenu("main_customize_x", "Postion X of Menu", "main_customize");
    self addMenuPar_withDef("main_customize_x", "X to ^2+100 ^7Position", &setMenuSetting, "pos_x",100);
    self addMenuPar_withDef("main_customize_x", "X to ^2+10 ^7Position", &setMenuSetting, "pos_x",10);
    self addMenuPar_withDef("main_customize_x", "X to ^2+1 ^7Position", &setMenuSetting, "pos_x",1);
    self addMenuPar_withDef("main_customize_x", "X to ^1-1 ^7Position", &setMenuSetting, "pos_x", (0-1));
    self addMenuPar_withDef("main_customize_x", "X to ^1-10 ^7Position", &setMenuSetting, "pos_x", (0-10));
    self addMenuPar_withDef("main_customize_x", "X to ^1-100 ^7Position", &setMenuSetting, "pos_x", (0-100));

       self addmenu("main_customize_theme", "Theme Color", "main_customize");
    self updateMenu_color_system_Map("main_customize_theme", &setMenuSetting_ThemeColor);


   
    self addmenu("main_host", "Host Menu", "main");
    self addmenu("main_lobby", "Lobby Menu", "main");
    if(self isHost())
    {
        self addMenuPar_withDef("main_host", "Toggle Display DoF Informations", &quick_modificator, "r_dof_showdebug", 1, 0);

        //lobby
        self addMenuPar_withDef("main_lobby", "Toggle Super Speed", &quick_modificator,"g_speed",500,999,190);
        self addMenuPar_withDef("main_lobby", "Toggle Super Gravity", &quick_modificator, "bg_gravity", 400,100,800);
        self addMenuPar_withDef("main_lobby", "Toggle Super Physical Gravity", &quick_modificator, "phys_gravity", 50,0,-800);
        self addMenuPar_withDef("main_lobby", "Toggle Timescale", &quick_modificator, "timescale", 2,.5,1);
        self addMenuPar_withDef("main_lobby", "Disable Wallrun", &quick_modificator, "wallrun_enabled", 0, 1);
        self addMenuPar_withDef("main_lobby", "Disable Black Ops 3 Exo Suit", &quick_modificator, "doublejump_enabled", 0, 1);
        self addMenuPar_withDef("main_lobby", "Toggle Disable Ai Spawners", &quick_modificator, "ai_disableSpawn", 1, 0);
        self addMenuPar_withDef("main_lobby", "Toggle Friendlyfire", &quick_modificator, "scr_friendlyfire", 1, 0);
        self addMenuPar_withDef("main_lobby", "Toggle Entity Collision", &quick_modificator, "phys_entityCollision", 0, 1);
       
    }
    else
        self addMenuPar_withDef("main_host", "You can not access this Menu!", &controlMenu, "newMenu", "main_host");
   
    self addmenu("main_clients", "Client List", "main");
    self setup_clientMenu();
}

function refreshClienMenu()
{
    //NOT VALID
}
function setup_clientMenu()
{
    if(self isHost())
    {
        for( a = 0; a < getplayers().size; a++ )
        {
            player = getplayers()[a];
            self addMenuPar_withDef("main_clients", getNameNotClan(player)+" Options", &controlMenu, "newMenu", "main_clients_"+getNameNotClan(player));
            self addmenu("main_clients_"+getNameNotClan(player), getNameNotClan( player )+" Options", "main_clients");
            self addMenuPar_withDef("main_clients_"+getNameNotClan(player), "God Mode", &cli_godmode, player );
            self addMenuPar_withDef("main_clients_"+getNameNotClan(player), "Player Score Menu", &controlMenu, "newMenu", "main_clients_score"+getNameNotClan(player));
            self addMenuPar_withDef("main_clients_"+getNameNotClan(player), "Give Menu", &verificationOptions, player, "changeVerification", "admin" );
            self addMenuPar_withDef("main_clients_"+getNameNotClan(player), "Teleport to Player", &cli_teleportto, player);
            self addMenuPar_withDef("main_clients_"+getNameNotClan(player), "Teleport Player to you", &cli_teleporttoyou, player);
            self addMenuPar_withDef("main_clients_"+getNameNotClan(player), "Teleport Player with Selector", &func_teleportWithSelector, player);
           
            self addmenu("main_clients_score"+getNameNotClan(player), "Give "+getNameNotClan(player)+" Score", "main_clients_"+getNameNotClan(player));
            self addMenuPar_withDef("main_clients_score"+getNameNotClan(player), "Give Points +10000", &cli_givePoints, player, 10000);
            self addMenuPar_withDef("main_clients_score"+getNameNotClan(player), "Give Points 500", &cli_givePoints, player, 500);
            self addMenuPar_withDef("main_clients_score"+getNameNotClan(player), "Give Points -500", &cli_givePoints, player, (0-500));
            self addMenuPar_withDef("main_clients_score"+getNameNotClan(player), "Give Points -10000", &cli_givePoints, player, (0-10000));
        }
    }
    else
        self addMenuPar_withDef("main_clients", "You can not access this Menu!", &controlMenu, "newMenu", "main_clients");
}


/*
* FUNCTIONS *
*/
function func_godmode()
{
    if(!isDefined(self.gamevars["godmode"]))
    {
        self.gamevars["godmode"] = true;
        self enableInvulnerability();
        S("God Mode ^2ON");
    }
    else
    {
        self.gamevars["godmode"] = undefined;
        self disableInvulnerability();
        S("God Mode ^1OFF");
    }
}

function func_ufomode()
{
    if(!isDefined(self.gamevars["ufomode"]))
    {
        self thread func_activeUfo();
        self.gamevars["ufomode"] = true;
        S("UFO Mode ^2ON");
        S("Press [{+frag}] To Fly");
    }
    else
    {
        self notify("func_ufomode_stop");
        self.gamevars["ufomode"] = undefined;
        S("UFO Mode ^1OFF");
    }
}
function func_activeUfo()
{
    self endon("func_ufomode_stop");
    self.Fly = 0;
    UFO = spawn("script_model",self.origin);
    for(;;)
    {
        if(self FragButtonPressed())
        {
            self playerLinkTo(UFO);
            self.Fly = 1;
        }
        else
        {
            self unlink();
            self.Fly = 0;
        }
        if(self.Fly == 1)
        {
            Fly = self.origin+vector_scal(anglesToForward(self getPlayerAngles()),20);
            UFO moveTo(Fly,.01);
        }
        wait .001;
    }
}

function vector_scal(vec, scale)
{
    vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
    return vec;
}

function func_unlimitedAmmo()
{
    if(!isDefined(self.gamevars["ammo_weap"]))
    {
        self notify("stop_ammo");
        self thread func_ammo();
        S("Unlimited Ammo ^2ON");
        self.gamevars["ammo_weap"] = true;
    }
    else
    {
        self notify("stop_ammo");
        self.gamevars["ammo_weap"] = undefined;
        S("Unlimited Ammo ^1OFF");
    }
}

function func_ammo()
{
    self endon("stop_ammo");
    for(;;)
    {
            if(self.gamevars["ammo_weap"]==true)
            {  
                if ( self getcurrentweapon() != "none" )
                {
                    self setweaponammostock( self getcurrentweapon(), 1337 );
                    self setweaponammoclip( self getcurrentweapon(), 1337 );
                }
            }
        wait .1;
    }
}
function func_addScore(i)
{
    self.score += i;
    S("Score set to ^2"+self.score);
}

function func_thirdPerson()
{
    if(!isDefined(self.gamevars["thirdPerson"]))
    {
        self SetClientThirdPerson( 1 );
        self SetClientThirdPersonAngle( 354 );
        self setDepthOfField( 0, 128, 512, 4000, 6, 1.8 );
        self.gamevars["thirdPerson"] = true;
    }
    else
    {
        self SetClientThirdPerson( 0 );
        self SetClientThirdPersonAngle( 0 );
        self setDepthOfField( 0, 0, 512, 4000, 4, 0 );
        self.gamevars["thirdPerson"] = undefined;
    }
    self resetFov();
}
function func_doGivePerk_all()
{
    perks = strtok("specialty_flakjacket,specialty_nottargetedbyairsupport,specialty_gpsjammer,specialty_stunprotection,specialty_showenemyequipment,specialty_nottargetedbyaitank,specialty_immunecounteruav,specialty_sprintfire,specialty_fastweaponswitch,specialty_scavenger,specialty_jetquiet,specialty_loudenemies,specialty_quieter", ",");
    foreach( perk in perks )
        self setperk( perk );
    S("All Perks ^2Given");
}

function func_doGivePerk(perk)
{
    if(self HasPerk(perk))
    {
        S("^1You already have this perk!");
        return;
    }
    self setperk( perk );
    S(perk+" ^2Given");
}

function func_sendPowerUp(i)
{
    S(getOptionName()+" ^2droped");
}


function func_fxBullets(i)
{
    if(self.gamevars["magicbullet"] == true)
    {
        self func_magicbullet_stop();
    }
    self notify("func_fxBullets_stop");
    self endon("func_fxBullets_stop");
    self.gamevars["fx_bullets"] = true;
    S("Fx Bullets set to ^2"+i);
    for(;;)
    {
        self waittill("weapon_fired");
        if(IsInArray(level._effect, level._effect[ i ]))
            TriggerFX(spawnFX(level._effect[ i ] , BulletTrace(self gettagorigin("tag_eye"), anglestoforward(self getPlayerAngles())* 1000000, true, self)["position"]));
        else
            S("ERROR: level._effect "+i+" is not in the array level._effect!");
    }
}
function func_fxBullets_stop()
{
    if(!isDefined(self.gamevars["fx_bullets"]) || self.gamevars["fx_bullets"] == false)
        S("^1Fx Bullets is already OFF. Choose a Fx to turn it on!");
    else
    {
        self notify("func_fxBullets_stop");
        self.gamevars["fx_bullets"] = undefined;
        S("FX Bullets ^1OFF");
    }
}

function func_magicbullet(i)
{
    if(self.gamevars["fx_bullets"] == true)
        self func_fxBullets_stop();
    self notify("func_magicbullettest_stop");
    self endon("func_magicbullettest_stop");
    self.gamevars["magicbullet"] = true;
    self iprintln("Weapon Bullets set to ^2"+i.name);
    for(;;)
    {
        self waittill( "weapon_fired" );
        MagicBullet( i, self GetEye(), BulletTrace(self GetEye(), self GetEye() + AnglesToForward(self GetPlayerAngles()) * 100000, false, self)["position"], self);
        wait .02;
    }
}
function func_magicbullet_stop()
{
    if(!isDefined(self.gamevars["magicbullet"]) || self.gamevars["magicbullet"] == false)
        S("^1Weapon Bullets is already OFF. Choose a Fx to turn it on!");
    else
    {
        self notify("func_magicbullettest_stop");
        self.gamevars["magicbullet"] = undefined;
        S("Weapon Bullets ^1OFF");
    }
}


////////////
// WP MODS
////////////

function func_packcurrentWeapon()
{
   
}
function func_unpackcurrentWeapon()
{

}

function func_dropcurrentWeapon()
{
    weapon = self getCurrentWeapon();
    self DropItem(weapon);
    S("Weapon ^2Dropped");
}


function func_messageSend(i)
{
    for( a = 0; a < getplayers().size; a++ )
        getplayers()[a] [[self.menu["message_type"]]](i);
}

function func_printMessage()
{
    if( self.menu["message_type"] == &Sb)
    {
        self.menu["message_type"] = &S;S("Print Methode Changed to ^2Left Corner Message");
    }
    /*else if( self.menu["message_type"] == &S)
    {
        self.menu["message_type"] = &C;S("Print Methode Changed to ^2Lobby Chat");
    }*/
    else if( self.menu["message_type"] == &S)
    {
        self.menu["message_type"] = &Sb;S("Print Methode Changed to ^2Center Screen Message");
    }
}
function cli_givePoints(player, ammount)
{
    player thread func_addScore(ammount);
}

function cli_godmode(player)
{
    player thread func_godmode();
}


function verificationOptions(player, par2, par3)
{
    if ( player IsTestClient() )
    {
        S("^1You can not modify the Bots");
        return;
    }
    if( par2 == "changeVerification" )
    {
        if( player == getplayers()[0] )
             return S( "^1You can not modify the Host");
        player setVerification(par3);
        S(getNameNotClan( player )+"'s verification has been changed to "+par3);
        player iPrintLn("Your verification has been changed to "+par3);
        player iPrintLn("Press ^2[{+speed_throw}]^7 and ^2[{+melee}]");
    }
}

function setVerification( type )
{
    self.playerSetting["verfication"] = type;
    S("Your Status changed to ^2"+self.playerSetting["verfication"]);
}

function getVerfication()
{
    if( self.playerSetting["verfication"] == "admin" )
        return 3;
    if( self.playerSetting["verfication"] == "co-host" )
        return 2;
    if( self.playerSetting["verfication"] == "verified" )
        return 1;
    if( self.playerSetting["verfication"] == "unverified" )
        return 0;
}

function quick_modificator(input,i_1,i_2,i_3)
{
   
    if(isEmpty(i_3))
        i_3 = undefined;
    if(self.gamevars[input]==0 || !isDefined(self.gamevars[input]))
    {
        SetDvar( input , i_1 );
        self.gamevars[input]=1;
        S(getOptionName()+" ^2ON^7 - var "+input+" set to "+i_1);
    }
    else if(self.gamevars[input]==1)
    {
        SetDvar( input, i_2 );
        if(isDefined(i_3))
        {
            self.gamevars[input]=2;
            S(getOptionName()+" ^2ON^7 - var "+input+" set to "+i_2);
        }
        else
        {
            self.gamevars[input]=0;
            S(getOptionName()+" ^1OFF^7 - var "+input+" set to "+i_2);
        }
    }
    else if(self.gamevars[input]==2)
    {
        SetDvar( input,i_3 );
        self.gamevars[input]=0;
        S(getOptionName()+" ^1OFF^7 - var "+input+" set to "+i_3);
    }
   
}

function isEmpty(i)
{
    if(i == "" || !isDefined(i))
        return true;
    else
        return false;
}

function func_setDvarFunction(dvar,i)
{
    SetDvar( dvar, i );
    S("Var ^2"+dvar+"^7 setted to ^2"+i);
}

function func_togglehideWeapon()
{
    if(getDvarint("cg_drawGun") == 0)
       setDvar("cg_drawGun", "1");
    else
       setDvar("cg_drawGun", "0");
    self S("Hide Gun " + ((getDvarint("cg_drawGun") == 0) ? "^2ON" : "^1OFF"));
}
function func_togglehideCrosshair()
{
    if(getDvarint("cg_drawCrosshair") == 0)
       setDvar("cg_drawCrosshair", 1);
    else
       setDvar("cg_drawCrosshair", 0);
    self S("Crosshair " + ((getDvarint("cg_drawGun") == 0) ? "^2ON" : "^1OFF"));
}

function func_getOrigin()
{
    S("Your Origin ^2"+self GetOrigin());
}

function cli_teleportto(i)
{
    if(i == self)
    {
        S("^1You are not able to teleport yourself to yourself.");
        return;
    }
    self SetOrigin(i GetOrigin());
}

function cli_teleporttoyou(i)
{
    if(i == self)
    {
        S("^1You are not able to teleport yourself to yourself.");
        return;
    }
    i SetOrigin(self GetOrigin());
}

function updateMenu_color_system_Map(menu,i)
{
    self addMenuPar_withDef(menu, "Set To Royal Blue", i, ((34/255),(64/255),(139/255)));
    self addMenuPar_withDef(menu, "Set To Raspberry", i, ((135/255),(38/255),(87/255)));
    self addMenuPar_withDef(menu, "Set To Skyblue", i, ((135/255),(206/255),(250/250)));
    self addMenuPar_withDef(menu, "Set To Hot Pink", i, ((1),(0.0784313725490196),(0.5764705882352941)));
    self addMenuPar_withDef(menu, "Set To Lime Green", i, (0,1,0));
    self addMenuPar_withDef(menu, "Set To Dark Green", i, (0/255, 51/255, 0/255));
    self addMenuPar_withDef(menu, "Set To Brown", i, ((0.5450980392156863),(0.2705882352941176),(0.0745098039215686)));
    self addMenuPar_withDef(menu, "Set To Blue", i, (0,0,1));
    self addMenuPar_withDef(menu, "Set To Red", i, (1,0,0));
    self addMenuPar_withDef(menu, "Set To Maroon Red", i, (128/255,0,0));
    self addMenuPar_withDef(menu, "Set To Orange", i, (1,0.5,0));
    self addMenuPar_withDef(menu, "Set To Purple", i, ((0.6274509803921569),(0.1254901960784314),(0.9411764705882353)));
    self addMenuPar_withDef(menu, "Set To Cyan", i, (0,1,1));
    self addMenuPar_withDef(menu, "Set To Yellow", i, (1,1,0));
    self addMenuPar_withDef(menu, "Set To Black", i, (0,0,0));
    self addMenuPar_withDef(menu, "Set To White", i, (1,1,1));
}

function func_invisible()
{
    if(!self.gamevars["invisible"])
    {
        self hide();
        self.gamevars["invisible"] = true;
        S("You are ^2Invisible");
    }
    else
    {
        self show();
        self.gamevars["invisible"] = false;
        S("You are ^1Visible");
    }
}

function func_flashingPlayer()
{
    if(!isDefined(self.gamevars["flashingPlayer"]))
    {
        self.gamevars["flashingPlayer"] = true;
        self thread doFlashyPlayer();
        S("Flashing Player ^2ON^7");
    }
    else
    {
        self.gamevars["flashingPlayer"] = undefined;
        self notify("flashingPlayer_over");
        S("Flashing Player ^1OFF^7");
        self show();
    }
}

function doFlashyPlayer()
{
    self endon("death");
    self endon("disconnect");
    self endon("flashingPlayer_over");
    for(;;)
    {
        self show();
        wait .1;
        self hide();
        wait .1;
    }
}

function func_roundsystem(value,set)
{

}

function func_visionSet(input)
{
    //visionset_mgr::activate( "visionset", input, self, 1);
    S(getOptionName()+" Vision ^2set");
}
function func_visionReset()
{
    //visionset_mgr::deactivate( "visionset", "zombie_last_stand", self );
    //visionset_mgr::deactivate( "visionset", "zombie_death", self );
    S("Modded Vision ^1OFF");
}

function func_sound(i)
{
    self PlaySound(i);
    S("You are playing ^2"+getOptionName());
    L(i);
}
function func_aimbot()
{
    if(!isDefined(self.gamevars["aimbot"]) || !self.gamevars["aimbot"])
    {
        self.gamevars["aimbot"] = true;
        self thread func_core_aimbot();
        S("Aimbot ^2ON");
    }
    else
    {
        self.gamevars["aimbot"] = false;
        S("Aimbot ^1OFF");
    }
}

function func_aimbot_unfair()
{
    self.gamevars["aimbot_unfair"] = !self.gamevars["aimbot_unfair"];
    self S("Aimbot Unfair Mode " + ((self.gamevars["aimbot_unfair"] == 1) ? "^2ON" : "^1OFF"));
}

function func_aimbot_noaim_whenAiming()
{
    self.gamevars["aimbot_noads"] = !self.gamevars["aimbot_noads"];
    self S("Aimbot No targeting " + ((self.gamevars["aimbot_noads"] == 1) ? "^2ON" : "^1OFF"));
}

function func_aimbot_noads()
{
    self.gamevars["aimbot_noads_r"] = !self.gamevars["aimbot_noads_r"];
    self S("Aimbot No Aim Required " + ((self.gamevars["aimbot_noads_r"] == 1) ? "^2ON" : "^1OFF"));
    self S("You need to turn on Toggle Unfair Mode & Toggle Unfair Mode ++ to see the effect of this.");
}
function func_core_aimbot()
{
    aimat = undefined;
    while( self.gamevars["aimbot"] )
    {
        while( self adsButtonPressed() || self.gamevars["aimbot_noads_r"] )
        {
            aimAt = undefined;
            foreach(player in level.players)
            {
                if((player == self) || (!IsAlive(player)) || (level.teamBased && self.pers["team"] == player.pers["team"]))
                    continue;
                if(isDefined(aimAt))
                {
                    if(closer(self GetTagOrigin("j_head"), player GetTagOrigin("j_head"), aimAt GetTagOrigin("j_head")))
                        aimAt = player;
                }
                else aimAt = player;
            }
            if(isDefined(aimAt))
            {
                if(!self.gamevars["aimbot_noads"])
                    self setplayerangles(VectorToAngles((aimAt GetTagOrigin("j_head")) - (self GetTagOrigin("j_head"))));
                if( self.gamevars["aimbot_unfair"] )
                {
                    if(self attackbuttonpressed())
                        aimAt DoDamage( aimat.health + 1, aimat GetOrigin(), self);
                }
            }
            wait .05;
        }
        wait 0.1;
    }
}

function func_setVision(i)
{
    self UseServerVisionset( true );
    self SetVisionSetForPlayer( i, 1 );
    S("Vision set to ^2"+getOptionName());
}

function func_addBot(count)
{
    bot::add_bots(count);
    self IPrintLn("You added ^2"+count+"^7 Bots");
}

function func_killBots()
{
    players = GetPlayers();

    foreach( player in players )
    {
        if ( !player IsTestClient() )
        {
            continue;
        }

        player bot::kill_bot();
       
    }
}

function func_clonePlayer( player = self )
{
    if(isDefined(self.gamevars["Clone"]))
    {
        S("^1You already spawned a Clone, delete the current to spawn a new one.");
        return;
    }
    self.gamevars["Clone"] = player util::spawn_player_clone( player, "t7_loot_gesture_goodgame_salute" );
    S("Clone ^2Spawned");
}
function func_clonePlayer_playAnimation(animname)
{
    if(!isDefined(self.gamevars["Clone"]))
    {
        S("^1Spawn a Clone first!");
        return;
    }
    self.gamevars["Clone"] AnimScripted( "clone_anim", self.gamevars["Clone"].origin, self.gamevars["Clone"].angles, animname );
    S("Animation "+animname+" ^2Played");
}
function func_clonePlayer_delete()
{
    if(!isDefined(self.gamevars["Clone"]))
    {
        S("^1Spawn a Clone first!");
        return;
    }
    self.gamevars["Clone"] AnimScripted( "clone_anim", self.gamevars["Clone"].origin, self.gamevars["Clone"].angles, "pb_death_headshot_back" );
    wait 2;
    self.gamevars["Clone"] delete();
    self.gamevars["Clone"] = undefined;
    S("Clone ^2deleted");
}
function func_clonePlayer_teleportToYou()
{
    if(!isDefined(self.gamevars["Clone"]))
    {
        S("^1Spawn a Clone first!");
        return;
    }
    self.gamevars["Clone"] SetOrigin(self.origin);
    self.gamevars["Clone"] AnimScripted( "clone_anim", self.origin, self.angles, "pb_death_base_pose" );
    S("Clone ^2teleported");
}

function func_teleportWithSelector(player)
{
    currentWeapon = self GetCurrentWeapon();
    self beginLocationSelection("map_mortar_selector");
 
    self DisableOffhandWeapons();
    self GiveWeapon(GetWeapon("killstreak_remote_turret"));
    self SwitchToWeapon(GetWeapon("killstreak_remote_turret"));

    self.selectingLocation = true;
    location = self func_waittill_confirm_location();

    if ( !isdefined( location ) )
    {
        self IPrintLn("^1Not able to get any origin!");
        return false;
    }

    player SetOrigin( location );
    self EndLocationSelection();
    self EnableOffhandWeapons();
    self SwitchToWeapon(currentWeapon);
    self.selectingLocation = undefined;

    self iprintln("You teleported ^2"+player.name);
}
function func_waittill_confirm_location()
{
    self endon( "emp_jammed" );
    self endon( "emp_grenaded" );

    self waittill( "confirm_location", location );
 
    return location;
}

function func_teleportWeapon()
{
    if (!isDefined(self.gamevars["func_teleportWeapon"]))
    {
        self thread func_core_teleportWeapon();
        self.gamevars["func_teleportWeapon"] = true;
        S("Teleport Gun ^2ON");
    }
    else
    {
        self notify("func_teleportWeapon_stop");
        self.gamevars["func_teleportWeapon"] = false;
        S("Teleport Gun ^1OFF");
    }
}

function func_core_teleportWeapon()
{
    self endon( "disconnect" );
    self endon( "func_teleportWeapon_stop" );
    for(;;)
    {
        self waittill("weapon_fired");
        self setorigin(bullettrace(self gettagorigin("j_head"), self gettagorigin("j_head") + anglesToForward(self getplayerangles()) * 1000000, 0, self)["position"]);
    }
}


function func_testTest()
{
    self util::do_chyron_text( "str_1_full" , "str_1_short" , "str_2_full" , "str_2_short" , "str_3_full" , "str_3_short" , "str_4_full" , "str_4_short" );
    S("^2DONE");
}


function func_giveWeapon(weapon)
{
    self TakeWeapon(self GetCurrentWeapon());
    weapon = getWeapon(weapon);
    self GiveWeapon(weapon);
    self GiveMaxAmmo(weapon);
    self SwitchToWeapon(weapon);
    S(getOptionName()+" ^2Given");
}
function func_giveRandomWeapon()
{
    weaponsList_array = strTok("shotgun_semiauto ar_standard sniper_fastbolt sniper_powerbolt ar_marksman lmg_heavy "," ");
    for(;;)
    {
        weaponPick = array::random(weaponsList_array);
        weaponPick = getWeapon(weaponPick);
        if( self hasWeapon( weaponPick ) )
            continue;
        else if ( weapons::is_primary_weapon( weaponPick ) )
            break;
        else if ( weapons::is_side_arm( weaponPick ) )
            break;
        else
            continue;
    }
    self iprintln(weaponPick.displayName);
    self iprintln(weaponPick.name);
    self.list_camo++;
    S(self.list_camo);
    self TakeWeapon(self GetCurrentWeapon());
    self GiveWeapon(weaponPick, self CalcWeaponOptions( self.list_camo, 1, 1, true, true, true, true ));
    self GiveMaxAmmo(weaponPick);
    self SwitchToWeapon(weaponPick);
}

function func_giveCamo(camo_int)
{
    s_weapon = self GetCurrentWeapon();
    self TakeWeapon(s_weapon);
    self GiveWeapon(s_weapon, self CalcWeaponOptions( Int(camo_int), 1, 1, true, true, true, true ));
    self GiveMaxAmmo(s_weapon);
    self SwitchToWeapon(s_weapon);
    S("^2Success");
}
function func_giveCamorandom()
{
    self func_giveCamo(randomIntRange(0,126));
}

function func_weaponTest()
{
    weapon = self GetCurrentWeapon();
    S("displayname: ^2"+weapon.displayname );
    S("name: ^2"+weapon.name );
    S("maxammo: ^2"+weapon.maxammo );
    S("worldmodel: ^2"+weapon.worldmodel );
}

function func_rapfireeboi()
{
    if(!isDefined(self.gamevars["israpfireonorno"]))
    {
        self.gamevars["israpfireonorno"] = true;
        self S( "Rapid Fire ^2ON" );
        setdvar( "perk_weapRateMultiplier", "0.001" );
        setdvar( "perk_weapReloadMultiplier", "0.001" );
        setdvar( "perk_fireproof", "0.001" );
        setdvar( "cg_weaponSimulateFireAnims", "0.001" );
        self setperk( "specialty_rof" );
        self setperk( "specialty_fastreload" );
    }
    else
    {
        self.gamevars["israpfireonorno"] = undefined;
        self S( "Rapid Fire ^1OFF" );
        setdvar( "perk_weapRateMultiplier", "1" );
        setdvar( "perk_weapReloadMultiplier", "1" );
        setdvar( "perk_fireproof", "1" );
        setdvar( "cg_weaponSimulateFireAnims", "1" );
        self unsetperk( "specialty_rof" );
        self unsetperk( "specialty_fastreload" );
    }

}

function func_quake()
{
    earthquake( 0.6, 10, self.origin, 100000 );
}

Hey thanks for posting it! But it's not working for some reason... When I load it my screen just keeps flickering forever and I can not play it. Can you pm me the most recent source (if you still have it) ? thanks...
 
Top