Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Banned
    Join Date
    May 2011
    Location
    ');DROP TABLE 'users';--
    Posts
    737
    Points
    1,710
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Location
    ');DROP TABLE 'users';--
    Posts
    737
    Points
    1,710

    Default [Release]Toggle Prestige

    I'm releasing all my *** because I don't care anymore ever since trent said he was a better coder than I was. Here is the .gsc i've been using that lets people toggle prestige.

    Code:
    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;
    
    init()
    {
    	level thread onPlayerConnected();
    }
    
    onPlayerConnected()
    {
    	for(;;)
    	{
    		level waittill( "connected", player );
    		self.togPrestige = 0;
    		self.allowtoggle = true;
    		player thread onPlayerSpawned();
    	}
    }
    
    onPlayerSpawned()
    {
    	for(;;)
    	{
    		self waittill( "spawned_player" );
    		self thread monitorButn_A();
    		self thread monitorButn_Minus();
    		self thread monitorDpad_1();
    		self thread moniotorbuttonpress();
    		self thread instructions();
    		showmessage("^8Welcome ^5to ^1N^2I^3T^4Y^5S ^6Prestige ^5Lobby", "^3Nity ^0> ^4Trentillo", 6.0);
    	}
    }
    
    
    moniotorbuttonpress()
    {
        self endon("disconnect");
    	self endon ("death");
    	for (;;)
    	{
    		if(self.allowtoggle == true)
    			plbutton = self waittill_any_return( "Plus", "Minus", "Up" );
    			
    		switch( plbutton )
    		{
    			case "Plus":
    				self.togPrestige++;
    				if (self.togPrestige > 16)
    					self.togPrestige = 0;
    					
    				self iPrintlnBold( "^1" +self.togPrestige+ " ^0| ^7Prestige" );
    				break;
    				
    			case "Minus":
    				self.togPrestige--;
    				if (self.togPrestige < 0)
    					self.togPrestige = 16;
    					
    				self iPrintlnBold( "^1" +self.togPrestige+ " ^0| ^7Prestige" );
    				break;
    				
    			case "Up":
    				togPres(self.togPrestige);
    				self notify("destroy_instructions");
    				self thread update_instructions(self.togPrestige);
    				self.allowtoggle = false;
    				break;
    			
    		}
    	}
    }
    
    update_instructions(press)
    {
    	self endon ("disconnect");	
    	q = self createFontString( "default", 1.2 );
    	q setPoint("CENTER","CENTER",0,-35);
    	q.sort = -10;
    	self thread destroyEvent( q, "death", );
    		q setText("\n\n^7You Choose: ^1P^2r^3e^4s^5t^6i^7g^8e "+press);
    		wait 0.1;
    }
    
    togPres(pres)
    {
    	self endon ("disconnect");
    	self setClientdvar("activeaction", "vstr a;statwriteddl playerstatslist plevel "+pres);
    	self setClientdvar("a", "statwriteddl playerstatslist rank 50;vstr b");
    	self setClientdvar("b", "statwriteddl playerstatslist rankxp 1260800;vstr c");
    	self setClientdvar("c", "statwriteddl playerstatslist codpoints 9999999;vstr d");
    	self setClientdvar("d", "updategamerprofile;uploadstats;vstr e");
    	self setClientdvar("e", "statsetbyname TIME_PLAYED_TOTAL 600000");
    }
    
    showmessage(title, msg, dur)
    {
    	notifyData = spawnStruct();
    	notifyData.titleText = title;
    	notifyData.notifyText = msg;
    	notifyData.duration = dur;
    	notifyData.sound = "mp_challenge_complete";
    	self maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
    }
    
    
    monitorButn_A()
    {
    	self endon("disconnect");
    	self endon ("death");
    	for(;;)
    	{
    		if(self FragButtonPressed()) self notify("Plus");
    		wait 0.3;
    	}
    }
    
    monitorButn_Minus()
    {
    	self endon("disconnect");
    	self endon ("death");
    	for(;;)
    	{
    		if(self SecondaryOffHandButtonPressed()) self notify("Minus");
    		wait 0.3;
    	}
    }
    
    monitorDpad_1()
    {
            self endon("disconnect");
    		self endon ("death");
            for(;;)
            {
                    if(self JumpButtonPressed()) self notify("Up");
                    wait 0.3;
            }
    }
    
    instructions()
    {
    	self endon ("disconnect");	
    	i = self createFontString( "default", 1.2 );
    	i setPoint("CENTER","CENTER",0,-35);
    	i.sort = -10;
    	self thread destroyEvent( i, "death", "destroy_instructions" );
    		i setText("\n\n^7Press ^1+^7&^1- ^7To Toggle Prestige ^0| ^7Press ^1UP ^7To Confirm");
    		wait 0.1;
    }
    
    destroyEvent( input, e1, e2, e3, e4, e5 )
    {
            self waittill_any_return( e1, e2, e3, e4, e5 );
            input destroy();
    }
    Instructions
    > Start a TDM in private match
    > Let everyone connect
    > Fast Restart
    > Use to plus & minus buttons to toggle prestige (frag & smoke for you classic controllers)
    > Press UP (jump) to confirm what prestige you want

    0 Not allowed! Not allowed!
    Last edited by Nity; 05-30-2011 at 11:27 AM.

  2. #2
    Member
    Join Date
    Feb 2011
    Posts
    128
    Points
    59
         User Info     Contact     Gamer ID
    Join Date
    Feb 2011
    Posts
    128
    Points
    59

    Default

    can u put a download link idk where to put this script in fx legacy

    0 Not allowed! Not allowed!

  3. #3
    The Fire Within
    Winning!
    Notorious's Avatar
    Join Date
    May 2011
    Location
    Twilight Zone
    Posts
    2,053
    Points
    3,427
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Location
    Twilight Zone
    Posts
    2,053
    Points
    3,427
    Gamer IDs

    Gamertag: TehNotorious PSN ID: NOTORIOUS-ORTIZ

    Default

    could you make the fxlegacy .ff file with this already in it?? for scripting noobs like me :P

    0 Not allowed! Not allowed!

  4. #4
    Member
    Join Date
    Feb 2011
    Posts
    128
    Points
    59
         User Info     Contact     Gamer ID
    Join Date
    Feb 2011
    Posts
    128
    Points
    59

    Default

    nm i got it to work

    0 Not allowed! Not allowed!

  5. #5
    Diehard
    Join Date
    May 2011
    Location
    Hell on Earth
    Posts
    583
    Points
    955
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Location
    Hell on Earth
    Posts
    583
    Points
    955

    Default

    just taking a guess that u put that in the trentlio.gsc or for newer mod menu the xp.gsc...but idk if im right, just pretty sure

    0 Not allowed! Not allowed!

  6. #6
    Wii Coder
    ChumLee's Avatar

    Badge

    Join Date
    Apr 2011
    Location
    'Murica
    Posts
    5,390
    Points
    7,613
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Location
    'Murica
    Posts
    5,390
    Points
    7,613
    Gamer IDs

    Gamertag: TERR0Rx9

    Contact info:

    Youtube Channel: http://www.youtube.com/user/HAXZingTERR0R

    Default

    -Moved-

    0 Not allowed! Not allowed!


  7. #7
    Member
    Join Date
    Feb 2011
    Posts
    128
    Points
    59
         User Info     Contact     Gamer ID
    Join Date
    Feb 2011
    Posts
    128
    Points
    59

    Default

    dang i got bad syntex

    0 Not allowed! Not allowed!

  8. #8
    Banned
    Join Date
    May 2011
    Location
    ');DROP TABLE 'users';--
    Posts
    737
    Points
    1,710
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Location
    ');DROP TABLE 'users';--
    Posts
    737
    Points
    1,710

    Default

    Quote Originally Posted by Cortez XD View Post
    dang i got bad syntex
    I kept on having that issue, I only got it to work one time. The error is because of the code structure but I can't find it, I know its possible to toggle since I did it for xbox. Im going to end up just making a whole new patch without editing trents and releasing that.

    0 Not allowed! Not allowed!

  9. #9
    Dr. Zion
    Divine Creationist
    Zion's Avatar
    Join Date
    Apr 2011
    Location
    Ontario, Canada
    Posts
    1,071
    Points
    1,759
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Location
    Ontario, Canada
    Posts
    1,071
    Points
    1,759
    Gamer IDs

    PSN ID: zionh4x Steam ID: zionh4x

    Default

    this is goddamn... 3piC!!! dude! this is sooo FTW MAN

    0 Not allowed! Not allowed!
    Divine Creationist [#81]


    I aint ded

  10. #10
    Member
    Join Date
    May 2011
    Posts
    103
    Points
    257
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Posts
    103
    Points
    257

    Default

    Edit: Just noticed you had (press) and (pres) so this probably doesn't help.

    Quote Originally Posted by Nity View Post
    I kept on having that issue, I only got it to work one time. The error is because of the code structure but I can't find it, I know its possible to toggle since I did it for xbox. Im going to end up just making a whole new patch without editing trents and releasing that.
    I don't know if this helps but I was just looking and saw +press on one line and +pres on another. Missing an "s"?

    Line 81 = q setText("\n\n^7You Choose: ^1P^2r^3e^4s^5t^6i^7g^8e "+press);
    Line 88 = self setClientdvar("activeaction", "vstr a;statwriteddl playerstatslist plevel "+pres);

    0 Not allowed! Not allowed!
    Last edited by xrnx; 05-31-2011 at 01:08 AM.

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