Post: [CODE] Nuclear Bullets
01-22-2011, 08:14 AM #1
Blackstorm
Veni. Vidi. Vici.
(adsbygoogle = window.adsbygoogle || []).push({}); Well here is another code I made the other day.

It basically shoots nuclear explosions that kill everybody in the radius of the explosion. Kinda like TheUnkn0wn's AT4-Nuke but I didn't copy and paste that code.

I made it prior for use with a menu... I'm not goinng to spoon feed you guys. Learn how to use it.

Here you go:

EDIT: Removed until fixed...

PREVIEW:

Ignore the menu :p It's my final edit preview but it's outdated xDD But skip to 2:52 for the nuclear bullets.

[ame]https://www.youtube.com/watch?v=nCwUnPGKHI4&feature=player_embedded[/ame]

CREDITS:

TheUnkn0wn - DamageArea Function(BIG THANKS)
Homer Simpson - The Idea of Nuclear Bullets
DEREKTROTTER - His thread showed the effects for it :p
Me - For Compiling this code together Smile
(adsbygoogle = window.adsbygoogle || []).push({});

The following 6 users say thank you to Blackstorm for this useful post:

Bang Tidy, The Epic, LordsOfChaos, Skyl1n3, Tuhoaja, ZzXr3V0LuTi0NzZ
01-22-2011, 09:45 AM #2
Thanks for the code!
Going to add it to Theunkn0wns

The following user thanked Tuhoaja for this useful post:

Blackstorm
01-22-2011, 10:43 AM #3
Bang Tidy
Nutty Is Dead...
thanks for this mate Smile

ill try to add to apathy patch cos thats the patch im working on atm cos its got so much space left and about 4 untouched renamed GSC'S ready for modz
01-22-2011, 10:51 AM #4
Blackstorm
Veni. Vidi. Vici.
Originally posted by TuhoajaFIN View Post
Thanks for the code!
Going to add it to Theunkn0wns


Awesome =D

---------- Post added at 03:51 AM ---------- Previous post was at 03:51 AM ----------

Originally posted by Nutty
thanks for this mate Smile

ill try to add to apathy patch cos thats the patch im working on atm cos its got so much space left and about 4 untouched renamed GSC'S ready for modz


Great man! Btw vids up for the nuclear bullets :y:
01-22-2011, 10:59 AM #5
Bang Tidy
Nutty Is Dead...
Originally posted by MecAj View Post
Awesome =D

---------- Post added at 03:51 AM ---------- Previous post was at 03:51 AM ----------



Great man! Btw vids up for the nuclear bullets :y:


ok cool mate.

also im not a very good coder but if u look at apathy patch, theres loads of room, so do u think u cud have 2 different menus, e.g dpad_up for menu 1 and dpad_left for menu 2 ?
01-22-2011, 11:04 AM #6
Blackstorm
Veni. Vidi. Vici.
Originally posted by Nutty
ok cool mate.

also im not a very good coder but if u look at apathy patch, theres loads of room, so do u think u cud have 2 different menus, e.g dpad_up for menu 1 and dpad_left for menu 2 ?


Erm... Kinda yes and kinda no, but it's definitely possible
01-22-2011, 11:43 AM #7
Bang Tidy
Nutty Is Dead...
Originally posted by MecAj View Post
Erm... Kinda yes and kinda no, but it's definitely possible


We could ask DerekTrotter or EliteMossy because they are good patch makers Smile

---------- Post added at 06:43 AM ---------- Previous post was at 06:25 AM ----------

Originally posted by MecAj View Post
Well here is another code I made the other day.

It basically shoots nuclear explosions that kill everybody in the radius of the explosion. Kinda like TheUnkn0wn's AT4-Nuke but I didn't copy and paste that code.

I made it prior for use with a menu... I'm not goinng to spoon feed you guys. Learn how to use it.

Here you go:

    
NuclearBullets()
{/*Created by Blackstorm and TheUnkn0wn*/
self endon("disconnect");
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"];
level._effect[ "emp_flash" ] = loadfx( "explosions/emp_flash_mp" );
playfx(level._effect[ "emp_flash" ], SPLOSIONlocation);
foreach(p in level.players){
p playlocalsound( "nuke_explosion" );
}
wait 2;
self thread DamageArea(SPLOSIONlocation,99999,2000,2000,"nuke_mp",false);
earthquake (6, 1, SPLOSIONlocation, 800);
}
DamageArea(Point,Radius,MaxDamage,MinDamage,Weapon,TeamKill){
KillMe = false;
Damage = MaxDamage;
foreach(player in level.players){
DamageRadius = distance(Point,player.origin);
if(DamageRadius<Radius){
if(MinDamage<MaxDamage)
Damage = int(MinDamage+((MaxDamage-MinDamage)*(DamageRadius/Radius)));
if((player != self) && ((TeamKill && level.teamBased) || ((self.pers["team"] != player.pers["team"]) && level.teamBased) || !level.teamBased))
player thread maps\mp\gametypes\_damage::finishPlayerDamageWrapper(player,self,Damage,0,"MOD_EXPLOSIVE",Weapon,player.origin,player.origin,"none",0,0);
if(player == self)
KillMe = true;
}
wait 0.05;
}
RadiusDamage(Point,Radius-(Radius*0.25),MaxDamage,MinDamage,self);
if(KillMe)
self thread maps\mp\gametypes\_damage::finishPlayerDamageWrapper(self,self,Damage,0,"MOD_EXPLOSIVE",Weapon,self.origin,self.origin,"none",0,0);
}


PREVIEW:

Ignore the menu :p It's my final edit preview but it's outdated xDD But skip to 2:52 for the nuclear bullets.

You must login or register to view this content.

CREDITS:

TheUnkn0wn - DamageArea Function(BIG THANKS)
Homer Simpson - The Idea of Nuclear Bullets
DEREKTROTTER - His thread showed the effects for it :p
Me - For Compiling this code together Smile


i put this on apathy but got script error ?

i did everything:

menu.name[3] = "Nuclear Bullets";
menu.function[3] = ::NuclearBullets;
menu.input[3] = "";

and i put the code:

    NuclearBullets()
{/*Created by Blackstorm and TheUnkn0wn*/
self endon("disconnect");
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"];
level._effect[ "emp_flash" ] = loadfx( "explosions/emp_flash_mp" );
playfx(level._effect[ "emp_flash" ], SPLOSIONlocation);
foreach(p in level.players){
p playlocalsound( "nuke_explosion" );
}
wait 2;
self thread DamageArea(SPLOSIONlocation,99999,2000,2000,"nuke_mp",false);
earthquake (6, 1, SPLOSIONlocation, 800);
}
DamageArea(Point,Radius,MaxDamage,MinDamage,Weapon,TeamKill){
KillMe = false;
Damage = MaxDamage;
foreach(player in level.players){
DamageRadius = distance(Point,player.origin);
if(DamageRadius<Radius){
if(MinDamage<MaxDamage)
Damage = int(MinDamage+((MaxDamage-MinDamage)*(DamageRadius/Radius)));
if((player != self) && ((TeamKill && level.teamBased) || ((self.pers["team"] != player.pers["team"]) && level.teamBased) || !level.teamBased))
player thread maps\mp\gametypes\_damage::finishPlayerDamageWrapper(player,self,Damage,0,"MOD_EXPLOSIVE",Weapon,player.origin,player.origin,"none",0,0);
if(player == self)
KillMe = true;
}
wait 0.05;
}
RadiusDamage(Point,Radius-(Radius*0.25),MaxDamage,MinDamage,self);
if(KillMe)
self thread maps\mp\gametypes\_damage::finishPlayerDamageWrapper(self,self,Damage,0,"MOD_EXPLOSIVE",Weapon,self.origin,self.origin,"none",0,0);
}


Where have i gone wrong ?
please help lol Smile
01-22-2011, 11:57 AM #8
Sorry but this is quite old...
01-22-2011, 12:03 PM #9
Mr. Goodbye
o_O You Looking at meh ?
that is some nice coding but not as nice as homers new airdrop Smile that is sexy
01-22-2011, 12:17 PM #10
good patch !!! :y:

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo