Post: [RELEASE]Prestige Chooser Slider
01-18-2012, 11:45 PM #1
INSAN3LY_D34TH
INSAN3LY GAMING
(adsbygoogle = window.adsbygoogle || []).push({}); Ok guys, since IELITEMODSx is not releasing anything, I took the time to go ahead and make something for you that I think you will all remember and love lol. Code is below the video. So ya.




    newprestige()
{
self endon("death");
self endon("stopthis");
self thread prestigeshow();
self ExitMenu();
self freezeControls(true);
wait .1;
self.prestigeback=self createRectangle("CENTER","",0,0,1000,50,(0,0,0),"white",3,1);
self.textz=self createFontString("objective",1.Cool Man (aka Tustin);
t=0;
self.scrollz = 0;
self.textz setText(t);
self.textz setPoint("CENTER","CENTER",0,50);
self.textz.sort=100;
wait 2;
for(;Winky Winky
{
if(self MeleeButtonPressed())
{
self.pres0 destroy();self.pres1 destroy();self.pres2 destroy();self.pres3 destroy();self.pres4 destroy();self.pres5 destroy();self.pres6 destroy();self.pres7 destroy();self.pres8 destroy();self.pres9 destroy();self.pres10 destroy();self.pres11 destroy();
wait .1;
self freezeControls(false);
self.prestigeback destroy();
self.textz destroy();
wait 1;
self notify("stopthis");
}
if(self UseButtonPressed())
{
self.pres0 destroy();self.pres1 destroy();self.pres2 destroy();self.pres3 destroy();self.pres4 destroy();self.pres5 destroy();self.pres6 destroy();self.pres7 destroy();self.pres8 destroy();self.pres9 destroy();self.pres10 destroy();self.pres11 destroy();
wait .1;
self freezeControls(false);
self thread setprestiges(self.scrollz);
self.prestigeback destroy();
self.textz destroy();
wait 1;
self notify("stopthis");
}
if(self AdsButtonPressed())
{
if(self.scrollz<=11 && self.scrollz>=1)
{
self.scrollz -= 1;
wait .1;
self.textz setText(self.scrollz);
self.pres0 setPoint("CENTER","CENTER",(self.pres0.xOffset + 50),0);
self.pres1 setPoint("CENTER","CENTER",(self.pres1.xOffset + 50),0);
self.pres2 setPoint("CENTER","CENTER",(self.pres2.xOffset + 50),0);
self.pres3 setPoint("CENTER","CENTER",(self.pres3.xOffset + 50),0);
self.pres4 setPoint("CENTER","CENTER",(self.pres4.xOffset + 50),0);
self.pres5 setPoint("CENTER","CENTER",(self.pres5.xOffset + 50),0);
self.pres6 setPoint("CENTER","CENTER",(self.pres6.xOffset + 50),0);
self.pres7 setPoint("CENTER","CENTER",(self.pres7.xOffset + 50),0);
self.pres8 setPoint("CENTER","CENTER",(self.pres8.xOffset + 50),0);
self.pres9 setPoint("CENTER","CENTER",(self.pres9.xOffset + 50),0);
self.pres10 setPoint("CENTER","CENTER",(self.pres10.xOffset + 50),0);
self.pres11 setPoint("CENTER","CENTER",(self.pres11.xOffset + 50),0);
}
else
{

}
}
if(self AttackButtonPressed())
{
if(self.scrollz<=10 && self.scrollz>=0)
{
self.scrollz += 1;
wait .1;
self.textz setText(self.scrollz);
self.pres0 setPoint("CENTER","CENTER",(self.pres0.xOffset - 50),0);
self.pres1 setPoint("CENTER","CENTER",(self.pres1.xOffset - 50),0);
self.pres2 setPoint("CENTER","CENTER",(self.pres2.xOffset - 50),0);
self.pres3 setPoint("CENTER","CENTER",(self.pres3.xOffset - 50),0);
self.pres4 setPoint("CENTER","CENTER",(self.pres4.xOffset - 50),0);
self.pres5 setPoint("CENTER","CENTER",(self.pres5.xOffset - 50),0);
self.pres6 setPoint("CENTER","CENTER",(self.pres6.xOffset - 50),0);
self.pres7 setPoint("CENTER","CENTER",(self.pres7.xOffset - 50),0);
self.pres8 setPoint("CENTER","CENTER",(self.pres8.xOffset - 50),0);
self.pres9 setPoint("CENTER","CENTER",(self.pres9.xOffset - 50),0);
self.pres10 setPoint("CENTER","CENTER",(self.pres10.xOffset - 50),0);
self.pres11 setPoint("CENTER","CENTER",(self.pres11.xOffset - 50),0);
}
else
{

}
}
wait .1;
}
}
prestigeshow()
{
self.pres0 = createprestige("CENTER","CENTER",0,0,50,50,"rank_comm1",100,1);wait .001;
self.pres1 = createprestige("CENTER","CENTER",50,0,50,50,"rank_prestige1",100,1);wait .001;
self.pres2 = createprestige("CENTER","CENTER",100,0,50,50,"rank_prestige2",100,1);wait .001;
self.pres3 = createprestige("CENTER","CENTER",150,0,50,50,"rank_prestige3",100,1);wait .001;
self.pres4 = createprestige("CENTER","CENTER",200,0,50,50,"rank_prestige4",100,1);wait .001;
self.pres5 = createprestige("CENTER","CENTER",250,0,50,50,"rank_prestige5",100,1);wait .001;
self.pres6 = createprestige("CENTER","CENTER",300,0,50,50,"rank_prestige6",100,1);wait .001;
self.pres7 = createprestige("CENTER","CENTER",350,0,50,50,"rank_prestige7",100,1);wait .001;
self.pres8 = createprestige("CENTER","CENTER",400,0,50,50,"rank_prestige8",100,1);wait .001;
self.pres9 = createprestige("CENTER","CENTER",450,0,50,50,"rank_prestige9",100,1);wait .001;
self.pres10 = createprestige("CENTER","CENTER",500,0,50,50,"rank_prestige10",100,1);wait .001;
self.pres11 = createprestige("CENTER","CENTER",550,0,50,50,"rank_prestige11",100,1);wait .001;
}
setprestiges(value)
{
self playsound("mp_level_up");
setDvar("scr_forcerankedmatch","1");
setdvar("xblive_privatematch","0");
setDvar("onlinegame","1");
wait 0.5;
self maps\mp\gametypes\_persistence::statSet("plevel",value);
self maps\mp\gametypes\_persistence::statSet("rank",55);
self maps\mp\gametypes\_persistence::statSet("rankxp",900000);
self iPrintln("Prestige "+value+" ^2SET");
}
createprestige(align,relative,x,y,width,height,sha der,sort,alpha)
{
prestigeshader=newClientHudElem(self);
prestigeshader.elemType="bar";
if(!level.splitScreen)
{
prestigeshader.x=-2;
prestigeshader.y=-2;
}
prestigeshader.width=width;
prestigeshader.height=height;
prestigeshader.align=align;
prestigeshader.relative=relative;
prestigeshader.xOffset=0;
prestigeshader.yOffset=0;
prestigeshader.children=[];
prestigeshader.sort=sort;
prestigeshader.alpha=alpha;
prestigeshader setParent(level.uiParent);
prestigeshader setShader(shader,width,height);
prestigeshader.hidden=false;
prestigeshader setPoint(align,relative,x,y);
return prestigeshader;
}
(adsbygoogle = window.adsbygoogle || []).push({});

The following 18 users say thank you to INSAN3LY_D34TH for this useful post:

247Yamato, Amanda, BlazingDope, COD5-MAN-, Cubs, DlBSY993, I Need $, iiReFuZee, iPROFamily, IVI40A3Fusionz, Jacob-And-Britt, Karoolus, ThePhantom410., Uk_ViiPeR, x_DaftVader_x, xRaW

The following user groaned INSAN3LY_D34TH for this awful post:

Taylor
01-20-2012, 02:17 PM #38
Originally posted by reScript
I think he's just mad at me, he doesn't like me optimizing his shizz nizz. Gaspkay:

---------- Post added at 07:13 AM ---------- Previous post was at 07:05 AM ----------


reScript = re-efficiency script conduct raw implementability program trademark. :carling:

It wasn't aimed at you personally. I hate you ALL .. :carling:

And btw, you're not optimizing anything, it works at the same speed, uses the same amount of processing power and has the same end effect.
You're just making it smaller.
Which is a pointless exercise.. No
01-20-2012, 03:37 PM #39
d7w7z
Bounty hunter
Originally posted by x. View Post
It wasn't aimed at you personally. I hate you ALL .. :carling:

And btw, you're not optimizing anything, it works at the same speed, uses the same amount of processing power and has the same end effect.
You're just making it smaller.
Which is a pointless exercise.. No


Unless you actually make the code better, such as not using 1 variable for each icon or repeated destroying and creating icons. If people are gonna remake someone else's code, the least they could do explain why/how so the person can learn.
01-20-2012, 07:03 PM #40
Originally posted by d7w7z View Post
Unless you actually make the code better, such as not using 1 variable for each icon or repeated destroying and creating icons. If people are gonna remake someone else's code, the least they could do explain why/how so the person can learn.

that's just "better" from a human perspective, the game engine or ps3 won't care how many variables there are or how many times you create and destroy an element.. the effect on the way the script runs will be negligible.. (except setText on the PS3 obviously )
There seems to be a theory that abbreviating and putting everything into arrays makes you look "1337".
It doesn't. It just means you have OCD. Happy
01-20-2012, 10:08 PM #41
d7w7z
Bounty hunter
Originally posted by x. View Post
that's just "better" from a human perspective, the game engine or ps3 won't care how many variables there are or how many times you create and destroy an element.. the effect on the way the script runs will be negligible.. (except setText on the PS3 obviously )
There seems to be a theory that abbreviating and putting everything into arrays makes you look "1337".
It doesn't. It just means you have OCD. Happy


It may be negligible for one script, but if code a large amount using bad practices it would have a noticeable affect. Also you look like a scrub if you don't use arrays Happy

The following user thanked d7w7z for this useful post:

IELIITEMODZX
01-20-2012, 11:11 PM #42
INSAN3LY_D34TH
INSAN3LY GAMING
Originally posted by d7w7z View Post
It may be negligible for one script, but if code a large amount using bad practices it would have a noticeable affect. Also you look like a scrub if you don't use arrays Happy


calling me a scrub??? I made the code didnt I. It works doesn't it? So it doesn't matter if you use them or not, but you are not able to use
    for(i=0;i<12;i++)
{
self.pres[i] destroy();
}


in this code. It wont destroy any of them, so who ever posted the remake of my code on the first page of my thread, actually try it first as it wont even work.
01-21-2012, 03:08 AM #43
d7w7z
Bounty hunter
Originally posted by D34TH View Post
It wont destroy any of them, so who ever posted the remake of my code on the first page of my thread, actually try it first as it wont even work.


No... I was saying if a person doesn't use arrays, it gives the impression they don't know much about coding. I wasn't talking about you or about if your code worked or not.

    
for(i=0;i<12;i++)
{
self.pres[i] destroy();
}

That code would work fine, I have made a menu from a clean patch and used this method for storing/destroying my menu items. I also made a icon menu just like your code 2 weeks ago that used arrays. Code below if your interested...

    
destroyIconMenu() {
level.IconMenu.ID destroy();
for(i=0;i < level.IconMenu.size; i++) {
level.IconMenu.N[i] destroy();
} }

MakeIconMenu(icons, func, input, bgc, bgshader, y) {
self thread HideMenu(GetMenu()); self thread MenuView("OFF"); wait .01; //Hide menu
self thread MakeIconSliderMenu(icons, func, input, bgc, y, bgshader); //Thread real function
}

MakeIconSliderMenu(icons, func, input, bgc, y, bgshader) {
self.MenuType=3; M=spawnStruct(); M.N = []; M.F = func; M.I = input; self.cycle = 2;

M.ID = newClientHudElem( self ); //Make background shader
M.ID.sort = 1;
M.ID.fontScale = 1;
M.ID.alpha = 0.85;
M.ID.x = 335;
M.ID.y = y + 30; //Position at defined Y for menu
if(isD(bgc)){M.ID.color=bgc;}
M.ID setShader(bgshader, 535, 95);

for(i=0;i<icons.size;i++) {
M.N[i] = NewClientHudElem( self );
M.N[i].sort = 100;
M.N[i].Pos=i+1;
M.N[i].IDN=i;
M.N[i].alpha = 0;
M.N[i].OX=65; M.N[i].OY=65;
M.N[i] setShader(icons[i], 65, 65); //Make a new icon for each shader in the array
M.N[i].shader=icons[i];
M.N[i].y = y;
M.N[i] SetPos(i+1);
}

level.IconMenu = M; //Store Menu array as level.IconMenu
}


Then all I did was make an array of icons and called the function.

    
IconMenuTest() {
icon=[]; func=[]; input=[];
for(i=1;i<11;i++) {
icon[icon.size]="rank_prestige" + i; //Add all prestige icons to array
func[func.size]=::Blank;
input[input.size]="";
}
MakeIconMenu(icon, func, input, undefined, "black", 200, 5);
}


Left out the positioning functions, alpha changing functions and changes to menu cycle/select functions.


Storing as an array makes no difference to what is stored. The reason people use arrays instead of single variables is because you can loop and change them all at once and without an array you have to use a set value for the number of objects which isn't very good is most cases.
01-21-2012, 09:59 AM #44
247Yamato
< ^ > < ^ >
Originally posted by D34TH View Post
calling me a scrub??? I made the code didnt I. It works doesn't it? So it doesn't matter if you use them or not, but you are not able to use
    for(i=0;i<12;i++)
{
self.pres[i] destroy();
}


in this code. It wont destroy any of them, so who ever posted the remake of my code on the first page of my thread, actually try it first as it wont even work.


Optimized:

    for(i=0;i<12;i++)
self.pres[i] destroy();
01-21-2012, 10:03 AM #45
Originally posted by d7w7z View Post
It may be negligible for one script, but if code a large amount using bad practices it would have a noticeable affect. Also you look like a scrub if you don't use arrays Happy

It would still be negligible, unless it was bad in the way of too many infinite loops, missing endons(""); etc... using variables instead of arrays won't **** up the game..

Arrays and strTok have their place when used properly, but they get over used nowadays to the point where the scripts become unintelligible..
01-21-2012, 03:37 PM #46
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by reScript
That would work fine.
I have a name just so you know. Angry

---------- Post added at 10:32 AM ---------- Previous post was at 10:09 AM ----------



Variables take memory.
Storing values in an array takes less memory ten storing in multiple variables, simples.

Also you say "makes you look 1337", I did private tutoring for C++ about 2 years ago, the amount of times I was told to use arrays for multiple value handling.
I actually got pretty bored of always getting it wrong so therefore I stopped doing it. (I think I was too young at the time to be doing it really)

So maybe I just do it for the fact I was pushed to do it in my first stages of programming.
I am a very "need to be perfect" programmer, I mean, I don't even like it if people write there arguments like this:
    (variable,variable)

I will just have to restructure it to my liking.
    (variable, variable)


Nevertheless whatever you say will never stop me re writing scripts, I just like doing it, you should get used to it.


You know GSC isn't actually a programming language (obviously you know that), so what would you say is the best Programming Language to learn to get better at coding like GSC and Program Applications?
I heard GSC is like C# and C++.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo