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-27-2012, 04:13 PM #56
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?


hahahhaaaaa unrealistic variable hhaha pmfsl!!!!
01-27-2012, 04:15 PM #57
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by Badman.
Maybe it's something to do with storing the data into the variable with a invalid data type?
idk. :p

---------- Post added at 10:55 AM ---------- Previous post was at 10:50 AM ----------

Like I have said times before I do not know too much about GSC file language but here is what I think could be giving the error.

setDvar( dvar, curs );
I am pretty sure you need to define what to set the dvar to?
-or does it automaticly set it to self if non is defined?

Just trying to help. :p


I believe with Jump height and Sprint speed etc you do not need to use an entity, just use setDvar( dvar, value ); Smile.
01-27-2012, 04:30 PM #58
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by Badman.
I see, well maybe the person is trying to set a player dvar? :p


Most probably but i don't think setting a player dvar with jump and speed dvars, will effect the game? But i dunno not tested it like that not even looked at the coding of the editor.
01-27-2012, 04:37 PM #59
Karoolus
I'm the W@W Menu Guy !
Originally posted by Badman.
Maybe it's something to do with storing the data into the variable with a invalid data type?
idk. :p

---------- Post added at 10:55 AM ---------- Previous post was at 10:50 AM ----------

Like I have said times before I do not know too much about GSC file language but here is what I think could be giving the error.

setDvar( dvar, curs );
I am pretty sure you need to define what to set the dvar to?
-or does it automaticly set it to self if non is defined?

Just trying to help. :p


setdvar() sets a dvar for the level, iow the server..
if you want to set a dvar to a certain player, you use setClientDvar()

Originally posted by IVI40A3Fusionz View Post
I believe with Jump height and Sprint speed etc you do not need to use an entity, just use setDvar( dvar, value ); Smile.

Originally posted by IVI40A3Fusionz View Post
Most probably but i don't think setting a player dvar with jump and speed dvars, will effect the game? But i dunno not tested it like that not even looked at the coding of the editor.


if you set jump_height, g_speed etc to host, it'll affect the entire server.. color infections etc will NOT affect everyone when set to host.. server dvars WILL

if you set dvars like these for anyone BUT the host, it'll make them move weird (only on their screen though)
jump_height for example will make you jump up real high, but you get sucked down again, cause your jump_height en server jump_height don't match Winky Winky
01-27-2012, 04:38 PM #60
Correy
I'm the Original
Originally posted by IVI40A3Fusionz View Post
I believe with Jump height and Sprint speed etc you do not need to use an entity, just use setDvar( dvar, value ); Smile.


entity :confused:
~ you mean a int and you don't.. you can have ..
    
self setClientDvar( "jump_height", "999" );
01-27-2012, 04:41 PM #61
Karoolus
I'm the W@W Menu Guy !
Originally posted by Correy View Post
entity :confused:
~ you mean a int and you don't.. you can have ..
    
self setClientDvar( "jump_height", "999" );


no he actually means an entity to set the dvar for Winky Winky
01-27-2012, 04:50 PM #62
Originally posted by IELIITEMODZX View Post
no thats a new error to me lolz :/


Never mind I fixed it just need to have the max as 999 I was just using 500 for my private menu lulz
This is awesome but needs some revising for dvars like physical_gravity witch can go to -1000 and up to I think off the top of my head 2000 But really nice work
01-27-2012, 04:55 PM #63
Originally posted by FanGirl View Post
Never mind I fixed it just need to have the max as 999 I was just using 500 for my private menu lulz
This is awesome but needs some revising for dvars like physical_gravity witch can go to -1000 and up to I think off the top of my head 2000 But really nice work


yeah this was made for dvars 0 and over :p
01-27-2012, 05:21 PM #64
Correy
I'm the Original
Originally posted by Karoolus View Post
no he actually means an entity to set the dvar for Winky Winky


oh haha, my bad :p

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo