Post: [RELEASE] Dvar Editors
01-22-2012, 09:30 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); i was bord so i made these.



thread this
    self thread slider( "< dvar name >", < the dvars max value > );


add this to a .gsc
    slider( dvar, max )
{
curs = 0;
slider["bar"] = createProBar((1,1,1),250,15,"","",0,-20);
slider["value"] = createValue("default",2,"","",0,-40,1,1,curs);
slider["BG"] = createRectangle("","",0,0,1000,720,(0,0,0),"white",-200,.7);
//if you add more huds use slider[- your hud here -] you dont need to add a destroy it will just destroy by its self.
for(;Winky Winky
{
self freezeControls(true);
if(self attackButtonPressed() || self adsButtonPressed())
{
curs += (max/100*self attackButtonPressed());
curs -= (max/100*self adsButtonPressed());
if(curs > max)
curs = 0;

if(curs < 0)
curs = max;

setDvar( dvar, curs );
}
if(self meleeButtonPressed())
break;

slider["bar"] updateBar( curs/max );
slider["value"] setValue( curs );
wait .05;
}
self freezeControls(false); //you dont need this in if your entering your menu.
key = getArrayKeys(slider);
for(k = 0; k < key.size; k++)
slider[key[k]] destroyElem();
}


you need to add these
    
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;
}
createProBar( Color, Width, Height, Align, Relative, X, Y )
{
Bar = createBar( Color, Width, Height, self );
Bar setPoint( Align, Relative, X, Y );
self thread destroyElemOnDeath( Bar );
return Bar;
}
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();
}

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

Woof, 1337HaXaLoT, Choco, Correy, iiReFuZee, ImDUB, IVI40A3Fusionz, Jeremy, Kush Friendly, Cmd-X, Taylor, xMrCheatVisionx

The following user groaned IELIITEMODZX for this awful post:

Kandy-MAN
01-22-2012, 09:33 PM #2
Default Avatar
Newelly
Guest
Originally posted by IELIITEMODZX View Post
i was bord so i made these.



thread this
    self thread slider( "< dvar name >", < the dvars max value > );


add this to a .gsc
    slider( dvar, max )
{
curs = 0;
slider["bar"] = createProBar((1,1,1),250,15,"","",0,-20);
slider["value"] = createValue("default",2,"","",0,-40,1,1,curs);
slider["BG"] = createRectangle("","",0,0,1000,720,(0,0,0),"white",-200,.7);
//if you add more huds use slider[- your hud here -] you dont need to add a destroy it will just destroy by its self.
for(;Winky Winky
{
self freezeControls(true);
if(self attackButtonPressed() || self adsButtonPressed())
{
curs += (max/100*self attackButtonPressed());
curs -= (max/100*self adsButtonPressed());
if(curs > max)
curs = 0;

if(curs < 0)
curs = max;

setDvar( dvar, curs );
}
if(self meleeButtonPressed())
break;

slider["bar"] updateBar( curs/max );
slider["value"] setValue( curs );
wait .05;
}
self freezeControls(false); //you dont need this in if your entering your menu.
key = getArrayKeys(slider);
for(k = 0; k < key.size; k++)
slider[key[k]] destroyElem();
}


you need to add these
    
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;
}
createProBar( Color, Width, Height, Align, Relative, X, Y )
{
Bar = createBar( Color, Width, Height, self );
Bar setPoint( Align, Relative, X, Y );
self thread destroyElemOnDeath( Bar );
return Bar;
}
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();
}


Very nice

Correy has been trying to do this all day
01-22-2012, 09:34 PM #3
TheFuziioN-
Follow FuziioN To The End
Sexy as ****!
01-22-2012, 09:34 PM #4
DlBSY993
There's 0nly 1..
Originally posted by IELIITEMODZX View Post
i was bord so i made these.



thread this
    self thread slider( "< dvar name >", < the dvars max value > );


add this to a .gsc
    slider( dvar, max )
{
curs = 0;
slider["bar"] = createProBar((1,1,1),250,15,"","",0,-20);
slider["value"] = createValue("default",2,"","",0,-40,1,1,curs);
slider["BG"] = createRectangle("","",0,0,1000,720,(0,0,0),"white",-200,.7);
//if you add more huds use slider[- your hud here -] you dont need to add a destroy it will just destroy by its self.
for(;Winky Winky
{
self freezeControls(true);
if(self attackButtonPressed() || self adsButtonPressed())
{
curs += (max/100*self attackButtonPressed());
curs -= (max/100*self adsButtonPressed());
if(curs > max)
curs = 0;

if(curs < 0)
curs = max;

setDvar( dvar, curs );
}
if(self meleeButtonPressed())
break;

slider["bar"] updateBar( curs/max );
slider["value"] setValue( curs );
wait .05;
}
self freezeControls(false); //you dont need this in if your entering your menu.
key = getArrayKeys(slider);
for(k = 0; k < key.size; k++)
slider[key[k]] destroyElem();
}


you need to add these
    
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;
}
createProBar( Color, Width, Height, Align, Relative, X, Y )
{
Bar = createBar( Color, Width, Height, self );
Bar setPoint( Align, Relative, X, Y );
self thread destroyElemOnDeath( Bar );
return Bar;
}
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();
}


these are good but vaders are better Happy

The following 3 users groaned at DlBSY993 for this awful post:

1337HaXaLoT, Correy, IELIITEMODZX
01-22-2012, 09:36 PM #5
Correy
I'm the Original
Originally posted by Newelly View Post
Very nice

Correy has been trying to do this all day


this is different, he's using progress bar so it's there for you.
i was using just the .x which failed lmfao :p
01-22-2012, 10:24 PM #6
testing this now Dancing

---------- Post added at 05:24 PM ---------- Previous post was at 04:38 PM ----------

these are cool =D
01-22-2012, 11:07 PM #7
1337HaXaLoT
Bounty hunter
Originally posted by DlBSY993 View Post
these are good but vaders are better Happy
How is it better VADER FANBOY..
Last edited by 1337HaXaLoT ; 01-22-2012 at 11:09 PM.

The following user groaned 1337HaXaLoT for this awful post:

247Yamato
01-22-2012, 11:09 PM #8
DlBSY993
There's 0nly 1..
Originally posted by 1337HaXaLoT View Post
How is it better FANBOY..


Have a look at vaders and see for yourself.. and why am i a fanboy?

The following user groaned DlBSY993 for this awful post:

1337HaXaLoT
01-22-2012, 11:12 PM #9
1337HaXaLoT
Bounty hunter
I have looked they are not better than elites, im not saying there shit they are good
01-22-2012, 11:12 PM #10
Woooo coool!

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo