Post: [RELEASE] Stat Editors [No Overflow]
02-03-2012, 10:12 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); edit: Fixed the script now.


thanks to corey for the vid


thread this:
    self thread statEditor(<stat you want to edit here>Winky Winky;



put this is the .gsc:
    statEditor(Stat)
{
//add your close menu function here.
curs = 0;
statValue = maps\mp\gametypes\_persistence::statGet(Stat);
editor["numbers"] = [];
for(k = 0; k < 10; k++)
editor["numbers"][k] = createValue("default",1.9,"","",((-1)*((10/2)*22.5)+(k*25)),100,1,200,0);

editor["scroll"] = createRectangle("","",editor["numbers"][curs].x,editor["numbers"][curs].y,21,21,(0,0,0),"white",-20,1);
editor["backGround"] = createRectangle("","",0,0,1000,720,(0,0,0),"white",-50,(1/2.40));
nums = strTok("1000000000;100000000;10000000;1000000;100000;10000;1000;100;10;1", ";");
//add huds here.
wait 0.2;
for(;Winky Winky
{
self freezeControls(true);
statTemp = statValue + "";
for(k = 0; k < editor["numbers"].size; k++)
{
if(isDefined(statTemp[statTemp.size-(10-k)]))
editor["numbers"][k] setValue(int(statTemp[statTemp.size-(10-k)]));
else
editor["numbers"][k] setValue(0);
}
wait .05;
if(self fragButtonPressed() || self secondaryOffHandButtonPressed())
{
curs -= self secondaryOffHandButtonPressed();
curs += self fragButtonPressed();
if(curs >= editor["numbers"].size)
curs = 0;

if(curs < 0)
curs = editor["numbers"].size-1;

editor["scroll"] setPoint("","",editor["numbers"][curs].x,editor["numbers"][curs].y);
wait .1;
}
if(self adsButtonPressed() || self attackButtonPressed())
{
for(k = 0; k < 10; k++)
{
if(curs == k && self attackButtonPressed())
statValue += plusNum(int(nums[k]), statValue);
if(curs == k && self adsButtonPressed())
statValue -= minusNum(int(nums[k]), statValue);
}
if(statValue <= 0)
statValue = 0;

if(statValue >= 2147483647)
statValue = 2147483647;

wait .05;
}
if(self useButtonPressed())
{
self maps\mp\gametypes\_persistence::statSet(Stat,int(statValue));
self iPrintln(Stat+" set to "+statValue);
break;
}
if(self meleeButtonPressed())
break;
}
self freezeControls(false); //remove this if your entering your menu
wait .2;
keys = getArrayKeys(editor);
for(k = 0; k < keys.size; k++)
if(isDefined(editor[keys[k]][0]))
for(r = 0; r < editor[keys[k]].size; r++)
editor[keys[k]][r] destroy();
else
editor[keys[k]] destroy();
}
plusNum(val, num)
{
if(num + val < num && num > 0)
val = 2147483647 - num;

return val;
}
minusNum(val, num)
{
if(num - val > num && num < 0)
val = 2147483647 + num;

return val;
}



you need these again Happy
    createValue(Font, Fontscale, Align, Relative, X, Y, Alpha, Sort, Value)
{
HudValue = createFontString(Font, Fontscale, self);
HudValue setPoint(Align, Relative, X, Y);
HudValue.alpha = Alpha;
HudValue.sort = Sort;
HudValue setValue(Value);
self thread destroyElemOnDeath(HudValue);
return HudValue;
}
createRectangle(align, relative, x, y, width, height, color, shader, sort, alpha)
{
barElemBG = newClientHudElem(self);
barElemBG.elemType = "bar";
barElemBG.width = width;
barElemBG.height = height;
barElemBG.align = align;
barElemBG.relative = relative;
barElemBG.xOffset = 0;
barElemBG.yOffset = 0;
barElemBG.children = [];
barElemBG.sort = sort;
barElemBG.color = color;
barElemBG.alpha = alpha;
barElemBG setParent(level.uiParent);
barElemBG setShader(shader, width, height);
barElemBG.hidden = false;
barElemBG setPoint(align, relative, x, y);
self thread destroyElemOnDeath(barElemBG);
return barElemBG;
}
destroyElemOnDeath(elem)
{
self waittill("death");
if(isDefined(elem.bar))
elem destroyElem();
else
elem destroy();
}


credits
Originally posted by another user
craigChrist
Mikeeey
(adsbygoogle = window.adsbygoogle || []).push({});

The following 12 users say thank you to IELIITEMODZX for this useful post:

1337HaXaLoT, aerosoul94, Choco, Correy, EpiiiCxDGx, forflah123, Harry, iPROFamily, x_DaftVader_x, xMrCheatVisionx, xRaW
02-04-2012, 07:35 PM #20
Originally posted by xRaW View Post
right i did what you said but it didnt quite work. heres what ive done

if(self fragButtonPressed() || self secondaryOffHandButtonPressed())
{
curs -= self secondaryOffHandButtonPressed();
curs += self fragButtonPressed();
self.lockmenu = true;

and my menu

if(self FragButtonPressed() && !self.lockMenu)
{
self notify("Pressed_R2");
wait .3;
}

but the menu still opens



if(self fragButtonPressed() || self secondaryOffHandButtonPressed())
{
curs -= self secondaryOffHandButtonPressed();
curs += self fragButtonPressed();
self.lockMenu = true;

and my menu

if(self FragButtonPressed() && !self.lockMenu)
{
self notify("Pressed_R2");
wait .3;
}
try that
02-04-2012, 07:41 PM #21
xRaW
xI2aW-
Originally posted by IELIITEMODZX View Post
if(self fragButtonPressed() || self secondaryOffHandButtonPressed())
{
curs -= self secondaryOffHandButtonPressed();
curs += self fragButtonPressed();
self.lockMenu = true;

and my menu

if(self FragButtonPressed() && !self.lockMenu)
{
self notify("Pressed_R2");
wait .3;
}
try that


what? you didnt change nothing at all. thats exactly what i had. Lemme show you your code.

You must login or register to view this content. and you already got my menu code for fragbuttonpressed
02-04-2012, 07:43 PM #22
Originally posted by xRaW View Post
what? you didnt change nothing at all. thats exactly what i had. Lemme show you your code.

You must login or register to view this content. and you already got my menu code for fragbuttonpressed
well add me on skype and later ill make a closeAndLockMenu() function
02-05-2012, 08:22 AM #23
nay1995
The Master
cheers you save me a job Smile

---------- Post added at 03:22 AM ---------- Previous post was at 03:19 AM ----------

Originally posted by xRaW View Post
right i did what you said but it didnt quite work. heres what ive done

if(self fragButtonPressed() || self secondaryOffHandButtonPressed())
{
curs -= self secondaryOffHandButtonPressed();
curs += self fragButtonPressed();
self.lockmenu = true;

and my menu

if(self FragButtonPressed() && !self.lockMenu)
{
self notify("Pressed_R2");
wait .3;
}

but the menu still opens




just put self endon("endthemenu"); atthe start of your menu, then on the editor self notify("endthemenu"); and that will do the trick also thread your menu when you leave the stat editor Smile
02-05-2012, 10:58 AM #24
xRaW
xI2aW-
Originally posted by nay View Post
cheers you save me a job Smile

---------- Post added at 03:22 AM ---------- Previous post was at 03:19 AM ----------





just put self endon("endthemenu"); atthe start of your menu, then on the editor self notify("endthemenu"); and that will do the trick also thread your menu when you leave the stat editor Smile


that probably wont work but ill give it a try
02-05-2012, 04:53 PM #25
nay1995
The Master
Originally posted by xRaW View Post
that probably wont work but ill give it a try


course i works thats what i do. Smile
02-05-2012, 05:01 PM #26
xRaW
xI2aW-
Originally posted by nay View Post
course i works thats what i do. Smile


didnt work for me, i got it to work elites way. making the notify menu_exit doesnt do **** all :p
02-05-2012, 05:03 PM #27
nay1995
The Master
yes it does you notify then endon its in the name "end" on soon as you notify the endon everything that was thread gets deleted/removed until threaded again.
02-05-2012, 07:38 PM #28
xRaW
xI2aW-
Originally posted by nay View Post
yes it does you notify then endon its in the name "end" on soon as you notify the endon everything that was thread gets deleted/removed until threaded again.


i know how it works. i use self endon and notify to stop a lot of stuf. e.g. flashing menu ect. But for this one thing it wont work as the menu doesnt just call from that it has many other stuff.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo