GSC [Release] Illuison V1 Dvar Editor!

Messages
95
Points
18
Hello cabcon community I am just releasing my dvar editor I used in illusion v1 I hope you enjoy using it.



The function is self explanatory you just need to know the basics of gsc.
Function:
EditDvar(Dvar)
{
self exitMenu();
self disableWeapons();
self freezeControls( true );
self setBlur(4, .4);
wait 0.2;
if(Dvar == "cg_fov")
{
Max = 125;//125 150
Value = 65;
Increment = 5;//5
Min = 65;
Move = 20.8;//20.8 14.7
}
else if(Dvar == "perk_weapRateMultiplier" || Dvar == "perk_weapReloadMultiplier")
{
Max = 1;
Value = 0.01;
Increment = 0.03;//0.03
Min = 0.01;
Move = 7.6;
}
else
{
Max = 1000;
Value = 0;
Increment = 20;//20
Min = 0;
Move = 5;
}
self.DvarChange = self createText("default",1.8,self);
self.DvarChange setpoint("CENTER","CENTER",0,70);
self.DvarChange settext("Edit Dvar: "+Dvar+"");
self.DvarValue = self createText("default",1.7,self);
self.DvarValue setpoint("CENTER","CENTER",0,35);
self.DvarValue settext("Dvar Value: "+Value+"");
self.DvarBG = self createRectangleFOV("CENTER","CENTER",0,0,2000,2000,(0,0,0),-999,0.7,"white");
self.DvarBar = self createRectangleFOV("CENTER","CENTER",-125,-20,14,26,(1, 0, 0),4,1,"white");
self.DvarSlider = self createRectangleFOV("CENTER","CENTER",0,-20,274,18,(255,255,255),3,1,"white");
wait 0.3;
self endon("DvarEdit_Over");
for(;:wink:
{
wait 0.001;
self.DvarValue settext("Dvar Value: "+Value+"");
if(Dvar == "cg_fov")
//setDvar("cg_fov",Value);//edit setclientfov setDvar
self setclientfov(Value);
if(self MeleeButtonPressed())
{
self thread DvarDone("Melee",Dvar);
wait 1;
}
else if(self AdsButtonPressed() && Value == Min)
{
wait 0.001;
self.DvarBar.x = self.DvarBar.x + 250;//250
value = Max;
}
else if(self AttackButtonPressed() && Value == Max)
{
wait 0.001;
self.DvarBar.x = self.DvarBar.x - 250;//250
value = Min;
}
else if(self AttackButtonPressed() && Value < Max)
{
wait 0.001;
self.DvarBar.x = self.DvarBar.x + Move;
value = value + increment;
}
else if(self AdsButtonPressed() && Value > Min)
{
wait 0.001;
self.DvarBar.x = self.DvarBar.x - Move;
value = value - increment;
}
else if(self UseButtonPressed())
{
self thread DvarDone("Else",Dvar,Value);
wait 1;
}
}
}
DvarDone(Obj, Dvar, Value)
{
self.DvarBG Destroy();
self.DvarBar Destroy();
self.DvarSlider Destroy();
self.DvarChange Destroy();
self.DvarValue Destroy();
self enableWeapons();
self freezeControls( false );
self setBlur(0, .4);
self notify("DvarEdit_Over");
if(self MeleeButtonPressed())
{
self iPrintln(""+Dvar+" Set To: "+Value+"");
wait .1;
}
}

I strongly recommend using the createRectangle you are already using in your menu base but you can have the one I used either way.
Spawn Hud Function:
createRectangle(align,relative,x,y,width,height,color,sort,alpha,shader)
{
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);
return barElemBG;
}

Thanks
~ Extinct
 
Last edited:

God

Skiddy
Messages
342
Points
243
Nice release, a lot better than just using a toggle in a menu
 
Messages
79
Points
8
SetZombieSpawnDelay(i) //0.08 Def
{
set_zombie_var("zombie_spawn_delay", i);
level.zombie_spawn_delay = i;
level.zombie_vars["zombie_spawn_delay"] = i;
self iprintln("Zombie Spawn Delay Set To ^2" + i);
}

How can i edit this with this Dvar editor? (Sorry i'm new in GSC)
 

LGK_Reversal

New Member
Messages
6
Points
3
Is there anyway a dvar can be set just for you? Like Rapid Fire in zombies for example... I sets for all when everyone has double tap. Is there a way where a dvar can be only set for you? Any help would be highly appreciated.
 

candy

G59 Terrorist
Staff member
Donator
Messages
1,304
Points
548
Is there anyway a dvar can be set just for you? Like Rapid Fire in zombies for example... I sets for all when everyone has double tap. Is there a way where a dvar can be only set for you? Any help would be highly appreciated.
No point in bumping a 2 year old thread, just make a new question thread here.
Call of Duty: Black Ops 2 Scripts Questions | CabConModding

But, probably not. Especially for that dvar. Just make a loop and do magicbullet for each time you fire your weapon.
 
Top