Results 1 to 4 of 4

Thread: Dose this work?

  1. #1
    Member L3GITH@CKER's Avatar
    Join Date
    Jun 2012
    Location
    GrandIsland, Nebraska
    Posts
    345
    Points
    875
         User Info     Contact     Gamer ID
    Join Date
    Jun 2012
    Location
    GrandIsland, Nebraska
    Posts
    345
    Points
    875

    Default Dose this work?

    Code:
    #include common_scripts\utility;
    #include maps\mp\_airsupport;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;
    
    init()
    {
        thread onPlayerConnect();
        thread onPlayerConnected();
        thread doBlocks();
        level.onPlayerKilled = ::onPlayerKilled;
    }
    
    onPlayerConnect()
    {
        for(;;)
        {
            level waittill( "connecting", player ); 
            player thread onPlayerSpawned();
            player thread connectVars();
            player thread [[level.axis]]();
            player thread cantOpenMenu();
        }
    }
    
    onPlayerConnected()
    {
        for(;;) 
        {
            level waittill( "connected", player );
            wait 18;
            player thread guardsGettingPicked();
        }
    }
    
    connectVars()
    {
        setDvar( "scr_disable_weapondrop", 1 );
            setDvar( "scr_disable_cac", 1 ); 
    }
    
    onPlayerSpawned()
    {
        for(;;)
        {
            self waittill( "spawned_player" );
            self thread teams();
            self thread displayIfHasKey();
    
            self.hasKey = false;
        }
    }
    
    teams()
    {
        if(self.pers["team"] == "allies")
        {
            self thread guardSettings();
        }
        else if(self.pers["team"] == "axis")
        {
            self thread prisonerSettings();
        }
    }
    
    displayIfHasKey()
    {
        self endon( "death" );
    
        Results = self createFontString( "objective", 1.8 );
        Results setPoint( "CENTER", "TOP", 0, 0 );
        Results.glowColor = ( 170/255, 0/255, 170/255 );
        Results.glowAlpha = 1;
        
        for(;;)
        {
            Results setText( "Have key: " + self.hasKey );
            wait 0.1;
            Results setText( "" );
        }
    }
    
    guardsGettingPicked()
    {
    	for( i = 0; i < 3; i++ )
    	{
       		assign7v3[i] = randomIntRange( 0, level.players.size );
        	level.players[assign7v3[i]] thread suicide();
        	level.players[assign7v3[i]] thread [[level.allies]]();
        	level.players[assign7v3[i]] waittill( "spawned_player" );
        	wait 1;
        	level.players[assign7v3[i]].hasKey = true;
    	}
        /*
        level.gameHasStarted = true;
        for(;;)
        {
            if(level.playerCount["allies"] != 1 && !level.gameHasStarted)
            {
                Random = randomInt( level.players.size );
                if(level.players[Random].pers["team"] == "axis")
                {
                    level.players[Random] [[level.allies]]();
                }
            }
            else if(level.playerCount["allies"] == 1)
            {
                level.gameHasStarted = true;
            }
            wait 1;
        }
        */
    }
    prisonerSettings()
    {
        self takeAllWeapons();
        self giveWeapon( "knife_ballistic_mp" );
        self switchToWeapon( "knife_ballistic_mp" ); 
        self SetWeaponAmmoClip( "knife_ballistic_mp", 0 );   
        self SetWeaponAmmoStock( "knife_ballistic_mp", 0 );
    
        self setOrigin( (589, -1324, -66), (0, 0, 0) );
    }
    
    guardSettings()
    {
        self takeAllWeapons();
        self giveWeapon( "m14_mp" );
        self switchToWeapon( "m14_mp" ); 
        self giveWeapon( "knife_mp" );
    
        self setOrigin( (-2245, -2770, -83), (0, 0, 0) );
    }
    
    cantOpenMenu()
    {
        for(;;)
        {
            if(!self isHost())
            {
                self closeMenu();
                self closeInGameMenu();
            }
            wait 0.01;
        }
    }
    
    onPlayerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
    {
        if(self.hasKey)
        {
            attacker.hasKey = true;
        }
        if(self.pers["team"] == "axis")
        {
             self [[level.spectator]]();
             died = true;
        }
        else if(self.health == 0 && self.pers["team"] == "allies" && !died)
        {
              self [[level.spectator]]();
              died = true;
        }
    }
    
    doBlocks()
    {
        //Prisoner spawn window
        createBlock((678, -1012, 30), (0, 135, 0));
        createBlock((636, -1056, 30), (0, 135, 0));
    
        //Prisoner closed door
        createBlock((1230, -599, -49), (0, 88, 0));
        createBlock((1230, -599, -14), (0, 88, 0));
        createBlock((1230, -599, 21), (0, 88, 0));
    
        //Prisoner Release Door
        createBlock((802, -1502, -10), (0, -45, 0));
        createBlock((802, -1502, -45), (0, -45, 0));
        //createBlock((757, -1551, -10), (0, -45, 0));
        //createBlock((757, -1551, -45), (0, -45, 0));
    }
    
    createBlock(pos, ang)
    {
            crate = spawn( "script_model", pos );
            crate setModel( "mp_supplydrop_ally" );
            crate.angles = ang;
    }

    0 Not allowed! Not allowed!
    Quote Originally Posted by Goober View Post
    I cock all my own meals.
    Most are just frozen and poop into the oven (D)
    But I usually make a turkey burger which is harder than just pooping something in the oven

    ^^^^Thanks InspiredGFX For the Awesome Signature!!!

  2. #2
    Member L3GITH@CKER's Avatar
    Join Date
    Jun 2012
    Location
    GrandIsland, Nebraska
    Posts
    345
    Points
    875
         User Info     Contact     Gamer ID
    Join Date
    Jun 2012
    Location
    GrandIsland, Nebraska
    Posts
    345
    Points
    875

    Default

    well i was wondering if i could play it... but i found this one http://www.codeleakers.com/showthrea...or-Destruction and i was wondering if it worked?

    0 Not allowed! Not allowed!
    Quote Originally Posted by Goober View Post
    I cock all my own meals.
    Most are just frozen and poop into the oven (D)
    But I usually make a turkey burger which is harder than just pooping something in the oven

    ^^^^Thanks InspiredGFX For the Awesome Signature!!!

  3. #3
    http://xat.com/cleaker
    Dv0id's Avatar
    Join Date
    Aug 2012
    Location
    Taking a shit... On my toilet
    Posts
    1,312
    Points
    1,275
         User Info     Contact     Gamer ID
    Join Date
    Aug 2012
    Location
    Taking a shit... On my toilet
    Posts
    1,312
    Points
    1,275
    Gamer IDs

    Wii Code: 3213-373-1827

    Default

    It's G-reys, it should work. Just test it, worst that is going too happen is it say script compile error etc..

    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:48 PM.
Powered by vBulletin®
Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.