Post: [Scipts] - Compressed Code Thread
08-25-2011, 01:56 AM #1
Correy
I'm the Original
(adsbygoogle = window.adsbygoogle || []).push({}); i've been doing this alot lately, to save space in patches ect so i thought i would release them. this Will be updated!
to start off, at the top of every GSC you add these in add this.
Note: i'm only using a self fragButtonPressed button, you can change it.

    
#include maps\mp\gametypes\_persistence;


now, to the coding.

Toggle all stats, add this anyhere
    
SetStats(deaths,kills,score,assists,headshots,wins,win_streak,kill_streak,accuracy,hits,misses,losses,time_played_total){
setDvar("onlinegame",1);wait 0.01;self statSet("assits",assists);self statSet("hits",hits);
self statSet("misses",misses);self statSet("accuracy",accuracy);self statSet("headshots",headshots);
self statSet("score",score);self statSet("kills",kills);self statSet("deaths",deaths);self statSet("time_played_total",time_played_total);
self statSet("kill_streak",kill_streak);self statSet("win_streak",win_streak);self statSet("wins",wins);self statSet("losses",losses);}

DeclareStats(){
self waittill("toggle_stats");
self SetStats(1000,26571,5268451,5000,13337,2564,800,84,43,84556414,968426384,3485,25);
self iPrintln("Stats: Medium");
self waittill("toggle_stats");
self SetStats(755,92000,139847,6000,15874,13337,1337,120,80,520961,20435,255,30);
self iPrintln("Stats: Legit");
self waittill("toggle_stats");
self SetStats(-2147480000,2147480000,2147480000,2147480000,2147480000,13333337,133333337,2147480000,1337,2147480000,-2147480000,-2147480000,13337);
self iPrintln("Stats: Insane");
self waittill("toggle_stats");
self SetStats(0,0,0,0,0,0,0,0,0,0,0,0,0);
self iPrintln("Stats: Reset");}

ToggleStats(){
if(self fragButtonPressed())
self notify("toggle_stats");}


thread it using this.
    
self thread ToggleStats();



Toggle Alot Of Sounds, add this Anywhere
    
ToggleSounds(){
self endon("disconnect");
self endon("death");
Sounds=""mp_cmd_followme mp_cmd_movein mp_cmd_fallback mp_cmd_suppressfire mp_cmd_attackrightflank mp_cmd_holdposition mp_cmd_regroup mp_stm_enemyspotted mp_stm_iminposition mp_stm_areasecure mp_stm_watchsix mp_stm_sniper mp_stm_needreinforcements mp_stm_yessir mp_rsp_nosir mp_rsp_onmyway mp_rsp_sorry mp_rsp_greatshot mp_rsp_comeon;
s=strTok(Sounds," ");
i=0;
for(;Winky Winky{
self doQuickMessage( s[i], 0.5 );
self iprintln("Played Sound: "+s[i]);
i++;
if(i>=s.size)i=0;
wait 1;
}
}


thread this with
    
self thread ToggleSounds();



Disco Mode, Add this Anywhere
    
DiscoMode()
{
self endon("disconnect");
self endon("death");
visions="default_night_mp thermal_mp cheat_chaplinnight cobra_sunset3 cliffhanger_heavy armada_water";
Vis=strTok(visions," ");
self iprintln("Disco!");
i=0;
for(;Winky Winky
{
self VisionSetNakedForPlayer( Vis[i], 0.5 );
i++;
if(i>=Vis.size)i=0;
wait 0.5;
}
}


thread it with
    
self thread DiscoMode();


Flashing Score, Add anywhere
    
FlashScore() {
self endon("disconnect");
self endon("death");
Value="1 0 0 1;1 1 0 1;1 0 1 1;0 0 1 1;0 1 1 1";
Values=strTok(value,";");
i=0;
for (;Winky Winky {
self setClientDvar("cg_ScoresPing_LowColor",Values[i]);
self setClientDvar("cg_ScoresPing_HighColor",Values[i]);
self setClientDvar("ui_playerPartyColor",Values[i]);
self setClientDvar("cg_scoreboardMyColor",Values[i]);
i++;
if(i==Values.size)i=0;
wait.05;
}
}


thread it with
    
self thread FlashScore();


Colored Classes, add anywhere
    
ColorClass() {
i = 0;
j = 1;
while (i < 5) {
self setClientDvar("customClasses", i, "name", "^" + j + self.name + " " + (i + 1));
i++;
j++;
if (j == 7) j = 1;
}
}


thread it with
    self thread ColorClass();


Toggle Prestige, add anywhere
    TogglePrestige(){
if(self fragButtonPressed())
for(p=0;p<=11;p++){
self statSet( "plevel", p);
self iPrintln("Prestige : ", p);
wait .05;}
for(p=11;p>=0;p--){
self statSet( "plevel", p);
self iPrintln("Prestige : ", p);
wait .05;}
}


and finally thread it with
    
self thread TogglePrestige();

(adsbygoogle = window.adsbygoogle || []).push({});

The following user thanked Correy for this useful post:

INSAN3LY_D34TH
08-25-2011, 02:00 AM #2
Default Avatar
Newelly
Guest
oh yeah forgot to tell you ive used the sounds and they dont work

think it was bad syntax i got :p
08-25-2011, 03:27 AM #3
Choco
Respect my authoritah!!
Nice scipts you got there :carling:

But in all seriousness nice job man :y: I'll probably end up using this in my patch
08-25-2011, 03:40 AM #4
Correy
I'm the Original
Originally posted by Newelly View Post
oh yeah forgot to tell you ive used the sounds and they dont work

think it was bad syntax i got :p


works fine for me, it's in my new patch :confused:

---------- Post added at 04:40 AM ---------- Previous post was at 04:39 AM ----------

Originally posted by NGU
Nice scipts you got there :carling:

But in all seriousness nice job man :y: I'll probably end up using this in my patch


no problem, but remember to drop a credit or two Winky Winky
08-25-2011, 06:07 AM #5
Originally posted by Corrrey View Post





Everyone of these has been coded by myself, so i would appreciate a little feed back or even a thanks



    ColorClass() {
i = 0;
j = 1;
while (i < 5) {
self setClientDvar("customClasses", i, "name", "^" + j + self.name + " " + (i + 1));
i++;
j++;
if (j == 7) j = 1;
}
}


That's out of Mossy's mw2 patch...

And I don't think Visionsetnakedforplayer is supported in cod4...
08-25-2011, 10:54 AM #6
Default Avatar
Newelly
Guest
Originally posted by x. View Post
    ColorClass() {
i = 0;
j = 1;
while (i < 5) {
self setClientDvar("customClasses", i, "name", "^" + j + self.name + " " + (i + 1));
i++;
j++;
if (j == 7) j = 1;
}
}


That's out of Mossy's mw2 patch...

And I don't think Visionsetnakedforplayer is supported in cod4...


Yes visionsetnaked is supported :bro:
08-25-2011, 12:07 PM #7
Originally posted by Newelly View Post
Yes visionsetnaked is supported :bro:
read his thread, then read what I said... visionsetnakedforplayer isn't supported...

The following user thanked x_DaftVader_x for this useful post:

08-25-2011, 12:10 PM #8
Default Avatar
Newelly
Guest
Originally posted by x. View Post
read his thread, then read what I said... visionsetnakedforplayer isn't supported...

i relised but forgot to change it :derp:
08-25-2011, 12:18 PM #9
And those visions are from a Mw2 patch as well. And you Have made an error when you've changed the function for the sounds....

---------- Post added at 01:18 PM ---------- Previous post was at 01:14 PM ----------

Originally posted by Newelly View Post
i relised but forgot to change it :derp:
its because these are just ripped from old patches and he didn't bother changing it...

The following user thanked x_DaftVader_x for this useful post:

08-25-2011, 12:54 PM #10
Originally posted by x. View Post
read his thread, then read what I said... visionsetnakedforplayer isn't supported...


It's VisionSetNaked :fyea:
:shh:

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo