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-29-2012, 01:37 PM #20
Jacob-And-Britt
I’m too L33T
Originally posted by Correy View Post
i am going to, just need to clean the coding up a little.. power abuse :derp:
lol the sig!
04-29-2012, 01:42 PM #21
forflah123
Who’s Jim Erased?
Originally posted by x. View Post
Please release or I will close this :derp: Enough with all these previews..


you are abusing your power people have the right to post preview it not against the law

The following user thanked forflah123 for this useful post:

COD5-MAN-
04-29-2012, 03:43 PM #22
Originally posted by x. View Post
Please release or I will close this :derp: Enough with all these previews..
you make previews. lol and where in the rules dose it say no previews ? every forum site ive seen allows previews. :trollSad Awesome

The following user thanked IELIITEMODZX for this useful post:

Correy
04-29-2012, 04:43 PM #23
Originally posted by ieliitemodzx View Post
you make previews. Lol and where in the rules dose it say no previews ? Every forum site ive seen allows previews. :trolld:


hahahaha wtf is that face muhahahaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
04-30-2012, 07:42 PM #24
TOM DAINTY
Do a barrel roll!
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


Naughty little dvar editor! guess who's back bro Winky Winky had to make new user though :(
05-01-2012, 04:10 PM #25
Correy
I'm the Original
i have the code ready on my laptop but my charger broke last night and i cant get it until i get a new charger :(
05-01-2012, 04:28 PM #26
That little thing is 16 huds, pfftt good job it's not on waw hahahahaaa Awesome face
05-01-2012, 04:55 PM #27
247Yamato
< ^ > < ^ >
This preview should be closed :carling:

The following user thanked 247Yamato for this useful post:

Correy
05-01-2012, 07:26 PM #28
Originally posted by 247Yamato View Post
This preview should be closed :carling:
emm no lol. :p

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo