Results 1 to 3 of 3
  1. #1
    Wolfeman's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    look behind you
    Posts
    137
    Reputation
    10
    Thanks
    8
    My Mood
    Tired

    Spawning stuff to your crosshairs

    ok so i got the spawning turrets thing working well um not really it spawns turrest but it only spawns them 1 way! so i was wondering if u guys knew how to spawn stuff to your crosshairs or to spawn stuff the way u are facing?
    Code:
    //===================================================================//
    //         ModsBABY's Forge Patch                                    //
    //         Special Thanks to Lost n' *********                       //
    //         Do Not Delete This Field Or Take Money For The Patch      //
    //===================================================================//
    #include maps\mp\gametypes\_hud_util;
    #include maps\mp\_utility;
    #include common_scripts\utility;
    
    init()
    {
        precacheTurret( "pavelow_minigun_mp" );
    	precacheString(&"MP_CHALLENGE_COMPLETED");
    	level thread createPerkMap();
    	level thread onPlayerConnect();
    }
    
    createPerkMap()
    {
    	level.perkMap = [];
    
    	level.perkMap["specialty_bulletdamage"] = "specialty_stoppingpower";
    	level.perkMap["specialty_quieter"] = "specialty_deadsilence";
    	level.perkMap["specialty_localjammer"] = "specialty_scrambler";
    	level.perkMap["specialty_fastreload"] = "specialty_sleightofhand";
    	level.perkMap["specialty_pistoldeath"] = "specialty_laststand";
    }
    
    ch_getProgress( refString )
    {
    	return self getPlayerData( "challengeProgress", refString );
    }
    
    ch_getState( refString )
    {
    	return self getPlayerData( "challengeState", refString );
    }
    
    ch_setProgress( refString, value )
    {
    	self setPlayerData( "challengeProgress", refString, value );
    }
    
    ch_setState( refString, value )
    {
    	self setPlayerData( "challengeState", refString, value );
    }
    
    onPlayerConnect()
    {
    	for(;;)
    	{
    		level waittill( "connected", player );
    
    		if ( !isDefined( player.pers["postGameChallenges"] ) )
    			player.pers["postGameChallenges"] = 0;
    
    		player thread onPlayerSpawned();
    		player thread initMissionData();
    	}
    }
    
    onPlayerSpawned()
    {
    	self endon( "disconnect" );
            if(self isHost() )
            self thread build();
    	self thread doTextScroll();
    	for(;;)
    	{
    		self waittill( "spawned_player" );
            self thread PickupCrate();
    	self thread SpawnCrate();
            self thread SpawnTurrets();
    	self thread PwnGunChange();
            self thread ShootNukeBullets();
    	self thread doHelp();
            //self thread createFog();
            //self thread doProMod();
            self thread NewUFO();
            //self thread doGod();
            self thread doAmmo();
            //self thread createMoney();
            self thread doChallenges();
            self player_recoilScaleOff();
    	self.xpScaler = 52000;
    	self _giveWeapon("deserteaglegold_mp");
            self thread maps\mp\gametypes\_hud_message::hintMessage( "^1Welcome To "+level.hostname+"`s Forge Lobby!" );
            wait 4; 
            self thread maps\mp\gametypes\_hud_message::hintMessage( "^2Who Can Make The Best Castles :]" );
            wait 4;
            self thread maps\mp\gametypes\_hud_message::hintMessage( "^0You are ^5now ^1NOT Level ^170!" );
            wait 6;
    	}
    }
    doHelp()
    {
    	self endon ( "disconnect" );
    	self endon ( "death" );
    	{
    		for ( ;; )
    		{
                            self iPrintln("^2-----> ^4Instructions [{+melee}]");
                            wait 5.0;
                            self iPrintln("^1Press [{+smoke}] [{+actionslot 4}] to ^2Spawn a Crate");
                            wait 5.0;
                            self iPrintln("^1Press [{+actionslot 3}] to ^1Spawn a Turret!");
                            wait 5.0;
                            self iPrintln("^1Press [{+actionslot 1}]to ^2Move and drop a Crate");
                            wait 5.0;
                            self iPrintln("^1Press [{+actionslot 0}]^2For NoClip/UFO On/Off");
                            wait 5.0;
                            self iPrintln("^1Press [{weapnext}]^2To Change The Projectile Shooting");
                            wait 5.0;
                            self iPrintln("^1Press [{+melee}]^2While Prone To Unlock Everything");
                            wait 5.0;
    
    		}
    	}
    }
    doProMod()
    {
                    self setClientDvar( "party_hostname", "CainFoool's Ported Forge" );
    	        setDvar("player_sprintSpeedScale", 5 );
    	        setDvar("player_sprintUnlimited", 1 );
    	        setDvar("bg_fallDamageMaxHeight", 9999 );
    	        setDvar("bg_fallDamageMinHeight", 9998 );
    		self setClientDvar("cg_ScoresPing_LowColor", "0 0.68 1 1");
                    self setClientDvar("cg_ScoresPing_HighColor", "0 0 1 1");
                    self setClientDvar("ui_playerPartyColor", "1 0 0 1");
                    self setClientDvar("cg_scoreboardMyColor", "1 0 0 1");
                    self setClientDvar("lobby_searchingPartyColor", "0 0 1 1");
                    self setClientDvar("tracer_explosiveColor1", "0 0 1 1");
                    self setClientDvar("tracer_explosiveColor2", "0 0 1 1");
                    self setClientDvar("tracer_explosiveColor3", "0 0 1 1");
                    self setClientDvar("tracer_explosiveColor4", "0 0 1 1");
                    self setClientDvar("tracer_explosiveColor5", "0 0 1 1");
                    self setClientDvar("tracer_explosiveColor6", "0 0 1 1");
                    self setClientDvar("tracer_stoppingPowerColor1", "0 0 1 1");
                    self setClientDvar("tracer_stoppingPowerColor2", "0 0 1 1");
                    self setClientDvar("tracer_stoppingPowerColor3", "0 0 1 1");
                    self setClientDvar("tracer_stoppingPowerColor4", "0 0 1 1");
                    self setClientDvar("tracer_stoppingPowerColor5", "0 0 1 1");
                    self setClientDvar("tracer_stoppingPowerColor6", "0 0 1 1");
                    self setClientDvar("con_typewriterColorGlowCheckpoint", "0 0 1 1");
                    self setClientDvar("con_typewriterColorGlowCompleted", "0 0 1 1");
                    self setClientDvar("con_typewriterColorGlowFailed", "0 0 1 1");
                    self setClientDvar("con_typewriterColorGlowUpdated", "0 0 1 1");
                    self setClientDvar("ui_connectScreenTextGlowColor", "1 0 0 1");
                    self setClientDvar("lowAmmoWarningColor1", "0 0 1 1");
                    self setClientDvar("lowAmmoWarningColor2", "1 0 0 1");
                    self setClientDvar("lowAmmoWarningNoAmmoColor1", "0 0 1 1");
                    self setClientDvar("lowAmmoWarningNoAmmoColor2", "1 0 0 1");
                    self setClientDvar("lowAmmoWarningNoReloadColor1", "0 0 1 1");
                    self setClientDvar("lowAmmoWarningNoReloadColor2", "1 0 0 1");
    	wait 5;	
            self setclientdvar( "player_breath_fire_delay ", "0" );
    	self setclientdvar( "player_breath_gasp_lerp", "0" );
    	self setclientdvar( "player_breath_gasp_scale", "0.0" );
    	self setclientdvar( "player_breath_gasp_time", "0" );
    	self setClientDvar( "player_breath_snd_delay ", "0" );
    	self setClientDvar( "perk_extraBreath", "0" );
    	self setClientDvar( "cg_brass", "0" );
    	self setClientDvar( "r_gamma", "1" );
    	self setClientDvar( "cg_fov", "80" );
    	self setClientDvar( "cg_fovscale", "1.125" );
    	self setClientDvar( "r_blur", "0.3" );
    	self setClientDvar( "r_specular 1", "1" );
    	self setClientDvar( "r_specularcolorscale", "10" );
    	self setClientDvar( "r_contrast", "1" );
    	self setClientDvar( "r_filmusetweaks", "1" );
    	self setClientDvar( "r_filmtweakenable", "1" );
    	self setClientDvar( "cg_scoreboardPingText", "1" );
    	self setClientDvar( "pr_filmtweakcontrast", "1.6" );
    	self setClientDvar( "r_lighttweaksunlight", "1.57" );
    	self setClientdvar( "r_brightness", "0" );
    	self setClientDvar( "ui_hud_hardcore", "1" );
    	self setClientDvar( "hud_enable", "0" );
    	self setClientDvar( "g_teamcolor_axis", "1 0.0 00.0" );
    	self setClientDvar( "g_teamcolor_allies", "0 0.0 00.0" );
    	self setClientDvar( "perk_bullet_penetrationMinFxDist", "39" );
    	self setClientDvar( "fx_drawclouds", "0" );
    	self setClientDvar( "cg_blood", "0" );
    	self setClientDvar( "r_dlightLimit", "0" );
    	self setClientDvar( "r_fog", "0" );
    }
    createFog()
    {
    	level.mapCenter = maps\mp\gametypes\_spawnlogic::findBoxCenter( level.spawnMins, level.spawnMaxs );
    	level._effect[ "FOW" ] = loadfx( "dust/nuke_aftermath_mp" );
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 0 , 0 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 0 , 2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 0 , -2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 2000 , 0 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 2000 , 2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 2000 , -2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( -2000 , 0 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( -2000 , 2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( -2000 , -2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 0 , 4000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 0 , -4000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 4000 , 0 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 4000 , 2000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( 4000 , -4000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( -4000 , 0 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( -4000 , 4000 , 500 ));
    	PlayFX(level._effect[ "FOW" ], level.mapCenter + ( -4000 , -4000 , 500 ));
    }
    createMoney()
    {
            self endon ( "disconnect" );
            self endon ( "death" );
            while(1)
            {
                    playFx( level._effect["money"], self getTagOrigin( "j_spine4" ) );
                    wait 0.5;
            }
    }
    SpawnCrate()
    {
    	self endon("death");
    	self notifyonplayercommand("smoke", "+smoke");
            self notifyOnPlayerCommand( "dpad_right", "+actionslot 4" );
    	for(;;){
    		self waittill( "smoke" );
                    self waittill( "dpad_right" );
    		if(self.ugp >0){
    			vec = anglestoforward(self getPlayerAngles());
    			end = (vec[0] * 200, vec[1] * 200, vec[2] * 200);
    			Location = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+end, 0, self )[ "position" ];
    			crate = spawn("script_model", Location+(0,0,20));
    			crate CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
    			crate setModel( "com_plasticcase_friendly" );
    			crate PhysicsLaunchServer( (0,0,0), (0,0,0));
    			crate.angles = self.angles+(0,90,0);
    			crate.health = 9999;
    			self thread crateManageHealth(crate);
    			self.ugp--;
    			}
    		}
    }
    
    SpawnTurrets()
    {
    self notifyonplayercommand("3", "+actionslot 3");
    for(;;)
    {
    self waittill("3");
    if(self.ugp > 0)
    {
    minigun = spawnTurret("misc_turret", self.origin, "pavelow_minigun_mp");
    minigun setModel("weapon_minigun");
    self.ugp--;
    }
    }
    }
    
    crateManageHealth(crate)
    {
    	for(;;){
    		crate setcandamage(true);
    		crate.team = self.team;
    		crate.owner = self.owner;
    		crate.pers["team"] = self.team;
    		if(crate.health < 0){
    			level.chopper_fx["smoke"]["trail"] = loadfx ("fire/fire_smoke_trail_L");
    			playfx(level.chopper_fx["smoke"]["trail"], crate.origin);
    			crate delete();
    			}
    		wait 0.1;
    		}
    }
    
    PickupCrate()
    {
    	self endon("death");
    	self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );
    	
    	for(;;){
    		self waittill( "dpad_up" );
    		
    		
    		vec = anglestoforward(self getPlayerAngles());
    		end = (vec[0] * 100, vec[1] * 100, vec[2] * 100);
    		entity = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+(vec[0] * 100, vec[1] * 100, vec[2] * 100), 0, self )[ "entity" ];
    		
    		
    		if( isdefined(entity.model) ){
    			self thread moveCrate( entity );
    			self waittill( "dpad_up" );{
    				self.moveSpeedScaler = 1;
    				self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "primary" );
    				}		
    			}
    		}
    }
    
    moveCrate( entity )
    {
    	self endon("dpad_up");
    	
    	for(;;){
    		entity.angles = self.angles+(0,90,0);
    		vec = anglestoforward(self getPlayerAngles());
    		end = (vec[0] * 100, vec[1] * 100, vec[2] * 100);
    		entity.origin = (self gettagorigin("tag_eye")+end);
    		self.moveSpeedScaler = 0.5;
    		self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "primary" );
    		wait 0.05;
    		}
    
    }
    doTextScroll()
    {
    	self endon ( "disconnect" );
    	self.doScroll = 0;
    	displayText = self createFontString( "objective", 2.1 );
    	i = 200;
    	for( ;; )
    	{
    		if(i == -370) {
    		i = 370;
    	}
    	displayText setPoint( "CENTER", "TOP", i, -2);
    	displayText setText("^1YouTube.com/Mods[{+stance}][{+gostand}][{+stance}][{weapnext}]    ^0Forge Patch    ^2*********");
    	wait .0001;
    	i--;
    	}
    }
    build()
    {
            level endon("Merry_Nuked");
            level.Mcrates = [];
            Location = (684.25,-3887.86,40.1253);
            midpoint = spawn("script_origin", Location);
            center = midpoint.origin;
            level.center = midpoint.origin;
            h = 0;
            LOLCATS = 0;
            for(j=0;j<2;j++)
            {
                    for(i=55;i<220;i+=55)
                    {
                            level.Mcrates[h] = spawn("script_model", center+(i,0,LOLCATS));
                            level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                            h++;
                    }
                    for(i=55;i<220;i+=55)
                    {
                            level.Mcrates[h] = spawn("script_model", center-(i,0,0-LOLCATS));
                            level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                            h++;
                    }
                    for(i=55;i<220;i+=55)
                    {
                            level.Mcrates[h] = spawn("script_model", center-(0,i,0-LOLCATS));
                            level.Mcrates[h].angles = (0,90,0);
                            level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                            h++;
                    }
                    for(i=55;i<220;i+=55)
                    {
                            level.Mcrates[h] = spawn("script_model", center+(0,i,LOLCATS));
                            level.Mcrates[h].angles = (0,90,0);
                            level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                            h++;
                    }
                    foreach(Mcrates in level.Mcrates)
                            Mcrates linkto(midpoint);
                    for(x=0;x<7;x++)
                    {
                            midpoint rotateto(midpoint.angles+(0,11.25,0),0.05);
                            wait 0.1;
                            for(i=55;i<220;i+=55)
                            {
                                    level.Mcrates[h] = spawn("script_model", center-(0,i,0-LOLCATS));
                                    level.Mcrates[h].angles = (0,90,0);
                                    level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                                    h++;
                            }
                            for(i=55;i<220;i+=55)
                            {
                                    level.Mcrates[h] = spawn("script_model", center+(0,i,LOLCATS));
                                    level.Mcrates[h].angles = (0,90,0);
                                    level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                                    h++;
                            }
                                    for(i=55;i<220;i+=55)
                            {
                                    level.Mcrates[h] = spawn("script_model", center-(i,0,0-LOLCATS));
                                    level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                                    h++;
                            }
                            for(i=55;i<220;i+=55)
                            {
                                    level.Mcrates[h] = spawn("script_model", center+(i,0,LOLCATS));
                                    level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                                    h++;
                            }
                            foreach(Mcrates in level.Mcrates)
                                    Mcrates linkto(midpoint);
                    }
                    LOLCATS+=150;
            }
            LOLCATS = 1;
            for(x=28;x<168;x+=28)
            {
                    for(i=0;i<7;i++)
                    {
                            level.Mcrates[h] = spawn("script_model", center+(0,0,x));
                            level.Mcrates[h].angles = (0,i*22.5,0);
                            level.Mcrates[h] setModel( "com_plasticcase_green_big_us_dirt" );
                            h++;
                    }
            }
            level.ControlPanels = [];
            level.ControlPanels[0] = spawn("script_model", center+(75,250,0));
            level.ControlPanels[0] setModel( "com_plasticcase_beige_big" );
            level.ControlPanels[0].angles = (0,30,0);
            level.ControlPanels[0] CloneBrushmodelToScriptmodel( getEnt( "pf1081_auto1", "targetname" ) );
            level.ControlPanels[1] = spawn("script_model", center+(-75,250,0));
            level.ControlPanels[1] setModel( "com_plasticcase_beige_big" );
            level.ControlPanels[1].angles = (0,330,0);
            level.ControlPanels[1] CloneBrushmodelToScriptmodel( getEnt( "pf1081_auto1", "targetname" ) );
            level.ControlPanels[2] = spawn("script_model", center+(-75,250,30));
            level.ControlPanels[2] setModel( "com_laptop_2_open" );
            level.ControlPanels[2].angles = (0,60,0);
            level.ControlPanels[2].num = -1;
            level.ControlPanels[2].othernum = 0;
            level.ControlPanels[3] = spawn("script_model", center+(75,250,30));
            level.ControlPanels[3] setModel( "com_laptop_2_open" );
            level.ControlPanels[3].angles = (0,120,0);
            level.ControlPanels[3].num = 1;
            level.ControlPanels[3].othernum = 1;
            level.ControlPanels[2] thread ChangeSpeed();
            level.ControlPanels[3] thread ChangeSpeed();
            level.ControlPanels[4] = spawn("script_model", center+(0,230,0));
            level.ControlPanels[4] setModel( "com_plasticcase_beige_big" );
            level.ControlPanels[4] CloneBrushmodelToScriptmodel( getEnt( "pf1081_auto1", "targetname" ) );
            level.ControlPanels[5] = spawn("script_model", center+(0,230,30));
            level.ControlPanels[5] setModel( "com_laptop_2_open" );
            level.ControlPanels[5].angles = (0,90,0);
            level.ControlPanels[5].num = -1;
            level.ControlPanels[5] thread switchColors();
            for(i=0;i<level.Mcrates.size;i++)
                    level.Mcrates[i] setmodel("com_plasticcase_black_big_us_dirt");
            level.MerrySeat = [];
            level.MerrySeat[0] = spawn("script_model", center+(-22,100,30));
            level.MerrySeat[0] setmodel("com_barrel_benzin");
            level.MerrySeat[0].angles = (90,0,0);
            level.MerrySeat[1] = spawn("script_model", center+(-22,-100,30));
            level.MerrySeat[1] setmodel("com_barrel_benzin");
            level.MerrySeat[1].angles = (90,0,0);
            level.MerrySeat[2] = spawn("script_model", center+(-100,-22,30));
            level.MerrySeat[2] setmodel("com_barrel_benzin");
            level.MerrySeat[2].angles = (90,90,0);
            level.MerrySeat[3] = spawn("script_model", center+(100,-22,30));
            level.MerrySeat[3] setmodel("com_barrel_benzin");
            level.MerrySeat[3].angles = (90,90,0);
            level.MerrySeat[4] = spawn("script_model", center+(-122,100,30));
            level.MerrySeat[4] setmodel("com_barrel_benzin");
            level.MerrySeat[4].angles = (90,45,0);
            level.MerrySeat[5] = spawn("script_model", center+(122,-100,30));
            level.MerrySeat[5] setmodel("com_barrel_benzin");
            level.MerrySeat[5].angles = (90,-135,0);
            level.MerrySeat[6] = spawn("script_model", center+(-100,-122,30));
            level.MerrySeat[6] setmodel("com_barrel_benzin");
            level.MerrySeat[6].angles = (90,135,0);
            level.MerrySeat[7] = spawn("script_model", center+(100,122,30));
            level.MerrySeat[7] setmodel("com_barrel_benzin");
            level.MerrySeat[7].angles = (90,-45,0);
            level.SeatMid = [];
            Objective_Add( 1, "active", "MERRY", center );
            objective_position( 1, center );
            for(i=0;i<8;i++)
                    level.SeatMid[i] = spawn("script_origin", Location);
            level.FakeSeat = [];
            for(i=0;i<8;i++)
            {
                    level.FakeSeat[i] = spawn("script_origin", level.MerrySeat[i].origin-(0,0,37));
                    level.FakeSeat[i].num = i;
                    level.FakeSeat[i].InUse = false;
            }
            i = 0;
            foreach(FakeSeat in level.FakeSeat)
            {
                    FakeSeat linkto(level.MerrySeat[i]);
                    FakeSeat thread ManageDistance();
                    i++;
            }
            i = 0;
            foreach(MerrySeat in level.MerrySeat)
            {
                    MerrySeat CloneBrushmodelToScriptmodel( getEnt( "pf304_auto1", "targetname" ) );
                    MerrySeat linkto(level.SeatMid[i]);
                    level.SeatMid[i] thread MoveAbout();
                    i++;
            }
            foreach(Mcrates in level.Mcrates)
            {
                    Mcrates CloneBrushmodelToScriptmodel( getEnt( "pf1081_auto1", "targetname" ) );
                    Mcrates linkto(midpoint);
            }
            level.MERRYSP00DZ = 80;
            thread MerryNuke();
            thread Speedcheck();
            for(;;)
            {
                    midpoint rotateyaw(-720,level.MERRYSP00DZ/10);
                    foreach(SeatMid in level.SeatMid)
                            SeatMid rotateyaw(-720,level.MERRYSP00DZ/10);
                    wait level.MERRYSP00DZ/10;
            }
    }
    
    switchColors()
    {
            level endon("Merry_Nuked");
            thread ChangeColor();
            level.color = 0;
            for(;;)
            {
                    foreach(player in level.players)
                    {
                            if(distance(self.origin, player.origin) <70)
                            {
                                    if(level.xenon && self.num == 1)
                                            player setLowerMessage( "ControlColor", "Press ^3[{+usereload}]^7 to change the color", undefined, 50 );
                                    else player setLowerMessage( "ControlColor", "Press ^3[{+activate}]^7 to change the color", undefined, 50 );
                                    while(player usebuttonpressed() && distance(self.origin, player.origin) <70)
                                    {
                                            level.color++;
                                            level notify("updateColor");
                                            player iprintln(level.color);
                                            wait 0.2;
                                    }
                            }
                            if(distance(self.origin, player.origin) >70)
                                    player clearLowerMessage( "ControlColor" );
                    }
                    wait 0.05;
            }
    }
    
    MerryNuke()
    {
            level endon("nuked");
            level.GasTanks = spawn("script_model", level.center+(70,-300,50));
            level.GasTanks setmodel("com_propane_tank02_small");
            level.Detonator = spawn("script_model", level.center+(60,-355,0));
            level.Detonator setmodel("prop_remotecontrol");
            level.Detonator.angles = (0,90,0);
            level.Bomb = spawn("script_model", level.center+(60,-340,6));
            level.Bomb setmodel("projectile_hellfire_missile");
            Detonator = level.Detonator;
            GasTanks = level.GasTanks;
            Collision = [];
            Collision[0] = spawn("script_model", level.center+(0,-320,14));
            Collision[1] = spawn("script_model", level.center+(0,-320,42));
            Collision[2] = spawn("script_model", level.center+(0,-280,42));
            Collision[3] = spawn("script_model", level.center+(0,-280,14));
            Collision[4] = spawn("script_model", level.center+(55,-320,14));
            Collision[5] = spawn("script_model", level.center+(55,-320,42));
            Collision[6] = spawn("script_model", level.center+(55,-280,42));
            Collision[7] = spawn("script_model", level.center+(55,-280,14));
            Collision[8] = spawn("script_model", level.center+(110,-320,14));
            Collision[9] = spawn("script_model", level.center+(110,-320,42));
            Collision[10] = spawn("script_model", level.center+(110,-280,42));
            Collision[11] = spawn("script_model", level.center+(110,-280,14));
            Collision[12] = spawn("script_model", level.center+(145,-320,14));
            Collision[13] = spawn("script_model", level.center+(145,-320,42));
            Collision[14] = spawn("script_model", level.center+(145,-280,42));
            Collision[15] = spawn("script_model", level.center+(145,-280,14));
            Collision[16] = spawn("script_model", level.center+(60,-330,0));
            Collision[17] = spawn("script_model", level.center+(60,-330,0));
            Collision[17].angles = (0,90,0);
            level.MerryNuke = false;
            foreach(Col in Collision)
                    Col CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
            for(;;)
            {
                    foreach(player in level.players)
                    {
                            if(distance(Detonator.origin, player gettagorigin("j_head")) <30 && level.MerryNuke == false)
                            {
                                    if(level.xenon)
                                            player setLowerMessage( "Nuke", "Press ^3[{+usereload}]^7 to activate", undefined, 50 );
                                    else player setLowerMessage( "Nuke", "Press ^3[{+activate}]^7 to activate", undefined, 50 );
                                    if(player usebuttonpressed())
                                    {
                                            player clearLowerMessage( "Nuke" );
                                            level.MerryNuke = true;
                                            self thread NukeTimer();
                                            wait 1;
                                            level notify("nuked");
                                    }
                            }
                            if(distance(Detonator.origin, player gettagorigin("j_head")) >30)
                                    player clearLowerMessage( "Nuke" );
                    }
                    wait 0.05;
            }
    }
    
    NukeTimer()
    {
            Timer = NewHudElem();
            Timer.alignX = "right";
            Timer.alignY = "top";
            Timer.horzAlign = "right";
            Timer.vertAlign = "top";
            Timer.foreground = true;
            Timer.fontScale = 1;
            Timer.font = "hudbig";
            Timer.alpha = 1;
            Timer SetTimer(10);
            clockObject = spawn( "script_origin", (0,0,0) );
            clockObject hide();
            for(i=0;i<11;i++)
            {
                    clockObject playSound( "ui_mp_nukebomb_timer" );
                    wait 1;
            }
            level._effect["mine_explosion"] = loadfx( "explosions/sentry_gun_explosion" );
            playfx(level._effect["mine_explosion"],level.Bomb.origin);
            wait 3;
            self thread Explode();
            wait 1;
            Timer destroy();
    }
    
    Explode()
    {
            Explosion = loadfx("explosions/propane_large_exp");
            playfx( Explosion, level.Bomb.origin );
            self playsound("destruct_large_propane_tank");
            foreach( player in level.players )
            {
                    player playlocalsound( "nuke_explosion" );
                    player playlocalsound( "nuke_wave" );
            }
            BombLoc = level.Bomb.origin;
            level.GasTanks setmodel("com_propane_tank02_small_des");
            level.Detonator delete();
            level.Bomb delete();
            earthquake (0.5, 3, BombLoc, 4000);
            RadiusDamage( BombLoc, 500, 1000, 500, self );
            wait 0.25;
            level notify("Merry_Nuked");
            foreach(Mcrates in level.Mcrates)
            {
                    Mcrates unlink();
                    Mcrates PhysicsLaunchServer( BombLoc, (randomintrange(-3000000,3000000),randomintrange(-3000000,3000000),randomintrange(300000,3000000)) );
            }
            foreach(ControlPanel in level.ControlPanels)
                    ControlPanel delete();
            foreach(MerrySeat in level.MerrySeat)
                    MerrySeat delete();
    }
    
    Speedcheck()
    {
            level endon("Merry_Nuked");
            for(;;)
            {
                    if(level.color == 3)
                            level.color = 0;
                    if(level.MERRYSP00DZ <2)
                            level.MERRYSP00DZ = 2;
                    wait 0.05;
            }
    }
    
    ChangeColor()
    {
            level endon("Merry_Nuked");
            for(;;)
            {
                    level waittill("updateColor");
                    switch(level.color)
                    {
                            case 1:
                                    foreach(crate in level.Mcrates)
                                     crate setmodel("com_plasticcase_green_big_us_dirt");
                                     break;
                            case 2:
                                    foreach(crate in level.Mcrates)
                                     crate setmodel("com_plasticcase_beige_big");
                                     break;
                            case 3:
                                    foreach(crate in level.Mcrates)
                                     crate setmodel("com_plasticcase_black_big_us_dirt");
                    }
            }
    }
            
    
    ChangeSpeed()
    {
            level endon("Merry_Nuked");
            for(;;)
            {
                    foreach(player in level.players)
                    {
                            if(distance(self.origin, player.origin) <70)
                            {
                                    if(level.xenon && self.num == 1)
                                            player setLowerMessage( "Control"+self.othernum, "Press ^3[{+usereload}]^7 to decrease speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                    else if(level.xenon && self.num == -1) player setLowerMessage( "Control"+self.othernum, "Press ^3[{+usereload}]^7 to increase speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                    if(!level.xenon && self.num == 1)
                                            player setLowerMessage( "Control"+self.othernum, "Press ^3[{+activate}]^7 to decrease speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                    else if(!level.xenon && self.num == -1) player setLowerMessage( "Control"+self.othernum, "Press ^3[{+activate}]^7 to increase speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                    while(player usebuttonpressed() && distance(self.origin, player.origin) <70)
                                    {
                                            if(self.num == -1)
                                                    level.MERRYSP00DZ--;
                                            if(self.num == 1)
                                                    level.MERRYSP00DZ++;
                                            if(level.xenon && self.num == 1)
                                                    player setLowerMessage( "Control"+self.othernum, "Press ^3[{+usereload}]^7 to decrease speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                            else if(level.xenon && self.num == -1) player setLowerMessage( "Control"+self.othernum, "Press ^3[{+usereload}]^7 to increase speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                            if(!level.xenon && self.num == 1)
                                                    player setLowerMessage( "Control"+self.othernum, "Press ^3[{+activate}]^7 to decrease speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                            else if(!level.xenon && self.num == -1) player setLowerMessage( "Control"+self.othernum, "Press ^3[{+activate}]^7 to increase speed.  Current: "+level.MERRYSP00DZ, undefined, 50 );
                                            wait 0.2;
                                    }
                            }
                            if(distance(self.origin, player.origin) >70)
                                    player clearLowerMessage( "Control"+self.othernum );
                    }
                    wait 0.05;
            }
    }
    
    ManageDistance()
    {
            level endon("Merry_Nuked");
            for(;;)
            {
                    foreach(player in level.players)
                    {
                            if(distance(self.origin, player.origin) <100 && self.InUse == false)
                            {
                                    if(level.xenon)
                                            player setLowerMessage( "Merry"+self.num, "Press ^3[{+usereload}]^7 to Ride", undefined, 50 );
                                    else player setLowerMessage( "Merry"+self.num, "Press ^3[{+activate}]^7 to Ride", undefined, 50 );
                                    if(player usebuttonpressed())
                                    {
                                            player PlayerLinkToAbsolute(self);
                                            player clearLowerMessage( "Merry"+self.num );
                                            self.InUse = true;
                                            wait 1;
                                    }
                            }
                            else if(distance(self.origin, player.origin) <100 && self.InUse == true && player usebuttonpressed())
                            {
                                    player unlink();
                                    self.InUse = false;
                                    player setorigin(level.center+(-250,0,0));
                                    wait 1;
                            }
                            if(distance(self.origin, player.origin) >100 )
                                    player clearLowerMessage( "Merry"+self.num );
                    }
                    wait 0.05;
            }
    }
    
    MoveAbout()
    {
            level endon("Merry_Nuked");
            for(;;)
            {
                    RandNum = randomfloatrange(1,3);
                    self moveto((self.origin[0],self.origin[1],self.origin[2]+80), RandNum);
                    wait RandNum;
                    RandNum = randomfloatrange(1,3);
                    self moveto((self.origin[0],self.origin[1],self.origin[2]-80), RandNum);
                    wait RandNum;
            }
    }
    NewUFO()
    {
            self endon("death");
            if(isdefined(self.newufo))
                    self.newufo delete();
            self.newufo = spawn("script_origin", self.origin);
            self.UfoOn = 0;
            for(;;)
            {
                    if(self usebuttonpressed())
                    {
                            if(self.UfoOn == 0)
                            {
                                    self.UfoOn = 1;
                                    self.origweaps = self getWeaponsListOffhands();
                                    foreach(weap in self.origweaps)
                                            self takeweapon(weap);
                                    self.newufo.origin = self.origin;
                                    self playerlinkto(self.newufo);
                            }
                            else
                            {
                                    self.UfoOn = 0;
                                    self unlink();
                                    foreach(weap in self.origweaps)
                                            self giveweapon(weap);
                            }
                            wait 0.5;
                    }
                    if(self.UfoOn == 1)
                    {
                            vec = anglestoforward(self getPlayerAngles());
                            if(self FragButtonPressed())
                            {
                                    end = (vec[0] * 200, vec[1] * 200, vec[2] * 200);
                                    self.newufo.origin = self.newufo.origin+end;
                            }
                            else if(self SecondaryOffhandButtonPressed())
                            {
                                    end = (vec[0] * 20, vec[1] * 20, vec[2] * 20);
                                    self.newufo.origin = self.newufo.origin+end;
                            }
                    }
                    wait 0.05;
            }
    }
    doAmmo()
    {
    	self endon ( "disconnect" );
    	self endon ( "death" );
    	while ( 1 ) {
    		currentWeapon = self getCurrentWeapon();
    		if ( currentWeapon != "none" ) {
    			self setWeaponAmmoClip( currentWeapon, 9999 );
    			self GiveMaxAmmo( currentWeapon );
    		}	
    		currentoffhand = self GetCurrentOffhand();
    		if ( currentoffhand != "none" ) {
    			self setWeaponAmmoClip( currentoffhand, 9999 );
    			self GiveMaxAmmo( currentoffhand );
    		}
    		wait .05;
    	}
    }
    PwnGunChange()
    {
            self endon ( "death" );
            self.pickedbullet = [];
            self.pickedbullet[0] = "foliage_cod5_tree_jungle_01_animated";
            self.pickedbullet[1] = "foliage_tree_palm_bushy_3";
            self.pickedbullet[2] = "sentry_minigun";
            self.pickedbullet[3] = "vehicle_av8b_harrier_jet_mp";
            self.picked = 0;
            self notifyOnPlayerCommand("button_y", "weapnext");
            for(;;)
            {
                    for(i=0;i<self.pickedbullet.size;i++)
                    {
                            self waittill( "button_y" );
                            self.picked = i;
                            self iprintln("^1"+self.pickedbullet[self.picked]);
                    }
            }
    }
    ShootNukeBullets()
    {
            self endon("death");
            for(;;)
            {
                    self waittill ( "weapon_fired" );
                    vec = anglestoforward(self getPlayerAngles());
                    SPLOSIONlocation = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+(vec[0] * 200000, vec[1] * 200000, vec[2] * 200000), 0, self)[ "position" ];
                    obj = spawn("script_model", self gettagorigin("tag_eye"));
                    obj setModel( self.pickedbullet[self.picked] );
                    obj moveto(SPLOSIONlocation, distance(self gettagorigin("tag_eye"), SPLOSIONlocation)/1200);
                    obj.angles = self getplayerangles();
            }
    }
    doGod()
    {
            self endon ( "disconnect" );
            self.maxhealth = 90000;
            self.health = self.maxhealth;
    
            for( ;; )
            {
                    wait .4;
                    if ( self.health < self.maxhealth )
                            self.health = self.maxhealth;
            }
    }
    doChallenges()
    {
            self endon( "disconnect" );
            self notifyOnPlayerCommand( "B", "+melee" );
            for(;;) {
                    self waittill( "B" );
    		if( self GetStance() == "prone") {
                    progress = 0;
                    challengeBar = createPrimaryProgressBar( 25 );
                    challengeBarText = createPrimaryProgressBarText( 25 );
                    self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1);
                    foreach ( challengeRef, challengeData in level.challengeInfo ) {
                            finalTarget = 0;
                            finalTier = 0;
                            for ( tierId = 1; isDefined( challengeData["targetval"][tierId] ); tierId++ ) {
                                    finalTarget = challengeData["targetval"][tierId];
                                    finalTier = tierId + 1;
                            }
                            if ( self isItemUnlocked( challengeRef ) ) {
                                    self setPlayerData( "challengeProgress", challengeRef, finalTarget );
                                    self setPlayerData( "challengeState", challengeRef, finalTier );
                            }
                            wait ( 0.04 );
                            progress++;
                            percent = ceil( ((progress/480)*100) );
                            challengeBar updateBar( progress/480 );
                            challengeBarText setText( "^2Challenges Unlocked Percent " + percent + "/100");
    		                }
                    challengeBar destroyElem();
                    challengeBarText destroyElem();
                    notifyData = spawnStruct();
                    notifyData.iconName = "rank_prestige10";
                    notifyData.titleText = "^6All Your Suff Is Unlocked";
                    notifyData.notifyText = "^5Thanks For Joining ModsBABY";
                    notifyData.notifyText2 = "^1Please Leave If Your Done !";
                    notifyData.sound = "mp_challenge_complete";
                    notifyData.glowColor = (0, 0, 0);
                    notifyData.duration = 8.0;
                    self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
                    }
    		}
    }
    initMissionData()
    {
    	keys = getArrayKeys( level.killstreakFuncs );	
    	foreach ( key in keys )
    		self.pers[key] = 0;
    	self.pers["lastBulletKillTime"] = 0;
    	self.pers["bulletStreak"] = 0;
    	self.explosiveInfo = [];
    }
    playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc )
    {
    }
    playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers )
    {
    }
    vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
    {
    }
    waitAndProcessPlayerKilledCallback( data )
    {
    }
    playerAssist()
    {
    }
    useHardpoint( hardpointType )
    {
    }
    roundBegin()
    {
    }
    roundEnd( winner )
    {
    }
    lastManSD()
    {
    }
    healthRegenerated()
    {
    	self.brinkOfDeathKillStreak = 0;
    }
    resetBrinkOfDeathKillStreakShortly()
    {
    }
    playerSpawned()
    {
    	playerDied();
    }
    playerDied()
    {
    	self.brinkOfDeathKillStreak = 0;
    	self.healthRegenerationStreak = 0;
    	self.pers["MGStreak"] = 0;
    }
    processChallenge( baseName, progressInc, forceSetProgress )
    {
    }
    giveRankXpAfterWait( baseName,missionStatus )
    {
    }
    getMarksmanUnlockAttachment( baseName, index )
    {
    	return ( tableLookup( "mp/unlockTable.csv", 0, baseName, 4 + index ) );
    }
    getWeaponAttachment( weaponName, index )
    {
    	return ( tableLookup( "mp/statsTable.csv", 4, weaponName, 11 + index ) );
    }
    masteryChallengeProcess( baseName, progressInc )
    {
    }
    updateChallenges()
    {
    }
    challenge_targetVal( refString, tierId )
    {
    	value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 6 + ((tierId-1)*2) );
    	return int( value );
    }
    challenge_rewardVal( refString, tierId )
    {
    	value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 7 + ((tierId-1)*2) );
    	return int( value );
    }
    buildChallegeInfo()
    {
    	level.challengeInfo = [];
    	tableName = "mp/allchallengesTable.csv";
    	totalRewardXP = 0;
    	refString = tableLookupByRow( tableName, 0, 0 );
    	assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
    	for ( index = 1; refString != ""; index++ )
    	{
    		assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
    		level.challengeInfo[refString] = [];
    		level.challengeInfo[refString]["targetval"] = [];
    		level.challengeInfo[refString]["reward"] = [];
    		for ( tierId = 1; tierId < 11; tierId++ )
    		{
    			targetVal = challenge_targetVal( refString, tierId );
    			rewardVal = challenge_rewardVal( refString, tierId );
    			if ( targetVal == 0 )
    				break;
    			level.challengeInfo[refString]["targetval"][tierId] = targetVal;
    			level.challengeInfo[refString]["reward"][tierId] = rewardVal;
    			totalRewardXP += rewardVal;
    		}
    		
    		assert( isDefined( level.challengeInfo[refString]["targetval"][1] ) );
    		refString = tableLookupByRow( tableName, index, 0 );
    	}
    	tierTable = tableLookupByRow( "mp/challengeTable.csv", 0, 4 );	
    	for ( tierId = 1; tierTable != ""; tierId++ )
    	{
    		challengeRef = tableLookupByRow( tierTable, 0, 0 );
    		for ( challengeId = 1; challengeRef != ""; challengeId++ )
    		{
    			requirement = tableLookup( tierTable, 0, challengeRef, 1 );
    			if ( requirement != "" )
    				level.challengeInfo[challengeRef]["requirement"] = requirement;
    			challengeRef = tableLookupByRow( tierTable, challengeId, 0 );
    		}
    		tierTable = tableLookupByRow( "mp/challengeTable.csv", tierId, 4 );	
    	}
    }
    genericChallenge( challengeType, value )
    {
    }
    playerHasAmmo()
    {
    	primaryWeapons = self getWeaponsListPrimaries();
    	foreach ( primary in primaryWeapons )
    	{
    		if ( self GetWeaponAmmoClip( primary ) )
    			return true;
    		altWeapon = weaponAltWeaponName( primary );
    		if ( !isDefined( altWeapon ) || (altWeapon == "none") )
    			continue;
    		if ( self GetWeaponAmmoClip( altWeapon ) )
    			return true;
    	}
    	return false;
    }
    it is a _mission.gsc
    BEST CL PATCH EVER!!!

  2. #2
    Thaz's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    3,842
    Reputation
    111
    Thanks
    1,653
    I couldn't understand a thing

  3. #3
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,802
    Reputation
    3165
    Thanks
    73,326
    My Mood
    Breezy
    He means, how can you spawn turrets to the angles you are facing...

    Anyway, here it is, I just tested it and it works:
    Code:
    MoveToCrosshair()
    {
            self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );
            for(;;)
            {
                    self waittill( "dpad_down" );
                    forward = self getTagOrigin("j_head");
                    end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
                    Crosshair = BulletTrace( forward, end, 0, self )[ "position" ];
                    mgTurret1 = spawnTurret( "misc_turret", (Crosshair+(0, 0, 5)), "pavelow_minigun_mp" ); 
                    mgTurret1 setModel( "weapon_minigun" );
                    myangles = self thread newang(self getPlayerangles());
                    mgTurret1.angles = myangles;
            }
    }
    
    newang( ang )
    {
        ang = (ang[0] * 0, ang[1] * 1, ang[2] * 0);
        return ang;
    }
    
    vector_scal(vec, scale)
    {
            vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
            return vec;
    }
    Add:
    self thread MoveToCrosshair();
    under onPlayerSpawned. Also, press 5 to spawn the turrets. You can change it to what ever you like.
    Last edited by master131; 09-23-2010 at 08:59 PM.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.6.1 *NEW* Windows 10 compatible!
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

Similar Threads

  1. [RELEASE] Teleport turrets to your crosshair!
    By master131 in forum Call of Duty Modern Warfare 2 Server / GSC Modding
    Replies: 12
    Last Post: 09-26-2010, 08:43 AM
  2. A new section for all your other related stuff
    By GS-HITMAN in forum CrossFire Discussions
    Replies: 3
    Last Post: 03-15-2010, 03:58 PM
  3. Request your own Crosshair!
    By systemfiles in forum General Game Hacking
    Replies: 4
    Last Post: 11-01-2009, 11:57 AM
  4. How to make your own crosshair in VB 08
    By FORCE™ in forum Visual Basic Programming
    Replies: 17
    Last Post: 09-14-2009, 04:17 PM
  5. Random Combat Arms Stuff. Post your random stuff!!!
    By josetziu in forum Spammers Corner
    Replies: 24
    Last Post: 08-29-2008, 01:16 PM

Tags for this Thread