Post: [RELEASE] Nice Stats Editor
01-06-2012, 10:09 PM #1
IVI40A3Fusionz
Former Gaming Squad Member
(adsbygoogle = window.adsbygoogle || []).push({}); Originally made by Su AriZonaa.
Edited by Me.
Fixed by IELIITEMODZX (Made It More Stable and Fixed The Bugs).


I added a Console check so you don't have to mess with the text and shaders to get them right for PC and PS3(or XBOX).
I've decided i'm not gonna make a patch im just going to use IELIITEMODZX's or x_DaftVader_x's patch when they are released Winky Winky.

Code:
    StatsEditor(stat)
{
self endon("death");
self endon("disconnect");
self endon("StopStats");
self.Stat=[];
self.InStat=1;
self.StatNum=0;
self.stat["curs"]=0;
self.StatsEditor["Open"]=1;
if(level.console)
{
//PS3
self.Stats=CreateTextLine("hud_small",1.8,"LEFT","",-350,0,"+ 100000 + 10000 + 1000 + 100 Max Out Reset",1000,1);
self.SubCurs=self createRectangle("CENTER","",0,self.Stats[self.stat["curs"]].x,100,23,(141/255,7/255,7/255),"white",100,20);
self.SubCurs ElemMove(0.5,((self.stat["curs"] * 125)- 310),self.Stats.y);
}
else
{
//PC
self.Stats=CreateTextLine("hud_small",1.8,"LEFT","",-265,0,"+ 100000 + 10000 + 1000 + 100 Max Out Reset",1000,1);
self.SubCurs=self createRectangle("CENTER","",0,self.Stats[self.stat["curs"]].x,100,20,(141/255,7/255,7/255),"white",100,20);
self.SubCurs ElemMove(0.5,((self.stat["curs"] * 89)- 230),self.Stats.y);
}
self.EditorBG=self createRectangle("CENTER","CENTER",0,0,1000,30,(0,0,0),"white",100,20);
for(;Winky Winky
{
self.SubCurs.sort=2000;
if(self AttackButtonPressed())
{
self.stat["curs"] ++;
self.SubCurs MoveOverTime(.25);
if(self.stat["curs"] > 5)self.stat["curs"]=0;
if(level.console)
{
//PS3
self.subCurs.x =((self.stat["curs"] * 125)- 310);
}
else
{
//PC
self.subCurs.x =((self.stat["curs"] * 89)- 230);
}
wait 0.26;
}
if(self AdsButtonPressed())
{
self.stat["curs"] --;
self.SubCurs MoveOverTime(.25);
if(self.stat["curs"] < 0)self.stat["curs"]=5;
if(level.console)
{
//PS3
self.subCurs.x =((self.stat["curs"] * 125)- 310);
}
else
{
//PC
self.subCurs.x =((self.stat["curs"] * 89)- 230);
}
wait .26;
}
if(self UseButtonPressed())
{
if(self.StatsEditor["Open"]==1)
{
self playLocalSound("mp_ingame_summary");
alpha=self.SubCurs.alpha;
for(i= 0;i < 8;i ++)
{
if(i % 2)self.SubCurs.alpha=0;
else self.SubCurs.alpha=alpha;
wait 0.05;
}
self.SubCurs.alpha=alpha;
if(self.stat["curs"]==0)self.StatNum=self.StatNum+100000;
if(self.stat["curs"]==1)self.StatNum=self.StatNum+10000;
if(self.stat["curs"]==2)self.StatNum=self.StatNum+1000;
if(self.stat["curs"]==3)self.StatNum=self.StatNum+100;
if(self.stat["curs"]==4)self.StatNum=2147483647;
if(self.stat["curs"]==5)self.StatNum=0;
self iPrintln("^3Your "+stat+" ^7Is Now: ^2"+self.StatNum+"!");
wait .05;
}
}
if(self MeleeButtonPressed())
{
self thread SetStats(stat);
self notify("StopStats");
self.StatsEditor["Open"]=0;
wait .1;
}
wait .05;
}
}
SetStats(stat)
{
self.SubCurs destroy();
self.EditorBG destroy();
self.Stats destroy();
self.InStat=0;
self maps\mp\gametypes\_persistence::statSet(stat,int(self.StatNum));
}


You will also need:
    CreateTextLine(fonttype,fontsize,xOffset,yOffset,xNum,yNum,textz,sort,alpha)
{
text=createFontString(fonttype,fontsize,self);
text SetPoint(xOffset,yOffset,xNum,yNum);
text setText(textz);
text.foreground=true;
text.alpha=alpha;
text.sort=sort;
return text;
}

ElemMove(time,x,y)
{
self moveovertime(time);
self.x=x;
self.y=y;
}

createRectangle(align,relative,x,y,width,height,color,shader,sort,alpha)
{
CShader=newClientHudElem(self);
CShader.elemType="bar";
if(!level.splitScreen)
{
CShader.x=-2;
CShader.y=-2;
}
CShader.width=width;
CShader.height=height;
CShader.align=align;
CShader.relative=relative;
CShader.xOffset=0;
CShader.yOffset=0;
CShader.children=[];
CShader.sort=sort;
CShader.color=color;
CShader.alpha=alpha;
CShader setParent(level.uiParent);
CShader setShader(shader,width,height);
CShader.hidden=false;
CShader setPoint(align,relative,x,y);
return CShader;
}


How to add it to your menu:
    *Put StatsEditor as your function.
*Put "" Between the "" you can put kills, deaths, score etc...

Other than that enjoy the script Happy.
(adsbygoogle = window.adsbygoogle || []).push({});

The following user thanked IVI40A3Fusionz for this useful post:

Jacob-And-Britt
01-06-2012, 10:48 PM #2
Originally posted by IVI40A3Fusionz View Post
Originally made by Su AriZonaa.
Edited by Me.
Fixed by IELIITEMODZX (Made It More Stable and Fixed The Bugs).


I added a Console check so you don't have to mess with the text and shaders to get them right for PC and PS3(or XBOX).
I've decided i'm not gonna make a patch im just going to use IELIITEMODZX's or x_DaftVader_x's patch when they are released Winky Winky.

Code:
    StatsEditor(stat)
{
self endon("death");
self endon("disconnect");
self endon("StopStats");
self.Stat=[];
self.InStat=1;
self.StatNum=0;
self.stat["curs"]=0;
self.StatsEditor["Open"]=1;
if(level.console)
{
//PS3
self.Stats=CreateTextLine("hud_small",1.8,"LEFT","",-350,0,"+ 100000 + 10000 + 1000 + 100 Max Out Reset",1000,1);
self.SubCurs=self createRectangle("CENTER","",0,self.Stats[self.stat["curs"]].x,100,23,(141/255,7/255,7/255),"white",100,20);
self.SubCurs ElemMove(0.5,((self.stat["curs"] * 125)- 310),self.Stats.y);
}
else
{
//PC
self.Stats=CreateTextLine("hud_small",1.8,"LEFT","",-265,0,"+ 100000 + 10000 + 1000 + 100 Max Out Reset",1000,1);
self.SubCurs=self createRectangle("CENTER","",0,self.Stats[self.stat["curs"]].x,100,20,(141/255,7/255,7/255),"white",100,20);
self.SubCurs ElemMove(0.5,((self.stat["curs"] * 89)- 230),self.Stats.y);
}
self.EditorBG=self createRectangle("CENTER","CENTER",0,0,1000,30,(0,0,0),"white",100,20);
for(;Winky Winky
{
self.SubCurs.sort=2000;
if(self AttackButtonPressed())
{
self.stat["curs"] ++;
self.SubCurs MoveOverTime(.25);
if(self.stat["curs"] > 5)self.stat["curs"]=0;
if(level.console)
{
//PS3
self.subCurs.x =((self.stat["curs"] * 125)- 310);
}
else
{
//PC
self.subCurs.x =((self.stat["curs"] * 89)- 230);
}
wait 0.26;
}
if(self AdsButtonPressed())
{
self.stat["curs"] --;
self.SubCurs MoveOverTime(.25);
if(self.stat["curs"] < 0)self.stat["curs"]=5;
if(level.console)
{
//PS3
self.subCurs.x =((self.stat["curs"] * 125)- 310);
}
else
{
//PC
self.subCurs.x =((self.stat["curs"] * 89)- 230);
}
wait .26;
}
if(self UseButtonPressed())
{
if(self.StatsEditor["Open"]==1)
{
self playLocalSound("mp_ingame_summary");
alpha=self.SubCurs.alpha;
for(i= 0;i < 8;i ++)
{
if(i % 2)self.SubCurs.alpha=0;
else self.SubCurs.alpha=alpha;
wait 0.05;
}
self.SubCurs.alpha=alpha;
if(self.stat["curs"]==0)self.StatNum=self.StatNum+100000;
if(self.stat["curs"]==1)self.StatNum=self.StatNum+10000;
if(self.stat["curs"]==2)self.StatNum=self.StatNum+1000;
if(self.stat["curs"]==3)self.StatNum=self.StatNum+100;
if(self.stat["curs"]==4)self.StatNum=2147483647;
if(self.stat["curs"]==5)self.StatNum=0;
self iPrintln("^3Your "+stat+" ^7Is Now: ^2"+self.StatNum+"!");
wait .05;
}
}
if(self MeleeButtonPressed())
{
self thread SetStats(stat);
self notify("StopStats");
self.StatsEditor["Open"]=0;
wait .1;
}
wait .05;
}
}
SetStats(stat)
{
self.SubCurs destroy();
self.EditorBG destroy();
self.Stats destroy();
self.InStat=0;
self maps\mp\gametypes\_persistence::statSet(stat,int(self.StatNum));
}


How to add it to your menu:
    *Put StatsEditor as your function.
*Put "" Between the "" you can put kills, deaths, score etc...

Other than that enjoy the script Happy.


use self.StatNum += 100000;
that works the same but its smaller Happy
01-06-2012, 11:16 PM #3
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by reScript
Adding on elitemodz optimization suggestions.
You shouldn't add body braces to a if statement if it is only being referred to one command line.

Example:

    if(BOOL)
command = 0;

Would be better than:
    
if(BOOL)
{
command = 0;
}


I never coded it so....
01-06-2012, 11:21 PM #4
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by reScript
Forgot to quote :fa:

---------- Post added at 06:19 PM ---------- Previous post was at 06:18 PM ----------


Why did you post it then? O.o


Because we haven't got a good stats editor that won't overflow and has no bugs in this section yet. Yeah Correy posted Su AriZonaa Menu Base but have you seen that thing it will overflow and so will his editor Winky Winky.
01-06-2012, 11:35 PM #5
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by reScript
Yea, the console check is where the if statements I am talking about are... Happy


Ahh now i see where your coming from Winky Winky should have said Happy.
01-07-2012, 12:21 AM #6
Originally posted by reScript
Adding on elitemodz optimization suggestions.
You shouldn't add body braces to a if statement if it is only being referred to one command line.

Example:

    if(BOOL)
command = 0;

Would be better than:
    
if(BOOL)
{
command = 0;
}


-edit
I should also add that this is for all statements (for, else, while, etc.).


I think you're being pedantic. It works either way... :P
01-07-2012, 12:39 AM #7
Originally posted by IVI40A3Fusionz View Post
Originally made by Su AriZonaa.
Edited by Me.
Fixed by IELIITEMODZX (Made It More Stable and Fixed The Bugs).


I added a Console check so you don't have to mess with the text and shaders to get them right for PC and PS3(or XBOX).
I've decided i'm not gonna make a patch im just going to use IELIITEMODZX's or x_DaftVader_x's patch when they are released Winky Winky.

Code:
    StatsEditor(stat)
{
self endon("death");
self endon("disconnect");
self endon("StopStats");
self.Stat=[];
self.InStat=1;
self.StatNum=0;
self.stat["curs"]=0;
self.StatsEditor["Open"]=1;
if(level.console)
{
//PS3
self.Stats=CreateTextLine("hud_small",1.8,"LEFT","",-350,0,"+ 100000 + 10000 + 1000 + 100 Max Out Reset",1000,1);
self.SubCurs=self createRectangle("CENTER","",0,self.Stats[self.stat["curs"]].x,100,23,(141/255,7/255,7/255),"white",100,20);
self.SubCurs ElemMove(0.5,((self.stat["curs"] * 125)- 310),self.Stats.y);
}
else
{
//PC
self.Stats=CreateTextLine("hud_small",1.8,"LEFT","",-265,0,"+ 100000 + 10000 + 1000 + 100 Max Out Reset",1000,1);
self.SubCurs=self createRectangle("CENTER","",0,self.Stats[self.stat["curs"]].x,100,20,(141/255,7/255,7/255),"white",100,20);
self.SubCurs ElemMove(0.5,((self.stat["curs"] * 89)- 230),self.Stats.y);
}
self.EditorBG=self createRectangle("CENTER","CENTER",0,0,1000,30,(0,0,0),"white",100,20);
for(;Winky Winky
{
self.SubCurs.sort=2000;
if(self AttackButtonPressed())
{
self.stat["curs"] ++;
self.SubCurs MoveOverTime(.25);
if(self.stat["curs"] > 5)self.stat["curs"]=0;
if(level.console)
{
//PS3
self.subCurs.x =((self.stat["curs"] * 125)- 310);
}
else
{
//PC
self.subCurs.x =((self.stat["curs"] * 89)- 230);
}
wait 0.26;
}
if(self AdsButtonPressed())
{
self.stat["curs"] --;
self.SubCurs MoveOverTime(.25);
if(self.stat["curs"] < 0)self.stat["curs"]=5;
if(level.console)
{
//PS3
self.subCurs.x =((self.stat["curs"] * 125)- 310);
}
else
{
//PC
self.subCurs.x =((self.stat["curs"] * 89)- 230);
}
wait .26;
}
if(self UseButtonPressed())
{
if(self.StatsEditor["Open"]==1)
{
self playLocalSound("mp_ingame_summary");
alpha=self.SubCurs.alpha;
for(i= 0;i < 8;i ++)
{
if(i % 2)self.SubCurs.alpha=0;
else self.SubCurs.alpha=alpha;
wait 0.05;
}
self.SubCurs.alpha=alpha;
if(self.stat["curs"]==0)self.StatNum=self.StatNum+100000;
if(self.stat["curs"]==1)self.StatNum=self.StatNum+10000;
if(self.stat["curs"]==2)self.StatNum=self.StatNum+1000;
if(self.stat["curs"]==3)self.StatNum=self.StatNum+100;
if(self.stat["curs"]==4)self.StatNum=2147483647;
if(self.stat["curs"]==5)self.StatNum=0;
self iPrintln("^3Your "+stat+" ^7Is Now: ^2"+self.StatNum+"!");
wait .05;
}
}
if(self MeleeButtonPressed())
{
self thread SetStats(stat);
self notify("StopStats");
self.StatsEditor["Open"]=0;
wait .1;
}
wait .05;
}
}
SetStats(stat)
{
self.SubCurs destroy();
self.EditorBG destroy();
self.Stats destroy();
self.InStat=0;
self maps\mp\gametypes\_persistence::statSet(stat,int(self.StatNum));
}


How to add it to your menu:
    *Put StatsEditor as your function.
*Put "" Between the "" you can put kills, deaths, score etc...

Other than that enjoy the script Happy.



hmmm... Unkown Function ?
01-07-2012, 01:15 AM #8
Originally posted by sniipezZ View Post
hmmm... Unkown Function ?
type developer 1 in the console it will tell you Happy
01-07-2012, 01:20 AM #9
Originally posted by IELIITEMODZX View Post
type developer 1 in the console it will tell you Happy


im on PS3 Happy
01-07-2012, 01:21 AM #10
Originally posted by sniipezZ View Post
im on PS3 Happy
ahh sorry Happy do you have this CreateTextLine()

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo