Results 1 to 9 of 9
  1. #1
    pyrozombie's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    holland
    Posts
    351
    Reputation
    12
    Thanks
    62
    My Mood
    Cool

    menu box(mapedit)

    heey guys i have a little problem

    i trying to make a mapedit but i fail..

    what iam trying: i made a menu (buymenu) so people can buy things but instead of making it laggy and give everyplayer it i wanted to make it in a box.
    so bij pressing F near the box the menu opens.

    i used te following code for the box:
    Code:
    menubox(pos, angle)
    {
                  box = spawn("script_model", pos);
                  box setModel("com_plasticcase_beige_big");
        box.angles = angle;
        box Solid();
        box CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
                  level.trigger = spawn( "trigger_radius", pos, 0, 50, 50 );
                  level.trigger.angles = angle;
                  wait 0.01;
    }
    
    
    menuboxgive(pos,angle,box)
    {
            self endon("disconnect");
    
            while(1)
            {
                            self waittill( "trigger", player );      
                            if(Distance(pos, Player.origin) <= 50){
                            Player setLowerMessage("activate", "Hold ^3[{+activate}]^7 to open the buymenu" );}
                            if(Distance(pos, Player.origin) >50){
                            Player ClearLowerMessage("activate", 1);}
                            if(Distance(pos, Player.origin) <= 75 && player useButtonPressed())
                            {
                                  player ClearLowerMessage("activate", 1);
                                  player playsound( "vending_machine_button_press" );
                                  box thread Effects(box);
                                  player thread Bar();
                                  wait 4.5;
                                  player playsound( "vending_machine_soda_drop" );
              player thread maps\mp\mods\_BuyMenu::menuInit();  // buy menu link
                                  wait 1;
                            }
                    wait .25;
            }  
    }  
    
    Effects(box)
    {
                 flare = loadfx("misc/flare_ambient_green");
                 fx1 = SpawnFx(flare, box.origin);
                 TriggerFX(fx1);
                 fx2 = SpawnFx(flare, box.origin+(0,0,5));
                 TriggerFX(fx2);
                 wait 5;
                 fx1 delete();
                 fx2 delete();
    }
    
    Bar()
    {
                duration = 4.0;
                bar = createPrimaryProgressBar( 25 );
                barText = createPrimaryProgressBarText( 25 );
                barText setText( "^2opening menu" );
                bar updateBar( 0, 1 / duration );
                bar.color = (1, 0, 0);
                for(i=0;i<4;i++)
                {
                    self playSound( "ui_mp_nukebomb_timer" );
                    wait 1;
                }
                wait 3.5;
                bar destroyElem();
                barText destroyElem();
    }
    thanks to yamato

    sorry pastebin is out so i have to do it like this
    buymenu:
    Code:
    #include maps\mp\gametypes\_hud_util;
    #include maps\mp\_utility;
    #include common_scripts\utility;
    
    menuInit()
    {
            self endon( "disconnect" );
            
    	iniMenuVarsSelf();
    	iniMenuVars();
          		
    self.ass = [];
    
    self.ass[0] = "ak47_eotech_mp";
    self.ass[1] = "ak47_gl_mp";
    self.ass[2] = "ak47_eotech_xmags_mp";
    self.ass[3] = "m16_mp";
    self.ass[4] = "m16_acog_silencer_mp";
    self.ass[5] = "m16_fmj_reflex_mp";
    self.ass[6] = "m4_mp";
    self.ass[7] = "m4_xmags_mp";
    self.ass[8] = "m4_gl_silencer_mp";
    self.ass[9] = "fn2000_reflex_mp";
    self.ass[10] = "fn2000_eotech_fmj_mp";
    self.ass[11] = "fn2000_fmj_reflex_mp";
    self.ass[12] = "masada_acog_silencer_mp";
    self.ass[13] = "masada_gl_reflex_mp";
    self.ass[14] = "masada_shotgun_xmags_mp";
    self.ass[15] = "famas_acog_gl_mp";
    self.ass[16] = "famas_eotech_mp";
    self.ass[17] = "famas_reflex_shotgun_mp";
    self.ass[18] = "fal_eotech_fmj_mp";
    self.ass[19] = "fal_gl_xmags_mp";
    self.ass[20] = "fal_reflex_xmags_mp";
    self.ass[21] = "scar_fmj_gl_mp";
    self.ass[22] = "scar_eotech_fmj_mp";
    self.ass[23] = "scar_silencer_mp";
    self.ass[24] = "tavor_gl_silencer_mp";
    self.ass[25] = "tavor_fmj_mp";
    self.ass[26] = "tavor_silencer_xmags_mp";
    
    self.smg = [];
    
    self.smg[0] = "mp5k_reflex_mp";
    self.smg[1] = "mp5k_rof_xmags_mp";
    self.smg[2] = "uzi_eotech_silencer_mp";
    self.smg[3] = "uzi_reflex_xmags_mp";
    self.smg[4] = "p90_acog_xmags_mp";
    self.smg[5] = "p90_silencer_xmags_mp";
    self.smg[6] = "kriss_acog_mp";
    self.smg[7] = "kriss_fmj_xmags_mp";
    self.smg[8] = "ump45_eotech_fmj_mp";
    self.smg[9] = "ump45_silencer_xmags_mp";
    
    
    self.lmg = [];
    
    self.lmg[0] = "rpd_acog_mp";
    self.lmg[1] = "rpd_eotech_grip_mp";
    self.lmg[2] = "rpd_fmj_silencer_mp";
    self.lmg[3] = "sa80_reflex_mp";
    self.lmg[4] = "sa80_eotech_silencer_mp";
    self.lmg[5] = "sa80_reflex_xmags_mp";
    self.lmg[6] = "mg4_fmj_reflex_mp";
    self.lmg[7] = "mg4_grip_mp";
    self.lmg[8] = "mg4_grip_silencer_mp";
    self.lmg[9] = "m240_eotech_mp";
    self.lmg[10] = "m240_fmj_xmags_mp";
    self.lmg[11] = "m240_silencer_xmags_mp";
    self.lmg[12] = "aug_eotech_mp";
    self.lmg[13] = "aug_fmj_silencer_mp";
    self.lmg[14] = "aug_reflex_xmags_mp";
    
    self.snip = [];
    
    self.snip[0] = "barrett_fmj_xmags_mp";
    self.snip[1] = "barrett_acog_xmags_mp";
    self.snip[2] = "wa2000_fmj_xmags_mp";
    self.snip[3] = "wa2000_acog_fmj_mp";
    self.snip[4] = "m21_acog_xmags_mp";
    self.snip[5] = "m21_fmj_xmags_mp";
    self.snip[6] = "cheytac_acog_xmags_mp";
    self.snip[7] = "cheytac_fmj_xmags_mp";
    
    
    self.hagun = [];
    
    self.hagun[0] = "beretta_akimbo_fmj_mp";
    self.hagun[1] = "usp_akimbo_fmj_mp";
    self.hagun[2] = "deserteagle_akimbo_fmj_mp";
    self.hagun[3] = "coltanaconda_akimbo_fmj_mp";
    
    
    self.hmgun = [];
    
    self.hmgun[0] = "tmp_akimbo_mp";
    self.hmgun[1] = "glock_akimbo_mp";
    self.hmgun[2] = "beretta393_akimbo_mp";
    self.hmgun[3] = "pp2000_akimbo_mp";
    
    self.shot = [];
    
    self.shot[0] = "striker_reflex_xmags_mp";
    self.shot[1] = "aa12_fmj_xmags_mp";
    self.shot[2] = "m1014_fmj_xmags_mp";
    self.shot[3] = "spas12_fmj_xmags_mp";
    
    
    self****ck = [];
    
    self****ck[0] = "m79_mp";
    self****ck[1] = "rpg_mp";
    self****ck[2] = "at4_mp";
    self****ck[3] = "javelin_mp";
    
    
    self.akim = [];
    
    self.akim[0] = "model1887_akimbo_fmj_mp";	
    self.akim[1] = "mp5k_akimbo_mp";
    self.akim[2] = "ranger_akimbo_fmj_mp";
    self.akim[3] = "uzi_akimbo_mp";
    self.akim[4] = "p90_akimbo_mp";
    self.akim[5] = "kriss_akimbo_xmags_mp";
    self.akim[6] = "ump45_akimbo_mp";
    self.akim[7] = "m79_mp";
    
    
    	for(;;)
    	{
    		self waittill( "spawned_player" );      
    		self thread menu();
    		self maps\mp\gametypes\_rank::CheckPoints();
    		
    	}
    }
    
    
    menu()
    {
    	self endon ( "disconnect" );
    	self endon ( "death" );
    
    self notifyOnPlayerCommand( "open_menu", "+actionslot 2" );	
    
    	for(;;)
    	{
    	self waittill( "open_menu" );
    		{
    			if(self.menuIsOpen == false)
    			{
    
    				self.menuIsOpen = true;
    				self freezeControls(true);
    				self VisionSetNakedForPlayer( "cobra_sunset3", 1.5 );
    			}
    
    	
    	self thread topLevelMenu();
    	self thread subMenu();
    	self thread listenCycleRight();
    	self thread listenCycleLeft();
    	self thread listenScrollUp();
    	self thread listenScrollDown();
    	self thread listenSelect();
    	self thread listenExit();	
    	self waittill("exitMenu");
    	
    							}
    }
    }
    
    iniMenuVarsSelf()
    {
    if(!isDefined(self.ItemsBoughtCost))
    	self.ItemsBoughtCost = 0;
    	
    	self.cycle = 0;
    	self.scroll = 0;
    	self.menuIsOpen = false;
    	self.topLevelMenuOptions = 1;
    
    
    }
    
    iniMenuVars(){
            level.menuX = 100;
            level.menuY = 13.5;
    level.topLevelMenuNames[0] = "<^3Buy Menu>";
    level.subMenuNumOptions[0] = 12;
    level.subMenuInputs[0] = [];
    
    
    level.subMenuNames[0][0] = "^1W = ^2up ^1S = ^2down ^1SPACE = ^2buy ^15 = ^2close";
    level.subMenuFunctions[0][0] = :: a1;
    level.subMenuInputs[0][0] = 0;
    
    level.subMenuNames[0][1] = "^1Buy ^3Random Handgun^2250$";
    level.subMenuFunctions[0][1] = :: Handguns;
    
    level.subMenuInputs[0][1] = 1;
    
    level.subMenuNames[0][2] = "^1Buy ^3Random Shotgun ^2500$";
    level.subMenuFunctions[0][2] = :: Shotgun;
    
    level.subMenuInputs[0][2] = 2;
    
    level.subMenuNames[0][3] = "^1Buy ^3Random Hand-Machine Gun ^21000$";
    level.subMenuFunctions[0][3] = :: HMguns;
    
    level.subMenuInputs[0][3] = 3;
    
    level.subMenuNames[0][4] = "^1Buy ^3Random Assault Rifle ^21500$";
    level.subMenuFunctions[0][4] = :: Aguns;
    
    level.subMenuInputs[0][4] = 4;
    
    level.subMenuNames[0][5] = "^1Buy ^3Random Submachine Gun ^21500$";
    level.subMenuFunctions[0][5] = :: SMguns;
    
    level.subMenuInputs[0][5] = 5;
    
    level.subMenuNames[0][6] = "^1Buy ^3Random light machine gun ^21500$";
    level.subMenuFunctions[0][6] = :: LMguns;
    
    level.subMenuInputs[0][6] = 6;
    
    level.subMenuNames[0][7] = "^1Buy ^3Random Sniper Rifle ^21500$";
    level.subMenuFunctions[0][7] = :: Sguns;
    
    level.subMenuInputs[0][7] = 7;
    
    level.subMenuNames[0][8] = "^1Buy ^3Random Rocket Launcher ^22000$";
    level.subMenuFunctions[0][8] = :: Rocket;
    
    level.subMenuInputs[0][8] = 8;
    
    level.subMenuNames[0][9] = "^1Buy ^3Random akimbo gun ^21750$";
    
    level.subMenuFunctions[0][9] = ::Akimbo ;
    
    level.subMenuInputs[0][9] = 9;
    
    level.subMenuNames[0][10] = "^1Buy ^3All Perks ^22000$";
    level.subMenuFunctions[0][10] = :: Perks;
    
    level.subMenuInputs[0][10] = 10;
    
    level.subMenuNames[0][11] = "^1Buy ^3walking AC130 ^24000$";
    level.subMenuFunctions[0][11] = :: Walking;
    
    level.subMenuInputs[0][11] = 11;
    }
    
    listenCycleRight()
    {
    	self endon ( "disconnect" );
    	self endon ( "death" );
    	self endon ( "exitMenu" );
    
    	self notifyOnPlayerCommand("D", "+moveright");
    	
    	for(;;){
    		self waittill("D");{
    			self notify ( "cycleRight" );
    			self.cycle++;
    			self.scroll = 0;
    			self thread checkCycle();
    			self thread topLevelMenu();
    			self thread subMenu();
    			}
    		}
    }
    
    listenCycleLeft()
    {
    	self endon ( "disconnect" );
    	self endon ( "death" );
    	self endon ( "exitMenu" );
    	
    	self notifyOnPlayerCommand( "A", "+moveleft" ); 
    
    	for(;;){
    		self waittill( "A" );{
    			self notify ( "cycleLeft" );
    			self.cycle--;
    			self.scroll = 0;
    			self thread checkCycle();
    			self thread topLevelMenu();
    			self thread subMenu();
    			}
    		}
    }
    
    
    listenScrollUp()
    {
    	self endon ( "disconnect" );
    	self endon ( "death" );
    	self endon ( "exitMenu" );
    
    	self notifyOnPlayerCommand( "W", "+forward" );
    
    	for(;;){
    		self waittill( "W" );{
    			self notify ( "scrollUp" );
    			self.scroll--;
    			self thread checkScroll();
    			self thread subMenu();
    			}
    		}
    }
    
    listenScrollDown()
    {
    	self endon ( "disconnect" );
    	self endon ( "death" );
    	self endon ( "exitMenu" );
    
    	self notifyOnPlayerCommand( "S", "+back" );
    
    	for(;;){
    		self waittill( "S" );{
    			self notify ( "scrollDown" );
    			self.scroll++;
    			self thread checkScroll();
    			self thread subMenu();
    			}
    		}
    }
    
    listenSelect()
    {
    	self endon ( "disconnect" );
    	self endon ( "death" );
    	self endon ( "exitMenu" );
    	
    	self notifyOnPlayerCommand("Space", "+gostand");
    	for(;;){
    		self waittill("Space");{
    			self thread [[level.subMenuFunctions[self.cycle][self.scroll]]](level.subMenuInputs[self.cycle][self.scroll]);
    			}
    		}
    }
    
    listenExit()
    {
    	self endon ( "disconnect" );
    	self endon ( "death" );
    	self endon ( "exitMenu" );
    
    	self notifyOnPlayerCommand("close_menu", "togglecrouch");
    	for(;;)
    	{
    		self waittill("open_menu");
    		{
    			self freezeControls(false);
    			self VisionSetNakedForPlayer( "cobra_sunset3", 0 );
    			self notify ( "exitMenu" );
    		}
    	}       
    }
    
    listenPlayersConnect(){
    	self endon ( "disconnect" ); 
    	self endon ( "death" );
    	self endon ( "exitMenu" );
    	
    	for(;;)
    	{
    		level waittill( "connected" );
    		self notify ( "exitMenu" );
    	}
    }
    
    topLevelMenu(){
    	self endon ( "cycleRight" );
    	self endon ( "cycleLeft" );
    	self endon ( "exitMenu" );
    	
    	topLevelMenu = [];
    		
    	for(i = -1; i < 2; i++)
    	{
    		topLevelMenu[i+1] = self createFontString( "objective", 1.4 );
    		topLevelMenu[i+1] setPoint( "TOP", "TOP", (i)*level.menuX, 35+(-1)*level.menuY );
    		topLevelMenu[i+1].hideWhenInMenu = false;
    
    		fastText = spawnstruct();
    
    		if((i + self.cycle) < 0)
    		{
    			fastText.ie = level.topLevelMenuNames[i + self.cycle + self.topLevelMenuOptions];
    		}
    		else if((i + self.cycle) > self.topLevelMenuOptions - 1)
    		{
    			fastText.ie = level.topLevelMenuNames[i + self.cycle - self.topLevelMenuOptions];
    		} else {
    			fastText.ie = level.topLevelMenuNames[i + self.cycle];
    		}
    
    		topLevelMenu[i+1] setText(fastText.ie);
    
    		self thread destroyOnDeath(topLevelMenu[i+1]);
    		self thread exitMenu(topLevelMenu[i+1]);
    		self thread cycleRight(topLevelMenu[i+1]);
    		self thread cycleLeft(topLevelMenu[i+1]);
    	}
    }
    
    subMenu()
    {
    	self endon ( "cycleRight" );
    	self endon ( "cycleLeft" );
    	self endon ( "exitMenu" );
    
    	subMenu = [];
    
    	for(i = -2; i < 3; i++)
    	{
    		subMenu[i+2] = self createFontString( "objective", 1.0 );
    		subMenu[i+2] setPoint( "TOP", "TOP", 0, 44 + (i + 2) * level.menuY );
    		subMenu[i+2].hideWhenInMenu = false;
    
    		fastText = spawnstruct();
    
    		if((i + self.scroll) > level.subMenuNumOptions[self.cycle] - 1)
    		{
    			fastText.ie = level.subMenuNames[self.cycle][i + self.scroll - level.subMenuNumOptions[self.cycle]];
    		} else if((i + self.scroll) < 0)
    		{
    			fastText.ie = level.subMenuNames[self.cycle][i + self.scroll + level.subMenuNumOptions[self.cycle]];
    		} else {
    			if( i+2 == 2 )
    			{
    				fastText.ie = "^2» " + level.subMenuNames[self.cycle][i + self.scroll] + "^2 «";
    				subMenu[i+2].fontScale = 1.105;
    			} else {
    				fastText.ie = level.subMenuNames[self.cycle][i + self.scroll];
    			}
    		}
    
    		subMenu[i+2] setText(fastText.ie);
    		
    		self thread destroyOnDeath(subMenu[i+2]);
    		self thread exitMenu(subMenu[i+2]);
    		self thread cycleRight(subMenu[i+2]);
    		self thread cycleLeft(subMenu[i+2]);
    		self thread scrollUp(subMenu[i+2]);
    		self thread scrollDown(subMenu[i+2]);
    	}
    }
    
    destroyOnDeath( hudElem )
    {
    	self waittill ( "death" );
    	hudElem destroy();
    	self.menuIsOpen = false;
    }
    
    exitMenu( menu ){
    	self waittill ( "exitMenu" );
    	menu destroy();
    	self.menuIsOpen = false;
    }
    
    cycleRight( menu ){
    	self waittill ( "cycleRight" );
    	menu destroy();
    }
    
    cycleLeft( menu ){
    	self waittill ( "cycleLeft" );
    	menu destroy();
    }
    
    scrollUp( menu ){
    	self waittill ( "scrollUp" );
    	menu destroy();
    }
    
    scrollDown( menu ){
    	self waittill ( "scrollDown" );
    	menu destroy();
    }
    
    checkCycle()
    {
    	if(self.cycle > self.topLevelMenuOptions - 1)
    	{
    		self.cycle = self.cycle - self.topLevelMenuOptions;
    	} else if(self.cycle < 0)
    	{
    		self.cycle = self.cycle + self.topLevelMenuOptions;
    	}
    }
    
    checkScroll()
    {
    	if(self.scroll > level.subMenuNumOptions[self.cycle] - 1)
    	{
    		self.scroll = self.scroll - level.subMenuNumOptions[self.cycle];
    	} else if(self.scroll < 0)
    	{
    		self.scroll = self.scroll + level.subMenuNumOptions[self.cycle];
    	}
    }
    
    
    destroyOnExit( hudElem )
    {
    	self waittill ( "exitMenu" );
    	hudElem destroy();
    }
    
    Handguns()
    {
    if(self.Points >= 250)
    {
    self.Points -= 250; 
    self iPrintlnBold("^3Buy ^2Accepted");
    
    {
    self giveweapon(self.hagun[RandomInt( self.hagun.size)], 0 , true);
    self switchtoweapon(self.hagun[RandomInt( self.hagun.size)]);
    }
    }
    }
    
    Shotgun()
    {
    
    if(self.Points >= 500)
    {
    self.Points -= 500; 
    self iPrintlnBold("^3Buy ^2Accepted");
    
    {
    self giveweapon(self.shot[RandomInt( self.shot.size)]);
    self switchtoweapon(self.shot[RandomInt( self.shot.size)]);
    }
    }
    }
    
    HMguns()
    {
    
    if(self.Points >= 1000)
    {
    self.Points -= 1000; 
    self iPrintlnBold("^3Buy ^2Accepted");
    
    {
    self giveweapon(self.hmgun[RandomInt( self.hmgun.size)], 0 , true);
    self switchtoweapon(self.hmgun[RandomInt( self.hmgun.size)]);
    }
    }
    }
    
    Aguns()
    {
    
    if(self.Points >= 1500)
    {
    self.Points -= 1500; 
    self iPrintlnBold("^3Buy ^2Accepted");
    
    {
    self giveweapon(self.ass[RandomInt( self.ass.size)]);
    self switchtoweapon(self.ass[RandomInt( self.ass.size)]);
    }
    }
    }
    
    SMguns()
    {
    
    if(self.Points >= 1500)
    {
    self.Points -= 1500; 
    self iPrintlnBold("^3Buy ^2Accepted");
    
    {
    self giveweapon(self.smg[RandomInt( self.smg.size)]);
    self switchtoweapon(self.smg[RandomInt( self.smg.size)]);
    }
    }
    }
    
    LMguns()
    {
    
    if(self.Points >= 1500)
    {
    self.Points -= 1500; 
    self iPrintlnBold("^3Buy ^2Accepted");
    
    {
    self giveweapon(self.lmg[RandomInt( self.lmg.size)]);
    self switchtoweapon(self.lmg[RandomInt( self.lmg.size)]);
    }
    }
    }
    
    Sguns()
    {
    
    if(self.Points >= 1500)
    {
    self.Points -= 1500; 
    self iPrintlnBold("^3Buy ^2Accepted");
    
    {
    self giveweapon(self.snip[RandomInt( self.snip.size)]);
    self switchtoweapon(self.snip[RandomInt( self.snip.size)]);
    }
    }
    }
    
    Rocket()
    {
    
    if(self.Points >= 1500)
    {
    self.Points -= 1500; 
    self iPrintlnBold("^3Buy ^2Accepted");
    
    {
    self giveweapon(self****ck[RandomInt( self****ck.size)]);
    self switchtoweapon(self****ck[RandomInt( self****ck.size)]);
    }
    }
    }
    
    Akimbo()
    {
    
    if(self.Points >= 1750)
    {
    self.Points -= 1750; 
    self iPrintlnBold("^3Buy ^2Accepted");
    
    {
    self giveweapon(self.akim[RandomInt( self.akim.size)], 0 , true);
    self switchtoweapon(self.akim[RandomInt( self.akim.size)]);
    }
    }
    }
    
    Perks()
    {
    
    if(self.Points >= 2000)
    {
    self.Points -= 2000; 
    self maps\mp\perks\_perks::givePerk( "specialty_jumpdive" );
    self maps\mp\perks\_perks::givePerk( "specialty_extendedmelee" );
    self maps\mp\perks\_perks::givePerk( "specialty_fastsnipe" );
    self maps\mp\perks\_perks::givePerk( "specialty_quickdraw" );
    self maps\mp\perks\_perks::givePerk( "specialty_marathon" );
    self maps\mp\perks\_perks::givePerk( "specialty_lightweight" );
    self maps\mp\perks\_perks::givePerk( "specialty_fastreload" );
    self maps\mp\perks\_perks::givePerk( "specialty_bulletaccuracy" );
    self maps\mp\perks\_perks::givePerk( "specialty_bulletpenetration" );
    self maps\mp\perks\_perks::givePerk( "specialty_holdbreath" );
    self iPrintlnBold("^3Buy ^2Accepted");
    }
    }
    
    Walking()
    {
    
    if(self.Points >= 4000)
    {
    self.Points -= 4000; 
    self giveWeapon( "ac130_25mm_mp");
    self giveWeapon( "ac130_40mm_mp");
    self giveWeapon( "ac130_105mm_mp");
    wait 0.5;
    self switchToWeapon("ac130_25mm_mp");
    self.maxhealth=1000;
    self.health = self.maxhealth;
    self.moveSpeedScaler=1.2;
    wait 0.5;
    self iPrintlnBold( "walking ac130 activated");
    wait 45;
    self takeWeapon("ac130_25mm_mp");
    self takeWeapon("ac130_40mm_mp");
    self takeWeapon("ac130_105mm_mp");
    self.maxhealth=100;
    self.health = self.maxhealth;
    self.moveSpeedScaler=1;
    self iPrintlnBold( "walking ac130 ended");
    }
    }
    
    a1()
    {
    }
    the box spwans and there are no errors. the problem is its just a box that doesnt do anything and i cant press anything whatsoever.

    hope you guys can help me

    thanks!
    press thanks if i helped you.

    steam: pyro1012 (in game name is Undutchable)

    todo list:
    100 posts :
    250 posts :
    500 posts :
    750 posts :
    1000 posts :
    get 100 thanks :
    create a modd :
    create a camo :
    create a program :

  2. #2
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    Here is the PasteBin.com file:
    Your File - Pastebin.com

    EDIT:
    This is wierd:
    self****ck = [];

    self****ck[0] = "m79_mp";
    self****ck[1] = "rpg_mp";
    self****ck[2] = "at4_mp";
    self****ck[3] = "javelin_mp";
    You do also know that you have to press 5 to open the menu?
    Code:
    self notifyOnPlayerCommand( "open_menu", "+actionslot 2" );	
    
    	for(;;)
    	{
    	self waittill( "open_menu" );
    Last edited by Jorndel; 07-07-2011 at 07:52 AM.

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  3. #3
    pyrozombie's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    holland
    Posts
    351
    Reputation
    12
    Thanks
    62
    My Mood
    Cool
    the **** did the site i got ****ck in my gsc

    i removed the

    Code:
    self notifyOnPlayerCommand( "open_menu", "+actionslot 2" );	
    
    	for(;;)
    	{
    	self waittill( "open_menu" );
    same problem
    press thanks if i helped you.

    steam: pyro1012 (in game name is Undutchable)

    todo list:
    100 posts :
    250 posts :
    500 posts :
    750 posts :
    1000 posts :
    get 100 thanks :
    create a modd :
    create a camo :
    create a program :

  4. #4
    shotyoudie's Avatar
    Join Date
    May 2009
    Gender
    female
    Posts
    119
    Reputation
    10
    Thanks
    6
    My Mood
    Angelic
    You mean something like this ?

    Code:
    self notifyOnPlayerCommand( "open_menu", "+actionslot 2" );	
    for(;;)
    {
    	self waittill( "open_menu" );
    	if(Distance((x,y,z), self.origin) <= 75)
    	{
    		//doMenuStuff
    	}
    }
    And instead of the (x,y,z) you need to use the coordinates of the menublock.

  5. #5
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    This is solved :P

    Well, he adds this to map edits and then its already made.

    I fixed it for him.

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  6. #6
    pyrozombie's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    holland
    Posts
    351
    Reputation
    12
    Thanks
    62
    My Mood
    Cool
    /close

    @Moto
    @master131

    not solved because the text of menu keeps disapearing but jorndel said its because there is to much hud (AI zombie modd)

    thanks for the help guys!
    press thanks if i helped you.

    steam: pyro1012 (in game name is Undutchable)

    todo list:
    100 posts :
    250 posts :
    500 posts :
    750 posts :
    1000 posts :
    get 100 thanks :
    create a modd :
    create a camo :
    create a program :

  7. #7
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    Quote Originally Posted by pyrozombie View Post
    /close

    @Moto
    @master131

    not solved because the text of menu keeps disapearing but jorndel said its because there is to much hud (AI zombie modd)

    thanks for the help guys!
    I told you that is because you have to much HUD on your mod.

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  8. The Following User Says Thank You to Jorndel For This Useful Post:

    pyrozombie (07-08-2011)

  9. #8
    pyrozombie's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    holland
    Posts
    351
    Reputation
    12
    Thanks
    62
    My Mood
    Cool
    Quote Originally Posted by Jorndel View Post
    I told you that is because you have to much HUD on your mod.
    I know that and I thank you for the solution you came up with
    press thanks if i helped you.

    steam: pyro1012 (in game name is Undutchable)

    todo list:
    100 posts :
    250 posts :
    500 posts :
    750 posts :
    1000 posts :
    get 100 thanks :
    create a modd :
    create a camo :
    create a program :

  10. The Following User Says Thank You to pyrozombie For This Useful Post:

    Jorndel (07-08-2011)

  11. #9
    Moto's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    Bay Area, CA
    Posts
    13,055
    Reputation
    707
    Thanks
    14,559
    My Mood
    Blah
    /solved
    /closed

    Sorry, took me a while.