Post: [UI] - New Dvar Editor
04-28-2012, 07:21 PM #1
Correy
I'm the Original
(adsbygoogle = window.adsbygoogle || []).push({}); before you guys say, i know there's a few of these made but i haven't even looked at modding in a few months so im just bringing something back.
it's not a scroller, like the rest.. i tried to focus more on the design of the editor.

Note: this is coded to be like a menu, so using god mode will toggle on and off just like the dvar value changes.

here's a video of it..


here's the release, sorry for the wait.
    
DvarMenu( names, list )
{
self endon( "death" );
amount = [];
text = []; Value = [];
DvarName = strTok( names, "|" );
DvarList = strTok( list, "|" );
for( i = 0; i < DvarName.size; i++ )
{
Element[0] = CreateShader( "TOPLEFT", "TOPLEFT", 50, 100+26*i, 200, 25, (0,0,0), "white", 100, 1 );
Element[1] = CreateShader( "TOPLEFT", "TOPLEFT", 251, 100+26*i, 50, 25, (0,0,0), "white", 100, 1 );

amount[i] = getDvarInt( DvarList[i] );
text[i] = self CreateFontString( "defualt", 2 );
text[i] SetPoint( "TOPLEFT", "TOPLEFT", 60, 98+26*i );
text[i] SetText( DvarName[i] );
text[i].alpha = .75;
text[i].sort = 1000;
Value[i] = self CreateFontString( "defualt", 2 );
Value[i] SetPoint( "TOPLEFT", "TOPLEFT", 260, 98+26*i );
Value[i] setValue( amount[i] );
Value[i].alpha = .75;
Value[i].sort = 1000;
}
for( curs = 0;; )
{
for( i=0; i<text.size; i++ ){
text[i].alpha = .75;
value[i].alpha = .75;
self setClientDvar( DvarList[i], amount[i] );
}
text[curs].alpha = 1;
Value[curs].alpha = 1;
curs += self FragButtonPressed();
curs -= self SecondaryOffHandButtonPressed();
amount[curs] += self AttackButtonPressed()*9;
amount[curs] -= self AdsButtonPressed()*9;
Value[curs] setValue( amount[curs] );
if( curs < 0 ) curs = text.size -1;
if( curs > text.size -1 ) curs = 0;
if( amount[curs] < 0 ) amount[curs] = 999;
if( amount[curs] > 999 ) amount[curs] = 0;
wait .1;
}
}


you will also need the create shader function, if you don't already have it.

    
CreateShader(align, relative, x, y, width, height, color, shader, sort, alpha)
{
Element = newClientHudElem(self);
Element.elemType = "bar";
Element.width = width;
Element.height = height;
Element.align = align;
Element.relative = relative;
Element.children = [];
Element.sort = sort;
Element.color = color;
Element.alpha = alpha;
Element setParent(level.uiParent);
Element setShader(shader, width, height);
Element.hidden = false;
Element setPoint(align, relative, x, y);
return Element;
}



how to use it:
add you're dvars and dvar names like this, make sure you put them in the same order. here's an example.
    
self thread DvarMenu( "Jump Height|Ground Speed|Gravity|Friction", "jump_height|g_speed|g_gravity|friction" );



This will also not overflow Smile
Last edited by Correy ; 05-15-2012 at 09:29 AM.

The following 10 users say thank you to Correy for this useful post:

Amanda, COD5-MAN-, Det0x, Jacob-And-Britt, JakeModz, Jeremy, Kush Friendly, Taylor, xMrSuperMoDzZ--
04-28-2012, 10:48 PM #11
Originally posted by Correy View Post
this is just sort of a come back release
:/ i dont see it released lol all i see is a video Winky Winky.
and same Happy i just started coding again. "only to finish some scripts/menu i left un-completed".

---------- Post added at 11:48 PM ---------- Previous post was at 11:46 PM ----------

Originally posted by nZxMikeeeyx View Post
What's the friction dvar do?
slide around like your on ice lol.
04-28-2012, 10:54 PM #12
Correy
I'm the Original
Originally posted by IELIITEMODZX View Post
:/ i dont see it released lol all i see is a video Winky Winky.


i know but that will get released soon Smile
04-28-2012, 11:17 PM #13
Yay, another dvar editor. Just what we needed stare
04-29-2012, 02:15 AM #14
really good job,release it Gaspink:
04-29-2012, 04:57 AM #15
Jacob-And-Britt
I’m too L33T
Originally posted by Correy View Post
before you guys say, i know there's a few of these made but i haven't even looked at modding in a few months so im just bringing something back.
it's not a scroller, like the rest.. i tried to focus more on the design of the editor.

Note: this is coded to be like a menu, so using god mode will toggle on and off just like the dvar value changes.

here's a video of it..


i'll release upon request.
This will also not overflow Smile
I love the look of it. Great job! Smile
04-29-2012, 08:16 AM #16
247Yamato
< ^ > < ^ >
I dont like the look of it, :( . I find it ugly.
04-29-2012, 10:53 AM #17
Originally posted by Correy View Post


i'll release upon request.
Please release or I will close this :derp: Enough with all these previews..
04-29-2012, 10:55 AM #18
Correy
I'm the Original
Originally posted by x. View Post
Please release or I will close this :derp: Enough with all these previews..


i am going to, just need to clean the coding up a little.. power abuse :derp:
04-29-2012, 11:00 AM #19
Originally posted by Correy View Post
i am going to, just need to clean the coding up a little.. power abuse :derp:



New rules...

You have until tomorrow night Awesome face

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo