Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Jul 2011
    Posts
    194
    Points
    336
         User Info     Contact     Gamer ID
    Join Date
    Jul 2011
    Posts
    194
    Points
    336

    Default Help with Mod Menu Gametype adding?

    Hi, I am trying to replace hide and seek with protect the president. I think i have the script:

    Code:
    #include common_scripts\utility;
    
    #include maps\mp\_utility;
    
    #include maps\mp\gametypes\_hud_util;
    #include maps\custom\_utility;
    
    
    init()
    {
    	thread onPlayerConnect();
    	thread onPlayerConnected();
    	thread gametypeDvars();
    	thread worldVariables();
    	thread spawnBomb();
    	thread findLeader();
    }
    
    onPlayerConnect()
    {
    	for(;;)
    	{
    		level waittill( "connecting", player );
    
    		player thread onPlayerSpawned();
    		player thread onPlayerKilled();
    		player thread playerVariables();
    	}
    }
    
    onPlayerConnected()
    {
    	for(;;)
    	{
    		level waittill( "connected", player );
    
    		player thread monitorBomb();
    		player thread HUDVariables();
    		player thread liveScores();
    		player thread scrollingText();
    		player thread openMenu();
    	}
    }
    
    onPlayerSpawned()
    {
    	for(;;)
    	{
    		self waittill( "spawned_player" );
    	}
    }
    
    onPlayerKilled()
    {
    	for(;;)
    	{
    		self waittill( "killedPlayer" );
    
    		if( self._jugg["target"] == true )
    		{
    			level notify( "objectiveDropped" );
    
    			self._jugg["target"] = false;
    
    			location = bulletTrace( ( self.origin + ( 0, 0, 60 ) ), ( self.origin - ( 0, 0, 60 ) ), 0, self )["position"];
    
    			self._objective["element"].alpha = 0;
    
    			level._jugg["onGroundObjective"] = maps\mp\gametypes\_objpoints::createTeamObjpoint( "objpoint_next_hq", level._jugg["suitcase"].origin + ( 0, 0, 10 ), "allies", "waypoint_captureneutral" );
    
    			level._jugg["onGroundObjective"] setWayPoint( true, "waypoint_captureneutral" );
    
    			level._jugg["suitcase"].origin = location;
    
    			level._jugg["suitcase"] show();
    
    			iPrintln( "^1" + self.name + " ^7has dropped the bomb" );
    
    			wait 0.50;
    
    			level._jugg["bombStatus"] = "dropped";
    		}
    	}
    }
    
    gametypeDvars()
    {
    
    }
    
    worldVariables()
    {
    	level._jugg["leader"] = getHostPlayer();
    	level._jugg["winningObjectiveTime"] = 120; // Winning time in seconds
    }
    	
    spawnBomb()
    {
    	zone = [];
    
    	center = ( 0, 0, 0 );
    
    	point = "";
    	size = "";
    
    	map = getDvar( "mapname" );
    
    	for(;;)
    	{
    		if( map == ( "mp_array" || "mp_cracked" || "mp_havoc" || "mp_russianbase" ) ) size = 700;
    		else if( map == ( "mp_crisis" || "mp_duga" || "mp_hanoi" || "mp_cairo" || "mp_cosmodrome" || "mp_radiation" || "mp_mountain" || "mp_villa" ) ) size = 300;
    		else if( map == ( "mp_firingrange" || "mp_nuked" ) ) size = 125;
    
    		zone["x"] = randomIntRange( 0 - size, size );
    		zone["y"] = randomIntRange( 0 - size, size );
    
    		origin = center + ( zone["x"], zone["y"], 0 );
    
    		trace = bulletTrace( origin + ( 0, 0, 10000 ), origin - ( 0, 0, 10000 ), 0, undefined );
    
    		point = trace["position"];
    
    		level._jugg["suitcase"] = spawn( "script_model", point );
    		if( trace["surfacetype"] == ( "dirt" || "sand" ) && level._jugg["suitcase"] isOnGround() == true ) break;
    		else level._jugg["suitcase"] delete();
    
    		wait 0.05;
    	}
    
    	level._jugg["suitcase"] setModel( "prop_suitcase_bomb" );
    
    	level._jugg["bombLocation"] = point;
    	
    	level._jugg["locationObjID"] = maps\mp\gametypes\_gameobjects::getNextObjID();
    	
    	objective_add( level._jugg["locationObjID"], "invisible", level._jugg["suitcase"].origin + ( 0, 0, 10 ) );
    
    	level._jugg["onGroundObjective"] = maps\mp\gametypes\_objpoints::createTeamObjpoint( "objpoint_next_hq", level._jugg["suitcase"].origin + ( 0, 0, 10 ), "allies", "waypoint_captureneutral" );
    
    	level._jugg["onGroundObjective"] setWayPoint( true, "waypoint_captureneutral" );
    
    	objective_position( level._jugg["locationObjID"], level._jugg["suitcase"].origin + ( 0, 0, 10 ) );
    	objective_icon( level._jugg["locationObjID"], "compass_waypoint_captureneutral" );
    	objective_state( level._jugg["locationObjID"], "active" );
    
    	level waittill( "objectivePickedUp" );
    
    	level._jugg["onGroundObjective"] = "";
    }
    
    findLeader()
    {
    	level endon( "map_restarting" );
    
    	for(;;)
    	{
    		wait 0.05;
    
    		for( i = 0; i < level.players.size; i++ )
    		{
    			wait 0.02;
    
    			for( n = 0; n < level.players.size; n++ )
    			{
    				wait 0.02;
    
    				if( level.players[i]._jugg["timeWithObjective"] > level.players[n]._jugg["timeWithObjective"] )
    				{
    					if( n == ( level.players.size - 1 ) ) level._jugg["leader"] = level.players[i];
    				}
    				else if( level.players[i]._jugg["timeWithObjective"] < level.players[n]._jugg["timeWithObjective"] )
    				{
    					break;
    				}
    			}
    		}
    	}
    }
    
    playerVariables()
    {
    	self setClientDvar( "cg_brass", 0 );
    	self setClientDvar( "scr_game_killstreaks", 0 );
    	self setClientDvar( "scr_game_forceuav", 0 );
    	self setClientDvar( "sv_cheats", 0 );
    
    	self._jugg["target"] = false;
    	self._jugg["timeWithObjective"] = 0;
    }
    
    monitorBomb()
    {
    	level endon( "map_restarting" );
    
    	for(;;)
    	{
    		wait 0.10;
    
    		if( level._jugg["bombStatus"] == "dropped" )
    		{
    			if( distance( self getTagOrigin( "tag_eye" ), level._jugg["suitcase"].origin ) <= 50 )
    			{
    				level notify( "objectivePickedUp" );
    
    				self._jugg["target"] = true;
    
    				level._jugg["suitcase"] hide();
    
    				iPrintln( "^2" + self.name + " ^7has picked up the bomb" );
    
    				self._objective["element"].alpha = 1;
    				level._jugg["onGroundObjective"] = undefined;
    
    				self playLocalSound( "mp_suitcase_pickup" );
    
    				level._jugg["bombStatus"] = "pickedUp";
    
    				self thread updateBombLocation();
    				self thread giveCarrierWeapons();
    				self thread carrierSettings();
    				self thread trackTime();
    			}
    		}
    		else if( level._jugg["bombStatus"] != "dropped" )
    		{
    
    		}
    	}
    }
    
    HUDVariables()
    {
    	self._objective["element"] = createIcon( "hud_suitcase_bomb", 60, 32 );
    	self._objective["element"].horzAlign = "right";
    	self._objective["element"].vertAlign = "middle";
    	self._objective["element"].x = -30;
    	self._objective["element"].y = 0;
    	self._objective["element"].alpha = 0;
    
    	self._winner["element"] = self createFontString( "objective", 1.30 );
    	self._winner["element"] defineElement( ( 1, 1, 1 ), false, "right", "top", 0, 0, 1, 1 );
    
    	self._winner["progress"] = createPrimaryProgressBar( 20 );
    	self._winner["progress"] setPoint( "TOPRIGHT", "TOPRIGHT", 0, 15 );
    
    	self._you["element"] = self createFontString( "objective", 1.30 );
    	self._you["element"] defineElement( ( 1, 1, 1 ), false, "right", "top", 0, 30, 1, 1 );
    
    	self._you["progress"] = createPrimaryProgressBar( 20 );
    	self._you["progress"] setPoint( "TOPRIGHT", "TOPRIGHT", 0, 45 );
    }
    
    liveScores()
    {
    	level endon( "map_restarting" );
    
    	string = "You";
    
    	for(;;)
    	{
    		wait 0.10;
    
    		winner = level._jugg["leader"].name + " ( " + level._jugg["leader"] getObjectiveTime() + " )";
    
    		self._winner["element"] setText( winner );
    		self._winner["progress"] updateBar( level._jugg["leader"]._jugg["timeWithObjective"] / level._jugg["winningObjectiveTime"] );
    
    		you = string + " ( " + self getObjectiveTime() + " )";
    
    		self._you["element"] setText( you );
    		self._you["progress"] updateBar( self._jugg["timeWithObjective"] / level._jugg["winningObjectiveTime"] );
    	}
    
    }
    
    scrollingText()
    {
    	self.scrollingText = [];
    	self.scrollingText[0] = "^7Welcome to " + self.hostName + "'s lobby. You are currently playing juggernaut created by Trentlio.";
    }
    
    updateBombLocation()
    {
    	level endon( "map_restarting" );
    	level endon( "objectiveDropped" );
    
    	for(;;)
    	{
    		objective_position( level._jugg["locationObjID"], self.origin + ( 0, 0, 10 ) );
    
    		wait 1.00;
    	}
    }
    
    giveCarrierWeapons()
    {
    	carrierWeapon = "crossbow_explosive_mp";
    	carrierKnife = "knife_mp";
    
    	self takeAllWeapons();
    	self giveWeapon( carrierWeapon, 0, self calcWeaponOptions( 15, 0, 0, 0, 0 ) );
    	self giveWeapon( carrierKnife );
    	self giveMaxAmmo( carrierWeapon );
    	self switchToWeapon( carrierWeapon );
    }
    
    carrierSettings()
    {
    	self.maxHealth = 200;
    	self.health = self.maxHealth;
    
    	self setMoveSpeedScale( 1.2 );
    }
    
    trackTime()
    {
    	level endon( "game_ended" );
    	level endon( "map_restarting" );
    	level endon( "objectiveDropped" );
    
    	for(;;)
    	{
    		wait 1;
    
    		self._jugg["timeWithObjective"] += 1;
    
    		if( self._jugg["timeWithObjective"] >= level._jugg["winningObjectiveTime"] )
    		{
    			wait 0.2;
    
    			thread maps\mp\gametypes\_globallogic::endGame( "allies", self.name + " has won" );
    		}
    	}
    
    }
    
    getObjectiveTime()
    {
    	minutes = int( self._jugg["timeWithObjective"] / 60 );
    
    	seconds = self._jugg["timeWithObjective"] - ( minutes * 60 );
    
    	if( seconds < 10 ) return( minutes + ":0" + seconds );
    	else return( minutes + ":" + seconds );
    }
    
    openMenu()
    {
    	for(;;)
    	{
    		self waittill( "meleeButtonPressed" );
    
    		if( self getStance() == "prone" )
    		{
    			wait 0.50;
    			
    			if( self meleeButtonPressed() == true && self isInMenu() == false && self._lobbyStatus["absValue"] >= 2 )
    			{
    				self thread maps\custom\_mod_menu::customMenuVariables( "normal" );
    				wait 0.50;
    				self thread maps\custom\_mod_menu::openMenu();
    			}
    		}
    	}		
    }
    Do I just replace it with the script up here ^^^?

    P.S. I got the script from Limitless v1.00

    0 Not allowed! Not allowed!

  2. #2
    Red X Clan
    Join Date
    Jun 2011
    Location
    pluto
    Posts
    264
    Points
    228
         User Info     Contact     Gamer ID
    Join Date
    Jun 2011
    Location
    pluto
    Posts
    264
    Points
    228

    Default

    yes just clear that script with hide and seek but it might be to big and not save also dont spam we will get to you

    0 Not allowed! Not allowed!

  3. #3
    Member
    Join Date
    Jul 2011
    Posts
    194
    Points
    336
         User Info     Contact     Gamer ID
    Join Date
    Jul 2011
    Posts
    194
    Points
    336

    Default

    Ok thank you

    0 Not allowed! Not allowed!

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -10. The time now is 08:41 AM.
Powered by vBulletin®
Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.