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, 02:13 AM #11
iReset Nigga
2Fresshh!!
Originally posted by IELIITEMODZX View Post
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(s tatValue));
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 = level.max - num;

return val;
}
minusNum(val, num)
{
if(num - val > num && num < 0)
val = level.max + 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


u said it wasnt possible u damn whore y u no tell me truth Happy
02-04-2012, 12:59 PM #12
nay1995
The Master
Originally posted by IELIITEMODZX View Post
yeah i was thinking you leaked it BITCH!! :p


unsure why but looks like i need to tweak for cod5, i get bad syntax :/
02-04-2012, 03:43 PM #13
Originally posted by nay View Post
unsure why but looks like i need to tweak for cod5, i get bad syntax :/


no they will work fine for cod5

edit: just found the errors with the script. fixed now
02-04-2012, 04:13 PM #14
Originally posted by badman827
aww


what the point in this post?
02-04-2012, 05:08 PM #15
xRaW
xI2aW-
Originally posted by IELIITEMODZX View Post
no they will work fine for cod5

edit: just found the errors with the script. fixed now


hey dont suppose you could help. Im using this for W@W but i got one problem. Because to open my menu i have to press R2 (fragbuttonpressed) but that is to open my menu. How could i make it to think that the menu is open when its not or either to just not open the menu at all. I tried to mess around with the if functions but couldnt get it to work.
02-04-2012, 05:31 PM #16
Originally posted by xRaW View Post
hey dont suppose you could help. Im using this for W@W but i got one problem. Because to open my menu i have to press R2 (fragbuttonpressed) but that is to open my menu. How could i make it to think that the menu is open when its not or either to just not open the menu at all. I tried to mess around with the if functions but couldnt get it to work.


add a lock menu function to your menu
02-04-2012, 05:47 PM #17
xRaW
xI2aW-
Originally posted by IELIITEMODZX View Post
add a lock menu function to your menu
Gimme an example. Its not like i am an amazing coder. I dont deal with menus and such i just make simple stuff nothing special, stuff that just is different.
02-04-2012, 06:07 PM #18
Originally posted by xRaW View Post
Gimme an example. Its not like i am an amazing coder. I dont deal with menus and such i just make simple stuff nothing special, stuff that just is different.
well add somthing like this into your open menu

if(self fragButtonPressed() && !self.lockMenu)

somthing like that then set self.lockMenu = true; so you cant open the menu
02-04-2012, 07:31 PM #19
xRaW
xI2aW-
Originally posted by IELIITEMODZX View Post
well add somthing like this into your open menu

if(self fragButtonPressed() && !self.lockMenu)

somthing like that then set self.lockMenu = true; so you cant open the menu
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

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo