Post: [Scirpit] - Random Weapon Box!
08-24-2011, 04:51 PM #1
Correy
I'm the Original
(adsbygoogle = window.adsbygoogle || []).push({}); solid box model, co-ordinated on Vacent.. in the center garden.

Precache These
    
precacheModel( "com_plasticcase_green_big" );
level.circle=loadfx("misc/ui_pickup_unavailable");


Thread this
    
self thread Correy();


now, i made this initially for Hawkins zombies add on, a project which will come to you soon.. but if you want to add it here's hawkins version.
    
Correy(){
//For Testing===
//self.score = 500;
//self.score = 400;
//===============
self endon("disconnect");
O = (-28.6744, -317.408, -47.875);
wait 2;
B = spawn("script_model", O);
B setModel("com_plasticcase_green_big");
B Solid();
self thread CA(B);
g = SpawnFx(level.circle, O);
TriggerFX(g);
self thread CA(g);
W = spawn("script_model", B.origin);
W Solid();
for (;Winky Winky {
for (i = 0; i < level.players.size; i++) {
P = level.players[i];
wait 0.01;
R = distance(B.origin, P.origin);
if (R < 90)
{
if(self.score <= 500)
{
P setLowerMessage("Press ^3[{+usereload}]^7 for Random Weapon");
if (P UseButtonPressed())
{
wait 0.1;
if (P UseButtonPressed())
{
P clearLowerMessage(1);
wait .5;
RW = "";
i = randomint(75);
j = randomint(6);
cur = self getCurrentWeapon();
RW = level.weaponList[i];
W setModel(getWeaponModel(RW, j));
W MoveTo(B.origin + (0, 0, 50), 2);
wait 1.5;
if (P GetWeaponsListPrimaries().size > 1) P giveWeapon(RW, j);
if (P GetWeaponsListPrimaries().size > 1) P TakeWeapon(cur); P giveWeapon(RW, j);
P switchToWeapon(RW, j);
P playsound("oldschool_pickup");
wait 1;
W MoveTo(B.origin, 0.5);
wait 1;
W setModel("");
wait 2;
self.score -= 500;
}
}
}
else if (self.score > 500)
{
P setLowerMessage("You Don't Hane Enough Points To Purchase This Item");
if (P UseButtonPressed())
{
self iPrintln("^1Not Enough Cash");
}
wait 3;
P clearLowerMessage(1);
}
}
else {
p clearLowerMessage(1);
}
}
}
}

CA(vc){for(;Winky Winky{self waittill("stoph");vc delete();}}


Normal Version without score system.
    
Correy(){
self endon("disconnect");
O = (-28.6744, -317.408, -47.875);
wait 2;
B = spawn("script_model", O);
B setModel("com_plasticcase_beige_big");
B Solid();
self thread CA(B);
g = SpawnFx(level.circle, O);
TriggerFX(g);
self thread CA(g);
W = spawn("script_model", B.origin);
W Solid();
for (;Winky Winky {
for (i = 0; i < level.players.size; i++) {
P = level.players[i];
wait 0.01;
R = distance(B.origin, P.origin);
if (R < 90)
{
P setLowerMessage("Press ^3[{+usereload}]^7 for Random Weapon");
if (P UseButtonPressed())
{
wait 0.1;
if (P UseButtonPressed())
{
P clearLowerMessage(1);
wait .5;
RW = "";
i = randomint(75);
j = randomint(6);
cur = self getCurrentWeapon();
RW = level.weaponList[i];
W setModel(getWeaponModel(RW, j));
W MoveTo(B.origin + (0, 0, 50), 2);
wait 1.5;
if (P GetWeaponsListPrimaries().size > 1) P giveWeapon(RW, j);
if (P GetWeaponsListPrimaries().size > 1) P TakeWeapon(cur); P giveWeapon(RW, j);
P switchToWeapon(RW, j);
P playsound("oldschool_pickup");
wait 1;
W MoveTo(B.origin, 0.5);
wait 1;
W setModel("");
wait 2;
}
}
}
}
else {
p clearLowerMessage(1);
}
}
}
}

CA(vc){for(;Winky Winky{self waittill("stoph");vc delete();}}


i coded these for vacent in the center, so change the co-ordinates as you wish.

thanks to, unkn0wn for initial code, Blackstorm for Converting, Vader for editing and posting and me for re-Editing
(adsbygoogle = window.adsbygoogle || []).push({});

The following 5 users say thank you to Correy for this useful post:

.Andy, cadpimp1289, Diddles2Fresshh, oO-GKUSH-Oo, Uk_ViiPeR
08-26-2011, 02:23 AM #2
thanks ill be using this Smile
09-03-2011, 02:06 AM #3
Correy
I'm the Original
Originally posted by Clown View Post
thanks ill be using this Smile


ah, thanks for the feedback Winky Winky
09-03-2011, 02:12 AM #4
Originally posted by Correy View Post
ah, thanks for the feedback Winky Winky

Thanks for ****in my mom. We all end up helping in the end. Wait what...????
09-03-2011, 02:28 AM #5
Correy
I'm the Original
Originally posted by Clown View Post
Thanks for ****in my mom. We all end up helping in the end. Wait what...????


erm, whut lmfao :confused::derp:
09-03-2011, 06:00 AM #6
mw2modderz
Save Point
where do i put these exactly? in the CM file or in MP
09-03-2011, 09:39 AM #7
Correy
I'm the Original
Originally posted by mw2modderz View Post
where do i put these exactly? in the CM file or in MP


erm, none.
you put it into a patch :confused:
09-03-2011, 12:24 PM #8
mw2modderz
Save Point
Originally posted by Correy View Post
erm, none.
you put it into a patch :confused:

oh erm now i feel stupid./facepalm/facepalm/facepalm
09-05-2011, 09:13 PM #9
Originally posted by Correy View Post
solid box model, co-ordinated on Vacent.. in the center garden.

Precache These
    
precacheModel( "com_plasticcase_green_big" );
level.circle=loadfx("misc/ui_pickup_unavailable");




Thread this
    
self thread Correy();


now, i made this initially for Hawkins zombies add on, a project which will come to you soon.. but if you want to add it here's hawkins version.
    
Correy(){
//For Testing===
//self.score = 500;
//self.score = 400;
//===============
self endon("disconnect");
O = (-28.6744, -317.408, -47.875);
wait 2;
B = spawn("script_model", O);
B setModel("com_plasticcase_green_big");
B Solid();
self thread CA(B);
g = SpawnFx(level.circle, O);
TriggerFX(g);
self thread CA(g);
W = spawn("script_model", B.origin);
W Solid();
for (;Winky Winky {
for (i = 0; i < level.players.size; i++) {
P = level.players[i];
wait 0.01;
R = distance(B.origin, P.origin);
if (R < 90)
{
if(self.score <= 500)
{
P setLowerMessage("Press ^3[{+usereload}]^7 for Random Weapon");
if (P UseButtonPressed())
{
wait 0.1;
if (P UseButtonPressed())
{
P clearLowerMessage(1);
wait .5;
RW = "";
i = randomint(75);
j = randomint(6);
cur = self getCurrentWeapon();
RW = level.weaponList[i];
W setModel(getWeaponModel(RW, j));
W MoveTo(B.origin + (0, 0, 50), 2);
wait 1.5;
if (P GetWeaponsListPrimaries().size > 1) P giveWeapon(RW, j);
if (P GetWeaponsListPrimaries().size > 1) P TakeWeapon(cur); P giveWeapon(RW, j);
P switchToWeapon(RW, j);
P playsound("oldschool_pickup");
wait 1;
W MoveTo(B.origin, 0.5);
wait 1;
W setModel("");
wait 2;
self.score -= 500;
}
}
}
else if (self.score > 500)
{
P setLowerMessage("You Don't Hane Enough Points To Purchase This Item");
if (P UseButtonPressed())
{
self iPrintln("^1Not Enough Cash");
}
wait 3;
P clearLowerMessage(1);
}
}
else {
p clearLowerMessage(1);
}
}
}
}

CA(vc){for(;Winky Winky{self waittill("stoph");vc delete();}}


Normal Version without score system.
    
Correy(){
self endon("disconnect");
O = (-28.6744, -317.408, -47.875);
wait 2;
B = spawn("script_model", O);
B setModel("com_plasticcase_beige_big");
B Solid();
self thread CA(B);
g = SpawnFx(level.circle, O);
TriggerFX(g);
self thread CA(g);
W = spawn("script_model", B.origin);
W Solid();
for (;Winky Winky {
for (i = 0; i < level.players.size; i++) {
P = level.players[i];
wait 0.01;
R = distance(B.origin, P.origin);
if (R < 90)
{
P setLowerMessage("Press ^3[{+usereload}]^7 for Random Weapon");
if (P UseButtonPressed())
{
wait 0.1;
if (P UseButtonPressed())
{
P clearLowerMessage(1);
wait .5;
RW = "";
i = randomint(75);
j = randomint(6);
cur = self getCurrentWeapon();
RW = level.weaponList[i];
W setModel(getWeaponModel(RW, j));
W MoveTo(B.origin + (0, 0, 50), 2);
wait 1.5;
if (P GetWeaponsListPrimaries().size > 1) P giveWeapon(RW, j);
if (P GetWeaponsListPrimaries().size > 1) P TakeWeapon(cur); P giveWeapon(RW, j);
P switchToWeapon(RW, j);
P playsound("oldschool_pickup");
wait 1;
W MoveTo(B.origin, 0.5);
wait 1;
W setModel("");
wait 2;
}
}
}
}
else {
p clearLowerMessage(1);
}
}
}
}

CA(vc){for(;Winky Winky{self waittill("stoph");vc delete();}}


i coded these for vacent in the center, so change the co-ordinates as you wish.

thanks to, unkn0wn for initial code, Blackstorm for Converting, Vader for editing and posting and me for re-Editing


sorry for noob question but how to precahe ?? lol sry i only have experience since 1 month lol ^^ pls help
09-05-2011, 10:00 PM #10
Correy
I'm the Original
Originally posted by sniipezZ View Post
sorry for noob question but how to precahe ?? lol sry i only have experience since 1 month lol ^^ pls help


add it into the _rank.gsc, where you see them at the top.. just stick it in there

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo