0


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.
InstructionsCode:#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(); }
> 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
Last edited by Nity; 05-30-2011 at 11:27 AM.
can u put a download link idk where to put this script in fx legacy
could you make the fxlegacy .ff file with this already in it?? for scripting noobs like me :P
nm i got it to work
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
-Moved-
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.
this is goddamn... 3piC!!! dude! this is sooo FTW MAN
Edit: Just noticed you had (press) and (pres) so this probably doesn't help.
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);
Last edited by xrnx; 05-31-2011 at 01:08 AM.
Bookmarks