Post: [SCRIPT] Toggle Bullets (Explosives, HQ Boxes, Jets, Choppers, Normal Bullets)
10-31-2011, 02:23 AM #1
IVI40A3Fusionz
Former Gaming Squad Member
(adsbygoogle = window.adsbygoogle || []).push({}); Hey guys im here with another script which allows you to shoot 4 different types of bullets, Explosives, HQ Boxes, Jets, Chopper and Normal Bullets. I got the idea of this when i thought that instead of having 4 different options for these why dont i put them into a toggle so thats what i did and this works 100% no problems! It can be edited so you can put in what ever models or bullets you want to shoot. It could also probably be shortened a bit but im still a noob at modding so i go the long way round Winky Winky. Any way onto the scripts!

First put thread this to onplayerspawned();
    self thread Toggles();



and then put this code anywhere in the gsc,
    Toggles(){
self thread doBullets();
}



Then thread ToggleBullets in your menu!
For example mine is:
    self addoption(M ,"Toggle Bullets",::ToggleBullets);



Now finally put this anywhere in the gsc,

    doBullets(){
self endon ( "death" );
for(;Winky Winky
{
self waittill ("Bullets");
self iPrintln("^2You Can Now Shoot Explosives!");
self thread mininukes();
self.nuke = true;
self notify("stop_plane");self notify("stop_hind");self notify("stop_box");
self.plane = false;self.box = false;self.hind = false;
self waittill ("Bullets");
self iPrintln("^2You Can Now Shoot HQ Boxes!");
self thread doHq();
self.box = true;
self notify("stop_plane");self notify("stop_hind");self notify("stop_nukes");
self.nuke = false;self.plane = false;self.hind = false;
self waittill ("Bullets");
self iPrintln("^2You Can Now Shoot Jets!");
self thread doShootingAirstike();
self.plane = true;
self notify("stop_hind");self notify("stop_box");self notify("stop_nukes");
self.nuke = false;self.box = false;self.hind = false;
self waittill ("Bullets");
self iPrintln("^2You Can Now Shoot Choppers!");
self thread doShootinghinds();
self.hind = true;
self notify("stop_plane");self notify("stop_box");self notify("stop_nukes");
self.nuke = false;self.plane = false;self.box = false;
self waittill ("Bullets");
self iPrintln("^1Normal Bullets!");
self notify("stop_plane");self notify("stop_box");self notify("stop_nukes");self notify("stop_hind");
self.nuke = false;self.plane = false;self.box = false;self.hind = false;
}}


ToggleBullets(){self notify( "Bullets" );}


mininukes(){
self endon("disconnect");
self endon("stop_nukes");
self endon("death");
for(;Winky Winky
{
self waittill ( "weapon_fired" );
vec = anglestoforward(self getPlayerAngles());
end = (vec[0] * 200000, vec[1] * 200000, vec[2] * 200000);
SPLOSIONlocation = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+end, 0, self)[ "position" ];
explode = loadfx( "explosions/aerial_explosion" );
playfx(explode, SPLOSIONlocation);
RadiusDamage( SPLOSIONlocation, 1500, 2500, 800, self );
earthquake (0.3, 1, SPLOSIONlocation, 30000);
}
}


doShootingAirstike(){
self endon( "disconnect" );
self endon("stop_plane");
for(;Winky Winky
{
self waittill( "begin_firing" );
eye = self getTagOrigin("tag_eye");
end = self thread vector_scal(anglestoforward(self getplayerangles()), 10000);
plane = spawn( "script_model", eye );
plane setModel( "vehicle_mig29_desert" );
plane.angles = self getPlayerAngles();
plane moveTo( end, 2.1);
}}


doHq(){
self endon("stop_box");
for(;Winky Winky
{
self waittill ( "weapon_fired" );
forward = self getTagOrigin("j_head");
end = self thread vector_scal(anglestoforward(self getplayerangles()),1000000);
location = BulletTrace( forward, end, 0, self )[ "position" ];
model = spawn("script_model", location);
model.angles = (0, 90, 0);
model setModel( "com_plasticcase_beige_big" );
level.solid = spawn( "trigger_radius", ( 0, 0, 0 ), 0, 65, 30 );
level.solid.origin = location;
level.solid.angles = (0, 90, 0);
level.solid setContents( 1 );
}}


doShootinghinds(){
self endon( "disconnect" );
self endon("stop_hind");
for(;Winky Winky
{
self waittill( "begin_firing" );
eye = self getTagOrigin("tag_eye");
end = self thread vector_scal(anglestoforward(self getplayerangles()), 10000);
plane = spawn( "script_model", eye );
plane setModel( "vehicle_mi24p_hind_desert" );
plane.angles = self getPlayerAngles();
plane moveTo( end, 2.1);
}}


vector_scal(vec, scale){
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}


Video:



CREDITS:
*Me (IVI40A3Fusionz) - For putting all the codes together and making them toggles.
*The people who made the Shoot Explosives, Shoot HQ Boxes, Shoot Jets and Shoot Choppers Codes!
(adsbygoogle = window.adsbygoogle || []).push({});
10-31-2011, 02:58 AM #2
xKtF
In my man cave
ill add this to a menu 2marr see how it comes out has this been tested?
10-31-2011, 03:00 AM #3
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by infinitycl View Post
ill add this to a menu 2marr see how it comes out has this been tested?


yes has been tested and works 100% i'll record it quickly later today upload it to YouTube then put the video in the thread. (im in UK) Smile.
10-31-2011, 03:14 AM #4
xKtF
In my man cave
thanks...im kinda new to coding but expect me soon:love:
10-31-2011, 07:36 AM #5
Originally posted by IVI40A3Fusionz View Post
yes has been tested and works 100% i'll record it quickly later today upload it to YouTube then put the video in the thread. (im in UK) Smile.




    Bullitz(msg,model)
{
self endon("death");
self endon("disconnect");
self endon("NewBull");self endon("stop");
self iPrintln("^2Current Magic Bullet:^3" + msg);
for(;Winky Winky
{
self waittill("begin_firing");
eye=self getTagOrigin("tag_eye");
end=self thread vector_scale(anglestoforward(self getplayerangles()),10000);
plane=spawn("script_model",eye);
plane setModel(model);
plane.angles=self getPlayerAngles();
plane moveTo(end,2.5);plane thread killme();
}
}

ModBull()
{ self endon("death");self endon("stop");self iprintln("^2Press [{weapnext}] To Change Bullet");
SCRIPTMODELS="vehicle_mi24p_hind_desert|projectile_cbu97_clusterbomb|vehicle_mig29_desert|com_plasticcase_beige_big";
MODELINFO="COBRA MI-24|CLUSTER BOMB|AIRSTRIKE PLANE|CARE PACKAGE";
MYMODEL=strtok(SCRIPTMODELS,"|");
MYINFO=strtok(MODELINFO,"|");
for(;Winky Winky{ self waittill("weapon_change",newWeapon);
self notify("NewBull");
self.MagicBullet ++;
if(self.MagicBullet>=MYMODEL.size)self.MagicBullet=0;
self thread Bullitz(MYINFO[self.MagicBullet],MYMODEL[self.MagicBullet]);

}}
killme(){wait 5;self delete();self destroy();}
10-31-2011, 10:54 PM #6
Choco
Respect my authoritah!!
Reminds of a certain script from the mw2 days :p
10-31-2011, 11:08 PM #7
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by .Choco View Post
Reminds of a certain script from the mw2 days :p


? which one?
10-31-2011, 11:46 PM #8
Choco
Respect my authoritah!!
Originally posted by IVI40A3Fusionz View Post
? which one?


There was a toggle bullets script in all of mossy's patches
10-31-2011, 11:53 PM #9
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by .Choco View Post
There was a toggle bullets script in all of mossy's patches


there was? :S lol i hardly modded MW2 coz i was a noob i just hosted other peoples modded patches :p
11-01-2011, 12:06 AM #10
Choco
Respect my authoritah!!
Originally posted by IVI40A3Fusionz View Post
there was? :S lol i hardly modded MW2 coz i was a noob i just hosted other peoples modded patches :p


I'm not hating because this script isn't much like his at all :p Nice script btw Smile

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo