CabConModding
Facebook
Twitter
youtube
Discord
Contact us
RSS
Menu
CabConModding
Home
New
Top
Premium
Rules
FAQ - Frequently Asked Questions
Games
Fornite
Call of Duty: Black Ops 3
Clash of Clans
Grand Theft Auto 5
Apex Legends
Assassin’s Creed Origins
Forums
Premium
Latest posts
What's new
Latest posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Log in
Register
What's new
Premium
Latest posts
Menu
Log in
Register
Navigation
Install the app
Install
More options
Dark Theme
Contact us
Close Menu
Forums
Gaming
Call of Duty Classics
Call of Duty: Black Ops 2
Call of Duty: Black Ops 2 Mods and Scripts
Call of Duty: Black Ops 2 Scripts
[Release] RGB Editor + Overflow Fixed!
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Hephaestus" data-source="post: 4100" data-attributes="member: 2929"><p><span style="font-size: 15px"><p style="text-align: center">Hey all, I am new to Cabconmodding so i'm sorry if you aren't meant to release functions like this in this section, but lets get right into it.. i decided to help out the community and release a RGB editor & if you have any problems please contact me and i will try my best to help you!</p><p></span></p><p style="text-align: center">Picture:</p> <p style="text-align: center"><img src="https://gyazo.com/647b91c1f4cf1b0bb905002be804dace.gif" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p> <p style="text-align: center"></p><p></p><p>How to edit a shader colour using my RGB editor:</p><p>[code]ChangeColour()</p><p>{</p><p> self iprintln("Select A Colour For The SHADER NAME HERE");</p><p> self thread RGBEdit(SHADER HERE);//Example self.Elements["TitleBG"]</p><p>}[/code]</p><p></p><p>Function:</p><p>[code]RGBEdit( Shader )</p><p>{</p><p> self.RGBEditor = true; </p><p> //self LockMenu(); My lock menu function.</p><p> self.curs = StrTok( "R|G|B", "|" );</p><p> self.CRGB = 0;</p><p> self.Elements["Rec"] = createRectangle( "", "", 23, 90, 89, 18, (0,0,0), "white", 2, 1 ); </p><p> self.Elements["BG"] = createRectangle( "", "", 23, -30, 90, 40, (0,0,0), "white", 0, 1 ); </p><p> self.Elements["PosMark"] = createRectangle( "", "", 0, 0, 10, 4, (0.55, 0.55, 0.55), "white", 2, 1 );</p><p> self.Elements["PosBars1"] = createRectangle( "", "", 0, 38, 4, 80, (1,1,1), "white", 1, 1 );</p><p> self.Elements["MainBG"] = createRectangle( "", "", 23, 40, 90, 120, (0,0,0), "white", 0, .8 );</p><p> self.Elements["pre"] = createText("CENTER", "CENTER", "DEFAULT", 1, 23, 90, 2, 1, "PREVIEW");</p><p> RGB = "RGB";</p><p> for( i = 0;i < 3;i++ )</p><p> {</p><p> self.curs[i] = 0;</p><p> self.Markerpos[i] = 0;</p><p> self.Elements["RGBT"+i] = createText("CENTER", "CENTER", "DEFAULT", 1, (i*23)-0, -20, 2, 1, self.curs[i]);</p><p> self.Elements["RGB"+i] = createText("CENTER", "CENTER", "DEFAULT", 1, (i*23)-0, -40, 2, 1, RGB[i]);</p><p> }</p><p> self.Elements["RGB0"].color = (1,0,0);</p><p> self.Elements["RGB1"].color = (0,1,0);</p><p> self.Elements["RGB2"].color = (0,0,1);</p><p> self DoAlpha();</p><p> wait 0.25;</p><p> while( 1 )</p><p> {</p><p> if(self adsButtonPressed() || self attackButtonPressed() )</p><p> {</p><p> self.curs[self.CRGB] += self AttackButtonPressed();</p><p> self.curs[self.CRGB] -= self AdsButtonPressed();</p><p> if(self.curs[self.CRGB] > 255) </p><p> self.curs[self.CRGB] = 0;</p><p> if(self.curs[self.CRGB] < 0) </p><p> self.curs[self.CRGB] = 255;</p><p> self.Elements["Rec"].color = ((self.curs[0])/255, (self.curs[1])/255, (self.curs[2])/255 );</p><p> self.Elements["RGBT"+self.CRGB] setValue( self.curs[self.CRGB] );</p><p> </p><p> if(self AttackButtonPressed())</p><p> self.Elements["PosMark"].y += .3;</p><p> </p><p> if(self adsButtonPressed())</p><p> self.Elements["PosMark"].y -= .3;</p><p> </p><p> if(self.Elements["PosMark"].y < 0)</p><p> self.Elements["PosMark"].y = 76.3;</p><p> </p><p> if(self.Elements["PosMark"].y > 76.3)</p><p> self.Elements["PosMark"].y = 0;</p><p> </p><p> self.Markerpos[self.CRGB] = self.Elements["PosMark"].y;</p><p> }</p><p> if( self FragButtonPressed() )</p><p> {</p><p> self.CRGB += self FragButtonPressed();</p><p> if( self.CRGB > 2 )</p><p> self.CRGB = 0;</p><p> </p><p> self DoAlpha();</p><p> self.Elements["PosMark"].y = self.Markerpos[self.CRGB];</p><p> </p><p> if( self.Elements["PosMark"].x > 23 ) </p><p> self.Elements["PosMark"].x = -23; </p><p> </p><p> if( self.Elements["PosBars1"].x > 23 ) </p><p> self.Elements["PosBars1"].x = -23;</p><p> </p><p> self.Elements["PosBars1"].x += 23;</p><p> self.Elements["PosMark"].x += 23;</p><p> wait 0.2;</p><p> }</p><p> if( self MeleeButtonPressed() )</p><p> {</p><p> self CloseRGB();</p><p> //self UnlockMenu(); My unlock menu Function.</p><p> self.RGBEditor = false;</p><p> break;</p><p> }</p><p> if( self UseButtonPressed() )</p><p> {</p><p> self CloseRGB( Shader );</p><p> //self UnlockMenu(); My unlock menu Function.</p><p> self.RGBEditor = false;</p><p> break;</p><p> }</p><p> wait 0.05;</p><p> }</p><p>}</p><p>DoAlpha()</p><p>{</p><p> for( v = 0;v < 3;v++ )</p><p> {</p><p> if( v != self.CRGB ) self.Elements["RGBT"+v].alpha = 0.4;</p><p> else self.Elements["RGBT"+v].alpha = 1;</p><p> }</p><p>}</p><p>CloseRGB( Shader )</p><p>{</p><p> self.index = 0;</p><p> if( IsDefined( Shader ) ) </p><p> Shader.color = ((self.curs[0])/255, (self.curs[1])/255, (self.curs[2])/255 );</p><p> //self destroyAll(self.Elements); Just a function i use to destroy them all but you're not getting it lol.</p><p> </p><p> self.Elements["Rec"] destroy();</p><p> self.Elements["BG"] destroy();</p><p> self.Elements["PosMark"] destroy();</p><p> self.Elements["PosBars1"] destroy();</p><p> self.Elements["MainBG"] destroy();</p><p> self.Elements["pre"] destroy();</p><p>}[/code]</p><p></p><p>How to fix the overflow:</p><p>[code]if(isDefined(player.RGBEditor))</p><p>{</p><p> RGB = "RGB";</p><p> player.Elements["pre"] setSafeText("PREVIEW");</p><p> for( i = 0;i < 3;i++ )</p><p> {</p><p> player.Elements["RGBT"+i] setvalue(player.curs[i]);</p><p> player.Elements["RGB"+i] setSafeText(RGB[i]);</p><p> }</p><p>}[/code]</p></blockquote><p></p>
[QUOTE="Hephaestus, post: 4100, member: 2929"] [SIZE=4][CENTER]Hey all, I am new to Cabconmodding so i'm sorry if you aren't meant to release functions like this in this section, but lets get right into it.. i decided to help out the community and release a RGB editor & if you have any problems please contact me and i will try my best to help you![/CENTER][/SIZE] [CENTER]Picture: [IMG]https://gyazo.com/647b91c1f4cf1b0bb905002be804dace.gif[/IMG] [/CENTER] How to edit a shader colour using my RGB editor: [code]ChangeColour() { self iprintln("Select A Colour For The SHADER NAME HERE"); self thread RGBEdit(SHADER HERE);//Example self.Elements["TitleBG"] }[/code] Function: [code]RGBEdit( Shader ) { self.RGBEditor = true; //self LockMenu(); My lock menu function. self.curs = StrTok( "R|G|B", "|" ); self.CRGB = 0; self.Elements["Rec"] = createRectangle( "", "", 23, 90, 89, 18, (0,0,0), "white", 2, 1 ); self.Elements["BG"] = createRectangle( "", "", 23, -30, 90, 40, (0,0,0), "white", 0, 1 ); self.Elements["PosMark"] = createRectangle( "", "", 0, 0, 10, 4, (0.55, 0.55, 0.55), "white", 2, 1 ); self.Elements["PosBars1"] = createRectangle( "", "", 0, 38, 4, 80, (1,1,1), "white", 1, 1 ); self.Elements["MainBG"] = createRectangle( "", "", 23, 40, 90, 120, (0,0,0), "white", 0, .8 ); self.Elements["pre"] = createText("CENTER", "CENTER", "DEFAULT", 1, 23, 90, 2, 1, "PREVIEW"); RGB = "RGB"; for( i = 0;i < 3;i++ ) { self.curs[i] = 0; self.Markerpos[i] = 0; self.Elements["RGBT"+i] = createText("CENTER", "CENTER", "DEFAULT", 1, (i*23)-0, -20, 2, 1, self.curs[i]); self.Elements["RGB"+i] = createText("CENTER", "CENTER", "DEFAULT", 1, (i*23)-0, -40, 2, 1, RGB[i]); } self.Elements["RGB0"].color = (1,0,0); self.Elements["RGB1"].color = (0,1,0); self.Elements["RGB2"].color = (0,0,1); self DoAlpha(); wait 0.25; while( 1 ) { if(self adsButtonPressed() || self attackButtonPressed() ) { self.curs[self.CRGB] += self AttackButtonPressed(); self.curs[self.CRGB] -= self AdsButtonPressed(); if(self.curs[self.CRGB] > 255) self.curs[self.CRGB] = 0; if(self.curs[self.CRGB] < 0) self.curs[self.CRGB] = 255; self.Elements["Rec"].color = ((self.curs[0])/255, (self.curs[1])/255, (self.curs[2])/255 ); self.Elements["RGBT"+self.CRGB] setValue( self.curs[self.CRGB] ); if(self AttackButtonPressed()) self.Elements["PosMark"].y += .3; if(self adsButtonPressed()) self.Elements["PosMark"].y -= .3; if(self.Elements["PosMark"].y < 0) self.Elements["PosMark"].y = 76.3; if(self.Elements["PosMark"].y > 76.3) self.Elements["PosMark"].y = 0; self.Markerpos[self.CRGB] = self.Elements["PosMark"].y; } if( self FragButtonPressed() ) { self.CRGB += self FragButtonPressed(); if( self.CRGB > 2 ) self.CRGB = 0; self DoAlpha(); self.Elements["PosMark"].y = self.Markerpos[self.CRGB]; if( self.Elements["PosMark"].x > 23 ) self.Elements["PosMark"].x = -23; if( self.Elements["PosBars1"].x > 23 ) self.Elements["PosBars1"].x = -23; self.Elements["PosBars1"].x += 23; self.Elements["PosMark"].x += 23; wait 0.2; } if( self MeleeButtonPressed() ) { self CloseRGB(); //self UnlockMenu(); My unlock menu Function. self.RGBEditor = false; break; } if( self UseButtonPressed() ) { self CloseRGB( Shader ); //self UnlockMenu(); My unlock menu Function. self.RGBEditor = false; break; } wait 0.05; } } DoAlpha() { for( v = 0;v < 3;v++ ) { if( v != self.CRGB ) self.Elements["RGBT"+v].alpha = 0.4; else self.Elements["RGBT"+v].alpha = 1; } } CloseRGB( Shader ) { self.index = 0; if( IsDefined( Shader ) ) Shader.color = ((self.curs[0])/255, (self.curs[1])/255, (self.curs[2])/255 ); //self destroyAll(self.Elements); Just a function i use to destroy them all but you're not getting it lol. self.Elements["Rec"] destroy(); self.Elements["BG"] destroy(); self.Elements["PosMark"] destroy(); self.Elements["PosBars1"] destroy(); self.Elements["MainBG"] destroy(); self.Elements["pre"] destroy(); }[/code] How to fix the overflow: [code]if(isDefined(player.RGBEditor)) { RGB = "RGB"; player.Elements["pre"] setSafeText("PREVIEW"); for( i = 0;i < 3;i++ ) { player.Elements["RGBT"+i] setvalue(player.curs[i]); player.Elements["RGB"+i] setSafeText(RGB[i]); } }[/code] [/QUOTE]
Verification
Post reply
Forums
Gaming
Call of Duty Classics
Call of Duty: Black Ops 2
Call of Duty: Black Ops 2 Mods and Scripts
Call of Duty: Black Ops 2 Scripts
[Release] RGB Editor + Overflow Fixed!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top