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-05-2012, 07:44 PM #29
nay1995
The Master
works for me in these stat editors for waw Smile
03-10-2012, 09:47 AM #30
Okami
Known As Yukuku
Originally posted by IELIITEMODZX View Post
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


for some reason its not working i just get awaiting challenge...1.... and just stays at that :(
03-10-2012, 04:20 PM #31
Originally posted by 9412
for some reason its not working i just get awaiting challenge...1.... and just stays at that :(
thats nothing to do with the script unless you have the same function 2 times in the .gsc's.
03-10-2012, 05:39 PM #32
Okami
Known As Yukuku
Originally posted by IELIITEMODZX View Post
thats nothing to do with the script unless you have the same function 2 times in the .gsc's.


idk it only does it with the code as soon as i remove it the match loads
03-10-2012, 05:48 PM #33
have you got 2 functions named createValue() or createRectangle() because if you have thats your problem.
03-11-2012, 07:12 AM #34
Okami
Known As Yukuku
Originally posted by IELIITEMODZX View Post
have you got 2 functions named createValue() or createRectangle() because if you have thats your problem.


yea i think is there a way i can make it work should i just remove this createRectangle ? thanks
03-11-2012, 11:53 AM #35
Originally posted by 9412
yea i think is there a way i can make it work should i just remove this createRectangle ? thanks
to stop the error you will need to look in all your .gsc's and see if you have an other function named the same as the functions in my editor.
05-04-2012, 01:42 AM #36
Cool Bro This Works

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo