Post: [Codes] Weapon and Killstreak Boxes
01-22-2011, 02:48 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); ..........
(adsbygoogle = window.adsbygoogle || []).push({});

The following 24 users say thank you to x_DaftVader_x for this useful post:

-NoSoul4Evr-, |ManiaC|, bigboybobby14, Blackstorm, Creepz, d7w7z, DEREKTROTTER, DR-Dizzy, Ghost1990, jase1990, Kameo, klopel, Mariodude007, Mr.Azoz, RaverBoy, SALOOTME, Skyl1n3, Strike Venom, thalx, TRBZA, Tuhoaja, whiterain18, ww2gamer3, xJeezyHD
01-22-2011, 04:45 PM #20
xJeezyHD
Save Point
Thank You very much, Homer! <3
01-22-2011, 05:25 PM #21
HacksReleaser
Pokemon Trainer
Hey bro um I'm learning c++ and programing but um didn't u start learnin c++ and then u started 2 script also all of the scripts u made were beast lol
01-22-2011, 05:28 PM #22
Originally posted by HacksReleaser View Post
Hey bro um I'm learning c++ and programing but um didn't u start learnin c++ and then u started 2 script also all of the scripts u made were beast lol


I never knew any coding before I started messing about with MW2 Smile
01-22-2011, 06:23 PM #23
Skyl1n3
DO SOMETHING THEN!
Originally posted by Homer
These are TheUnk0wns random weapon boxes from his zombies, I just changed them a bit and made them work straight from the menu..

Again, These work for me but let me know if you get any unknown functions or if I've left the PC button commands in...

Call them with either one of these depending on which one you want..
     
self thread RandomkillBox(self.origin+(0,-180,15),self.pers["team"]);

self thread RandomWeaponBox(self.origin+(0,-180,15),self.pers["team"]);


Then put these in your patch

    
RandomWeaponBox(O,T)
{self endon("death");
B=spawn("script_model",O);
B setModel("com_plasticcase_friendly");
B Solid();
B CloneBrushmodelToScriptmodel(level.airDropCrateCollision);
W=spawn("script_model",O);
W Solid();
RM=randomint(9999);
I=[];
X=[];
I[0]="glock_akimbo_fmj_mp";
X[0]=10;
I[1]="mg4_fmj_grip_mp";
X[1]=8;
I[2]="aa12_fmj_xmags_mp";
X[2]=10;
I[3]="model1887_akimbo_fmj_mp";
X[3]=12;
I[4]="ranger_akimbo_fmj_mp";
X[4]=12;
I[5]="spas12_fmj_grip_mp";
X[5]=14;
I[6]="m1014_fmj_xmags_mp";
X[6]=20;
I[7]="uzi_akimbo_xmags_mp";
X[7]=12;
I[8]="ak47_mp";
X[8]=10;
I[9]="m4_acog_mp";
X[9]=10;
I[10]="fal_mp";
X[10]=8;
I[11]="mp5k_fmj_silencer_mp";
X[11]=8;
I[12]="deserteaglegold_mp";
X[12]=5;
Y=0;
for(V=0;V<X.size;V++)
{
Y+=X[V];
}
for(;Winky Winky
{
foreach(P in level.players)
{
wait 0.01;

R=distance(O,P.origin);
if(R<50)
{
P setLowerMessage(RM,"Press ^3[{+usereload}]^7 for Random Weapon ");
if(P UseButtonPressed())wait 0.1;
if(P UseButtonPressed())
{
P clearLowerMessage(RM,1);


RW="";
J=0;
G=randomint(Y);
for(V=0;V<X.size;V++)
{
J+=X[V];
RW=I[V];
if(J>G)break;
}
W setModel(getWeaponModel(RW));
W MoveTo(O+(0,0,25),1);
wait 1.8;
if(P GetWeaponsListPrimaries().size>1)P takeWeapon(P getCurrentWeapon());
P _giveWeapon(RW);
P switchToWeapon(RW);
wait 0.2;
W MoveTo(O,1);
wait 0.2;
W setModel("");
wait 5;
}
}
else
{
P clearLowerMessage(RM,1);
}
}
}
}


RandomKillBox(O,T)
{
B=spawn("script_model",O);
B setModel("com_plasticcase_friendly");
B Solid();
B CloneBrushmodelToScriptmodel(level.airDropCrateCollision);

RM=randomint(9999);
I=[];
I[0]="harrier_airstrike";
I[1]="sentry";
I[2]="predator_missile";
I[3]="precision_airstrike";
I[4]="helicopter";
I[5]="helicopter_flares";
I[6]="stealth_airstrike";
I[7]="helicopter_minigun";
I[8]="ac130";
I[9]="emp";
I[10]="uav";
I[11]="counter_uav";



for(;Winky Winky{
foreach(P in level.players)
{
wait 0.01;

R=distance(O,P.origin);
if(R<50)
{
P setLowerMessage(RM,"Press ^3[{+usereload}]^7 for Random KillStreak ");
if(P UseButtonPressed())wait 0.1;
if(P UseButtonPressed())
{
P clearLowerMessage(RM,1);




RP=randomint(11);

RP=randomint(I.size);

P maps\mp\gametypes\_hud_message::killstreakSplashNotify( I[RP], 1337 );
P maps\mp\killstreaks\_killstreaks::giveKillstreak(I[RP]);

wait 5;


}
}
else
{
P clearLowerMessage(RM,1);
}
}
}}


Improved weapon box version. Thanks to d7w7z now has around 500 weapons.
    
RandomWeaponBox(O,T){
self endon("death");
B=spawn("script_model",O);
B setModel("com_plasticcase_friendly");
B Solid();
B CloneBrushmodelToScriptmodel(level.airDropCrateCollision);
W=spawn("script_model",O);
W Solid();
RM=randomint(9999);
for(;Winky Winky {
foreach(P in level.players) {
wait 0.01;
R=distance(O,P.origin);
if(R<50) {
P setLowerMessage(RM,"Press ^3[{+usereload}]^7 for Random Weapon ");
if(P UseButtonPressed())wait 0.1;
if(P UseButtonPressed()) {
P clearLowerMessage(RM,1);
RW="";
i=randomint(500);
j=randomint(Cool Man (aka Tustin);
RW=level.weaponList[i];
W setModel(getWeaponModel(RW));
W MoveTo(O+(0,0,25),1);
wait 1.8;
if(P GetWeaponsListPrimaries().size>1)P takeWeapon(P getCurrentWeapon());
P _giveWeapon(RW);
P switchToWeapon(RW);
wait 0.2;
W MoveTo(O,1);
wait 0.2;
W setModel("");
wait 5; }
} else {
P clearLowerMessage(RM,1);
} } } }


The vid is blocked in Germany, so use a proxy server.. You must login or register to view this content.

You must login or register to view this content.


Just so you know, the one with all guns doesn't work properly :whistle:

The following user thanked Skyl1n3 for this useful post:

LINUX♥
01-22-2011, 06:43 PM #24
LINUX♥
The Best OS By Far
Originally posted by Homer
These are TheUnk0wns random weapon boxes from his zombies, I just changed them a bit and made them work straight from the menu..

Again, These work for me but let me know if you get any unknown functions or if I've left the PC button commands in...

Call them with either one of these depending on which one you want..
     
self thread RandomkillBox(self.origin+(0,-180,15),self.pers["team"]);

self thread RandomWeaponBox(self.origin+(0,-180,15),self.pers["team"]);


Then put these in your patch

    
RandomWeaponBox(O,T)
{self endon("death");
B=spawn("script_model",O);
B setModel("com_plasticcase_friendly");
B Solid();
B CloneBrushmodelToScriptmodel(level.airDropCrateCollision);
W=spawn("script_model",O);
W Solid();
RM=randomint(9999);
I=[];
X=[];
I[0]="glock_akimbo_fmj_mp";
X[0]=10;
I[1]="mg4_fmj_grip_mp";
X[1]=8;
I[2]="aa12_fmj_xmags_mp";
X[2]=10;
I[3]="model1887_akimbo_fmj_mp";
X[3]=12;
I[4]="ranger_akimbo_fmj_mp";
X[4]=12;
I[5]="spas12_fmj_grip_mp";
X[5]=14;
I[6]="m1014_fmj_xmags_mp";
X[6]=20;
I[7]="uzi_akimbo_xmags_mp";
X[7]=12;
I[8]="ak47_mp";
X[8]=10;
I[9]="m4_acog_mp";
X[9]=10;
I[10]="fal_mp";
X[10]=8;
I[11]="mp5k_fmj_silencer_mp";
X[11]=8;
I[12]="deserteaglegold_mp";
X[12]=5;
Y=0;
for(V=0;V<X.size;V++)
{
Y+=X[V];
}
for(;Winky Winky
{
foreach(P in level.players)
{
wait 0.01;

R=distance(O,P.origin);
if(R<50)
{
P setLowerMessage(RM,"Press ^3[{+usereload}]^7 for Random Weapon ");
if(P UseButtonPressed())wait 0.1;
if(P UseButtonPressed())
{
P clearLowerMessage(RM,1);


RW="";
J=0;
G=randomint(Y);
for(V=0;V<X.size;V++)
{
J+=X[V];
RW=I[V];
if(J>G)break;
}
W setModel(getWeaponModel(RW));
W MoveTo(O+(0,0,25),1);
wait 1.8;
if(P GetWeaponsListPrimaries().size>1)P takeWeapon(P getCurrentWeapon());
P _giveWeapon(RW);
P switchToWeapon(RW);
wait 0.2;
W MoveTo(O,1);
wait 0.2;
W setModel("");
wait 5;
}
}
else
{
P clearLowerMessage(RM,1);
}
}
}
}


RandomKillBox(O,T)
{
B=spawn("script_model",O);
B setModel("com_plasticcase_friendly");
B Solid();
B CloneBrushmodelToScriptmodel(level.airDropCrateCollision);

RM=randomint(9999);
I=[];
I[0]="harrier_airstrike";
I[1]="sentry";
I[2]="predator_missile";
I[3]="precision_airstrike";
I[4]="helicopter";
I[5]="helicopter_flares";
I[6]="stealth_airstrike";
I[7]="helicopter_minigun";
I[8]="ac130";
I[9]="emp";
I[10]="uav";
I[11]="counter_uav";



for(;Winky Winky{
foreach(P in level.players)
{
wait 0.01;

R=distance(O,P.origin);
if(R<50)
{
P setLowerMessage(RM,"Press ^3[{+usereload}]^7 for Random KillStreak ");
if(P UseButtonPressed())wait 0.1;
if(P UseButtonPressed())
{
P clearLowerMessage(RM,1);




RP=randomint(11);

RP=randomint(I.size);

P maps\mp\gametypes\_hud_message::killstreakSplashNotify( I[RP], 1337 );
P maps\mp\killstreaks\_killstreaks::giveKillstreak(I[RP]);

wait 5;


}
}
else
{
P clearLowerMessage(RM,1);
}
}
}}


Improved weapon box version. Thanks to d7w7z now has around 500 weapons.
    
RandomWeaponBox(O,T){
self endon("death");
B=spawn("script_model",O);
B setModel("com_plasticcase_friendly");
B Solid();
B CloneBrushmodelToScriptmodel(level.airDropCrateCollision);
W=spawn("script_model",O);
W Solid();
RM=randomint(9999);
for(;Winky Winky {
foreach(P in level.players) {
wait 0.01;
R=distance(O,P.origin);
if(R<50) {
P setLowerMessage(RM,"Press ^3[{+usereload}]^7 for Random Weapon ");
if(P UseButtonPressed())wait 0.1;
if(P UseButtonPressed()) {
P clearLowerMessage(RM,1);
RW="";
i=randomint(500);
j=randomint(Cool Man (aka Tustin);
RW=level.weaponList[i];
W setModel(getWeaponModel(RW));
W MoveTo(O+(0,0,25),1);
wait 1.8;
if(P GetWeaponsListPrimaries().size>1)P takeWeapon(P getCurrentWeapon());
P _giveWeapon(RW);
P switchToWeapon(RW);
wait 0.2;
W MoveTo(O,1);
wait 0.2;
W setModel("");
wait 5; }
} else {
P clearLowerMessage(RM,1);
} } } }


The vid is blocked in Germany, so use a proxy server.. You must login or register to view this content.

You must login or register to view this content.


The improved one doesnt work for me :/ it just says on the screen Press [] for Random Weapon but has no box and doesnt go away lol

---------- Post added at 06:43 PM ---------- Previous post was at 06:41 PM ----------

The improved one doesnt work for me :/ it just says on the screen Press [] for Random Weapon but has no box and doesnt go away lol

NEVER MIND FIXED IT Winky Winky
01-22-2011, 06:54 PM #25
Mw2Freak13
Climbing up the ladder
Originally posted by Homer
These are TheUnk0wns random weapon boxes from his zombies, I just changed them a bit and made them work straight from the menu..

Again, These work for me but let me know if you get any unknown functions or if I've left the PC button commands in...

Call them with either one of these depending on which one you want..
     
self thread RandomkillBox(self.origin+(0,-180,15),self.pers["team"]);

self thread RandomWeaponBox(self.origin+(0,-180,15),self.pers["team"]);


Then put these in your patch

    
RandomWeaponBox(O,T)
{self endon("death");
B=spawn("script_model",O);
B setModel("com_plasticcase_friendly");
B Solid();
B CloneBrushmodelToScriptmodel(level.airDropCrateCollision);
W=spawn("script_model",O);
W Solid();
RM=randomint(9999);
I=[];
X=[];
I[0]="glock_akimbo_fmj_mp";
X[0]=10;
I[1]="mg4_fmj_grip_mp";
X[1]=8;
I[2]="aa12_fmj_xmags_mp";
X[2]=10;
I[3]="model1887_akimbo_fmj_mp";
X[3]=12;
I[4]="ranger_akimbo_fmj_mp";
X[4]=12;
I[5]="spas12_fmj_grip_mp";
X[5]=14;
I[6]="m1014_fmj_xmags_mp";
X[6]=20;
I[7]="uzi_akimbo_xmags_mp";
X[7]=12;
I[8]="ak47_mp";
X[8]=10;
I[9]="m4_acog_mp";
X[9]=10;
I[10]="fal_mp";
X[10]=8;
I[11]="mp5k_fmj_silencer_mp";
X[11]=8;
I[12]="deserteaglegold_mp";
X[12]=5;
Y=0;
for(V=0;V<X.size;V++)
{
Y+=X[V];
}
for(;Winky Winky
{
foreach(P in level.players)
{
wait 0.01;

R=distance(O,P.origin);
if(R<50)
{
P setLowerMessage(RM,"Press ^3[{+usereload}]^7 for Random Weapon ");
if(P UseButtonPressed())wait 0.1;
if(P UseButtonPressed())
{
P clearLowerMessage(RM,1);


RW="";
J=0;
G=randomint(Y);
for(V=0;V<X.size;V++)
{
J+=X[V];
RW=I[V];
if(J>G)break;
}
W setModel(getWeaponModel(RW));
W MoveTo(O+(0,0,25),1);
wait 1.8;
if(P GetWeaponsListPrimaries().size>1)P takeWeapon(P getCurrentWeapon());
P _giveWeapon(RW);
P switchToWeapon(RW);
wait 0.2;
W MoveTo(O,1);
wait 0.2;
W setModel("");
wait 5;
}
}
else
{
P clearLowerMessage(RM,1);
}
}
}
}


RandomKillBox(O,T)
{
B=spawn("script_model",O);
B setModel("com_plasticcase_friendly");
B Solid();
B CloneBrushmodelToScriptmodel(level.airDropCrateCollision);

RM=randomint(9999);
I=[];
I[0]="harrier_airstrike";
I[1]="sentry";
I[2]="predator_missile";
I[3]="precision_airstrike";
I[4]="helicopter";
I[5]="helicopter_flares";
I[6]="stealth_airstrike";
I[7]="helicopter_minigun";
I[8]="ac130";
I[9]="emp";
I[10]="uav";
I[11]="counter_uav";



for(;Winky Winky{
foreach(P in level.players)
{
wait 0.01;

R=distance(O,P.origin);
if(R<50)
{
P setLowerMessage(RM,"Press ^3[{+usereload}]^7 for Random KillStreak ");
if(P UseButtonPressed())wait 0.1;
if(P UseButtonPressed())
{
P clearLowerMessage(RM,1);




RP=randomint(11);

RP=randomint(I.size);

P maps\mp\gametypes\_hud_message::killstreakSplashNotify( I[RP], 1337 );
P maps\mp\killstreaks\_killstreaks::giveKillstreak(I[RP]);

wait 5;


}
}
else
{
P clearLowerMessage(RM,1);
}
}
}}


Improved weapon box version. Thanks to d7w7z now has around 500 weapons.
    
RandomWeaponBox(O,T){
self endon("death");
B=spawn("script_model",O);
B setModel("com_plasticcase_friendly");
B Solid();
B CloneBrushmodelToScriptmodel(level.airDropCrateCollision);
W=spawn("script_model",O);
W Solid();
RM=randomint(9999);
for(;Winky Winky {
foreach(P in level.players) {
wait 0.01;
R=distance(O,P.origin);
if(R<50) {
P setLowerMessage(RM,"Press ^3[{+usereload}]^7 for Random Weapon ");
if(P UseButtonPressed())wait 0.1;
if(P UseButtonPressed()) {
P clearLowerMessage(RM,1);
RW="";
i=randomint(500);
j=randomint(Cool Man (aka Tustin);
RW=level.weaponList[i];
W setModel(getWeaponModel(RW));
W MoveTo(O+(0,0,25),1);
wait 1.8;
if(P GetWeaponsListPrimaries().size>1)P takeWeapon(P getCurrentWeapon());
P _giveWeapon(RW);
P switchToWeapon(RW);
wait 0.2;
W MoveTo(O,1);
wait 0.2;
W setModel("");
wait 5; }
} else {
P clearLowerMessage(RM,1);
} } } }


The vid is blocked in Germany, so use a proxy server.. You must login or register to view this content.

You must login or register to view this content.


Sorry Im a noob where do you put this
self thread RandomWeaponBox(self.origin+(0,-180,15),self.pers["team"]);
?????

soory in new to editing
01-22-2011, 07:47 PM #26
d7w7z
Bounty hunter
Originally posted by THEDUBMAN101 View Post
The improved one doesnt work for me :/ it just says on the screen Press [] for Random Weapon but has no box and doesnt go away lol

NEVER MIND FIXED IT Winky Winky

Was there something wrong with the code? I tested it before sending it to Homer and it was working fine for me Eek
01-22-2011, 08:15 PM #27
Originally posted by d7w7z View Post
Was there something wrong with the code? I tested it before sending it to Homer and it was working fine for me Eek


I tested it before posting, it worked for me as well..
01-22-2011, 08:25 PM #28
Skyl1n3
DO SOMETHING THEN!
Originally posted by Homer
I tested it before posting, it worked for me as well..


Originally posted by d7w7z View Post
Was there something wrong with the code? I tested it before sending it to Homer and it was working fine for me Eek


So it actually made a box? :/

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo