Post: rainbow score (release)
06-03-2011, 09:29 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Its not really much of a release...lol but i was proud of myself that i made it.

Rainbow()
{
self endon("disconnect");
self endon("death");
self endon ( "Stop_Disco_Score" );
Value="7 0 7 7;6 5 8 8;6 5 0 0;0 1 0 1;0 2 2 0;0 0 2 2;9 0 0 0";
Values=strTok(value,";");
i=0;
for (;Winky Winky
{
self setClientDvar("cg_scoresColor_Zombie",Values);
self setClientDvar("cg_scoresColor_Player_0",Values);
self setClientDvar("cg_scoresColor_Player_1",Values);
self setClientDvar("cg_scoresColor_Player_2",Values);
self setClientDvar("cg_scoresColor_Player_3",Values);
self setClientDvar("cg_scoresColor_gamertag_0",Values);
self setClientDvar("cg_scoresColor_gamertag_1",Values);
self setClientDvar("cg_scoresColor_gamertag_2",Values);
self setClientDvar("cg_scoresColor_gamertag_3",Values);
i++;
if(i==Values.size)i=0;
wait.15;
}
}

and put this in every other color setting
self notify("Stop_Disco_Score");

CREDS TO KAROOLUS (again)

You must login or register to view this content.
(adsbygoogle = window.adsbygoogle || []).push({});

The following 2 users say thank you to TheCodKittenz for this useful post:

lovebros, TheRock_
06-04-2011, 01:40 AM #2
.Kane.
Banned
Originally posted by TheCodKittenz View Post
Its not really much of a release...lol but i was proud of myself that i made it. it DOES have 1 MINOR glitch right now.(help appreciated) where once you turn it on you cant change it to any other colors.

Rainbow()
{
self endon ( "disconnect" );
self endon ( "death" );
while(1)
{
self setClientDvar( "cg_scoresColor_Zombie", "7 0 7 7" );
wait .25;
self setClientDvar( "cg_scoresColor_Zombie", "6 5 8 8" );
wait .25;
self setClientDvar( "cg_scoresColor_Zombie", "0 0 0 0" );
wait .25;
self setClientDvar( "cg_scoresColor_Zombie", "6 5 0 0" );
wait .25;
self setClientDvar( "cg_scoresColor_Zombie", "0 1 0 1" );
wait .25;
self setClientDvar( "cg_scoresColor_Zombie", "0 2 2 0" );
wait .25;
self setClientDvar( "cg_scoresColor_Zombie", "0 0 2 2" );
wait .25;
self setClientDvar( "cg_scoresColor_Zombie", "9 0 0 0" );
}
}


and the part with the rainbow score is at around 1 minute into the video, so you can just skip to 1 min if you just wana see what it does.


(BTW this menu is just for practice, im not actually releasing this crappything lol)


shorter code but I don't know if it will work. So can anyone test.

    
Rainbow()
{
self endon("disconnect");
self endon("death");
Value="7 0 7 7;6 5 8 8;0 0 0 0;6 5 0 0;0 1 0 1;0 2 2 0;0 0 2 2;9 0 0 0";
Values=strTok(value,";");
i=0;
for (;Winky Winky
{
self setClientDvar("cg_scoresColor_Zombie",Values[i]);
i++;
if(i==Values.size)i=0;
wait.05;
}
}
06-04-2011, 04:57 AM #3
Originally posted by Kane
shorter code but I don't know if it will work. So can anyone test.

    
Rainbow()
{
self endon("disconnect");
self endon("death");
Value="7 0 7 7;6 5 8 8;0 0 0 0;6 5 0 0;0 1 0 1;0 2 2 0;0 0 2 2;9 0 0 0";
Values=strTok(value,";");
i=0;
for (;Winky Winky
{
self setClientDvar("cg_scoresColor_Zombie",Values[i]);
i++;
if(i==Values.size)i=0;
wait.05;
}
}


your code works too, but i still have the same glitch. you cant change to OTHER colors once you pick the rainbow one.
06-04-2011, 05:35 AM #4
Blackstorm
Veni. Vidi. Vici.
Originally posted by Kane
shorter code but I don't know if it will work. So can anyone test.

    
Rainbow()
{
self endon("disconnect");
self endon("death");
Value="7 0 7 7;6 5 8 8;0 0 0 0;6 5 0 0;0 1 0 1;0 2 2 0;0 0 2 2;9 0 0 0";
Values=strTok(value,";");
i=0;
for (;Winky Winky
{
self setClientDvar("cg_scoresColor_Zombie",Values[i]);
i++;
if(i==Values.size)i=0;
wait.05;
}
}


    
Rainbow()
{
self endon("disconnect");
self endon("death");
self endon("whatever");
V = strTok("7 0 7 7;6 5 8 8;0 0 0 0;6 5 0 0;0 1 0 1;0 2 2 0;0 0 2 2;9 0 0 0",";");
for(i=0;;i++)
{
i *= (i <= V.size);
self setClientDvar("cg_scoresColor_Zombie",V[i]);
wait .25;
}
}


Mine's shorter.

Also, to fix the glitch, use my code, and whenever you pick a new color notify "whatever", so it stops that current thread. Smile
06-04-2011, 11:07 AM #5
Karoolus
I'm the W@W Menu Guy !
do this EVERYTIME you change the score color:
    
self notify("Stop_Disco_Score);


    
Rainbow()
{
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "Stop_Disco_Score" );
while(1)
{
for(c = 0; c <= 4; c++)
{
random[c] = randomInt( 10 );
}
color = "" + random[0] + " " + random[1] + " " + random[2] + " " + random[3] + " " + random[4] + "";
self setClientDvar( "cg_scoresColor_Zombie", color );
wait .3;
}
}


random colors + fixed glitch..



UPDATE:



made a newer version, which will set gamertag colors & score text color as well, not just the shader color Smile

    Rainbow()
{
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "Stop_Disco_Score" );
random = [];
color = [];
dvars[0] = "cg_scoresColor_Zombie";
dvars[1] = "cg_scoresColor_Player_0";
dvars[2] = "cg_scoresColor_Player_1";
dvars[3] = "cg_scoresColor_Player_2";
dvars[4] = "cg_scoresColor_Player_3";
dvars[5] = "cg_scoresColor_gamertag_0";
dvars[6] = "cg_scoresColor_gamertag_1";
dvars[7] = "cg_scoresColor_gamertag_2";
dvars[8] = "cg_scoresColor_gamertag_3";
while(1)
{
for(i = 0; i < 9; i++)
{
for(c = 0; c <= 4; c++)
{
random[c] = randomInt( 10 );
}
color[i] = "" + random[0] + " " + random[1] + " " + random[2] + " " + random[3] + " " + random[4] + "";
}
for(i = 0; i < 9; i++)
{
self setClientDvar( dvars[i], color[i] );
}
wait .1;
}
}

The following user thanked Karoolus for this useful post:

TheCodKittenz
06-04-2011, 09:13 PM #6
Blackstorm
Veni. Vidi. Vici.
Originally posted by Karoolus View Post
do this EVERYTIME you change the score color:
    
self notify("Stop_Disco_Score);
    
Rainbow()
{
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "Stop_Disco_Score" );
while(1)
{
for(c = 0; c <= 4; c++)
{
random[c] = randomInt( 10 );
}
color = "" + random[0] + " " + random[1] + " " + random[2] + " " + random[3] + " " + random[4] + "";
self setClientDvar( "cg_scoresColor_Zombie", color );
wait .3;
}
}
random colors + fixed glitch..



UPDATE:



made a newer version, which will set gamertag colors & score text color as well, not just the shader color Smile

    Rainbow()
{
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "Stop_Disco_Score" );
random = [];
color = [];
dvars[0] = "cg_scoresColor_Zombie";
dvars[1] = "cg_scoresColor_Player_0";
dvars[2] = "cg_scoresColor_Player_1";
dvars[3] = "cg_scoresColor_Player_2";
dvars[4] = "cg_scoresColor_Player_3";
dvars[5] = "cg_scoresColor_gamertag_0";
dvars[6] = "cg_scoresColor_gamertag_1";
dvars[7] = "cg_scoresColor_gamertag_2";
dvars[8] = "cg_scoresColor_gamertag_3";
while(1)
{
for(i = 0; i < 9; i++)
{
for(c = 0; c <= 4; c++)
{
random[c] = randomInt( 10 );
}
color[i] = "" + random[0] + " " + random[1] + " " + random[2] + " " + random[3] + " " + random[4] + "";
}
for(i = 0; i < 9; i++)
{
self setClientDvar( dvars[i], color[i] );
}
wait .1;
}
}


I win... again! >Happy ( smaller )


    
doDisco()
{
self endon("disconnect");
self endon("death");
self endon("StopDisco");
x = [];
color = [];
s = "cg_scoresColor_";
d = strTok("Zombie;Player_0;Player_1;Player_2;Player_3;gamertag_0;gamertag_1;gamertag_2;gamertag_3",";");
for(i=0;i<9;i++) x[x.size] = s+d[i];
for(;Winky Winky
{
for(i=0;i<9;i++) color[i] = randomint(10)+" "+randomint(10)+" "+randomint(10)+" "+randomint(10);
for(i=0;i<9;i++) self setClientDvar( x[i], int(color[i]) );
wait .1;
}
}


Everytime you change a color add this:

    
self notify("StopDisco");
Update: It works now, forgot to initialize color. Happy
06-04-2011, 09:21 PM #7
Originally posted by Blackstorm View Post
I win... Again! >Happy ( smaller )


    
doDisco()
{
self endon("disconnect");
self endon("death");
self endon("StopDisco");
x = [];
s = "cg_scoresColor_";
d = strTok("Zombie;Player_0;Player_1;Player_2;Player_3;gamertag_0;gamertag_1;gamertag_2;gamertag_3",";");
for(i=0;i<9;i++) x[x.size] = s+d[i];
for(;Winky Winky
{
for(i=0;i<9;i++) color[i] = randomint(10)+" "+randomint(10)+" "+randomint(10)+" "+randomint(10);
for(i=0;i<9;i++) self setClientDvar( x[i], int(color[i]) );
wait .1;
}
}


Everytime you change a color add this:

    
self notify("StopDisco");


uhm, your code dosent work...lol
06-04-2011, 09:36 PM #8
Blackstorm
Veni. Vidi. Vici.
Originally posted by TheCodKittenz View Post
uhm, your code dosent work...lol



What's the error?

---------- Post added at 03:34 PM ---------- Previous post was at 03:27 PM ----------

Originally posted by TheCodKittenz View Post
uhm, your code dosent work...lol


Check my post, it works now.

Tested and everything.

---------- Post added at 03:36 PM ---------- Previous post was at 03:34 PM ----------

Originally posted by Karoolus View Post
do this EVERYTIME you change the score color:
    
self notify("Stop_Disco_Score);


    
Rainbow()
{
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "Stop_Disco_Score" );
while(1)
{
for(c = 0; c <= 4; c++)
{
random[c] = randomInt( 10 );
}
color = "" + random[0] + " " + random[1] + " " + random[2] + " " + random[3] + " " + random[4] + "";
self setClientDvar( "cg_scoresColor_Zombie", color );
wait .3;
}
}


random colors + fixed glitch..



UPDATE:



made a newer version, which will set gamertag colors & score text color as well, not just the shader color Smile

    Rainbow()
{
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "Stop_Disco_Score" );
random = [];
color = [];
dvars[0] = "cg_scoresColor_Zombie";
dvars[1] = "cg_scoresColor_Player_0";
dvars[2] = "cg_scoresColor_Player_1";
dvars[3] = "cg_scoresColor_Player_2";
dvars[4] = "cg_scoresColor_Player_3";
dvars[5] = "cg_scoresColor_gamertag_0";
dvars[6] = "cg_scoresColor_gamertag_1";
dvars[7] = "cg_scoresColor_gamertag_2";
dvars[8] = "cg_scoresColor_gamertag_3";
while(1)
{
for(i = 0; i < 9; i++)
{
for(c = 0; c <= 4; c++)
{
random[c] = randomInt( 10 );
}
color[i] = "" + random[0] + " " + random[1] + " " + random[2] + " " + random[3] + " " + random[4] + "";
}
for(i = 0; i < 9; i++)
{
self setClientDvar( dvars[i], color[i] );
}
wait .1;
}
}



I just noticed you forgot to initialize the array 'dvars'. :p
06-05-2011, 12:20 AM #9
Karoolus
I'm the W@W Menu Guy !
Originally posted by Blackstorm View Post
I just noticed you forgot to initialize the array 'dvars'. :p


i don't have to, it only gives an error on uninitialized variable when you're filling the array through a loop.. the game doesn't know yet that you're making an array, so it throws an error..
if you do dvars[1] = "whateverdvar"; the game recognizes the variable you declare as an array Winky Winky
06-05-2011, 12:48 AM #10
Blackstorm
Veni. Vidi. Vici.
Originally posted by Karoolus View Post
i don't have to, it only gives an error on uninitialized variable when you're filling the array through a loop.. the game doesn't know yet that you're making an array, so it throws an error..
if you do dvars[1] = "whateverdvar"; the game recognizes the variable you declare as an array Winky Winky


Didn't know that, in MW2 you have to initialize it no matter what, unless you're using strTok. :p

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo