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();
}
(adsbygoogle = window.adsbygoogle || []).push({});

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-24-2012, 08:45 PM #47
Murt
< ^ > < ^ >
Originally posted by IELIITEMODZX View Post
stare the only mod ive seen like this is on daft vaders menu.


true but on cod5 it want released trust me
01-24-2012, 08:54 PM #48
Originally posted by Badman.
You must login or register to view this content.
God posted it, you should use it.

Also maybe you should stop 'ranting', not very good for you health.


But ranting makes me happy :yuno:
01-24-2012, 09:06 PM #49
Originally posted by Badman.
I don't see how having a 'lesson' changes anything, you know the GSC file language syntax don't you?


Stating an opinion on something that is not about you I think is judgement, I know what you mean though "A judgement on opinion"? :p


What does it matter how I structure my patch for a stupid old game? I didn't realise I was entering a syntax competition..

If you are so obsessed with programming syntax/structure etc. why don't you go on a coding forum instead? You've already said that you don't do any gsc anyway...

Here try this one looks suitably boring : You must login or register to view this content.

The following user groaned x_DaftVader_x for this awful post:

Woof
01-24-2012, 09:38 PM #50
Correy
I'm the Original
Originally posted by x. View Post
What does it matter how I structure my patch for a stupid old game? I didn't realise I was entering a syntax competition..

If you are so obsessed with programming syntax/structure etc. why don't you go on a coding forum instead? You've already said that you don't do any gsc anyway...

Here try this one looks suitably boring : You must login or register to view this content.


like my self and overs, i try to make my code as neat as possible.
01-24-2012, 09:45 PM #51
Originally posted by Badman.
Why are you having a go at me, I don't care about your scripts or how they are laid out... why would I?
I think the 'structure' of the script is irrele-vant to the syntax anyway.
As for the last comment referring me to another site, I just find that pretty rude.
hahaha, it wasn't rude, it was an observation. I think you have risen above us scumbag coders on here. You're better than that now :lol:

---------- Post added at 09:45 PM ---------- Previous post was at 09:41 PM ----------

Originally posted by Correy View Post
like my self and overs, i try to make my code as neat as possible.

Good for you. I really don't care how neat it is, I'm not taking an exam.

I tidy them up with You must login or register to view this content. when I post them, but what's in my patch can be as messy as I like. It really makes no difference to me :dumb:
01-24-2012, 09:50 PM #52
Karoolus
I'm the W@W Menu Guy !
Originally posted by x. View Post
but what's in my patch can be as messy as I like.


true, if i open up your patch, i have a harder time reading the scripts + there's bits & pieces everywhere, but that makes it fun to read Happy
"where tha fug is that function........" :carling:
01-24-2012, 09:53 PM #53
Correy
I'm the Original
Originally posted by x. View Post
hahaha, it wasn't rude, it was an observation. I think you have risen above us scumbag coders on here. You're better than that now :lol:

---------- Post added at 09:45 PM ---------- Previous post was at 09:41 PM ----------


Good for you. I really don't care how neat it is, I'm not taking an exam.

I tidy them up with You must login or register to view this content. when I post them, but what's in my patch can be as messy as I like. It really makes no difference to me :dumb:


i love how you say scum bag coders, everyone is just trying to contributing & help others.. you weren't the best when you started where you?
you even mentioned how EliteMossy told you what a variable is, come on vader.. yeah you might be on of the best in this section, but like i said.. no one starts of the best, you just gotta give them time and give them a chance.. thats what no-one understands in this section.
01-27-2012, 02:29 PM #54
I would love to add these to my menu but any dvar I add i get a unrealistic variable and i haven't taken the time to look in the coding do you know why this is?
01-27-2012, 03:06 PM #55
Originally posted by FanGirl View Post
I would love to add these to my menu but any dvar I add i get a unrealistic variable and i haven't taken the time to look in the coding do you know why this is?
no thats a new error to me lolz :/

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo