Post: Release: Modded Bullets Code
01-04-2011, 04:45 PM #1
EliteMossy
TheDigitalBoard.com
(adsbygoogle = window.adsbygoogle || []).push({}); Add this to onPlayerConnect()
    
if(player isHost()){ player thread BuildBulletList(); }
player.PickedBullet=0;
player.ModdedBullets=0;


    
ModdedBullets() {
if (player.ModdedBullets) {
self notify("EndModBullet");
self.ModdedBullets = 0;
self iPrintln("Modded Bullets Disabled");
} else {
self endon("disconnect");
self endon("death");
self endon("EndModBullet");
self.ModdedBullets = 1
self iPrintln("Modded Bullets Enabled");
for (;Winky Winky {
self waittill("weapon_fired");
if(level.BulletIsModel[self.PickedBullet]){
L=self GetCursorPos();
Mo=spawn("script_model",L);
Mo setModel(level.BulletListCode[self.PickedBullet]);
Mo Solid();
if(level.BulletListName[self.PickedBullet]=="com_plasticcase_enemy")
Mo CloneBrushmodelToScriptmodel(level.airDropCrateCollision);
}else{
MagicBullet(level.BulletListCode[self.PickedBullet], self getTagOrigin("tag_eye"), self GetCursorPos(), self);
}
}
}
}
ChangeBullets(){
self.PickedBullet++;
if(lself.PickedBullet >= level.BulletListCode.size) self.PickedBullet = 0;
self iprintln("Selected Bullet : "+level.BulletListName[self.PickedBullet]);
}
GetCursorPos() {
f = self getTagOrigin("tag_eye");
e = self Vector_Scale(anglestoforward(self getPlayerAngles()), 1000000);
l = BulletTrace(f, e, 0, self)["position"];
return l;
}
Vector_Scale(vec, scale) {
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}
BuildBulletList(){
M=[];N=[];B=[];
M[M.size] = "ac130_25mm_mp";N[N.size] = "AC-130 25mm";B[B.size]=0;
M[M.size] = "ac130_40mm_mp";N[N.size] = "AC-130 40mm";B[B.size]=0;
M[M.size] = "ac130_105mm_mp";N[N.size] = "AC-130 105mm";B[B.size]=0;
M[M.size] = "at4_mp";N[N.size] = "AT4";B[B.size]=0;
M[M.size] = "rpg_mp";N[N.size] = "RPG";B[B.size]=0;
M[M.size] = "m79_mp";N[N.size] = "Grenade";B[B.size]=0;
M[M.size] = "javelin_mp";N[N.size] = "Javelin";B[B.size]=0;
M[M.size] = "stinger_mp";N[N.size] = "Stinger";B[B.size]=0;
M[M.size] = "remotemissile_projectile_mp";N[N.size] = "Predator";B[B.size]=0;
M[M.size] = "foliage_cod5_tree_jungle_01_animated";N[N.size] = "Jungle 1";B[B.size]=1;
M[M.size] = "com_plasticcase_enemy";N[N.size] = "Care Package";B[B.size]=1;
M[M.size] = "furniture_blowupdoll01";N[N.size] = "Blowup Doll";B[B.size]=1;
level.BulletListCode=M;
level.BulletListName=N;
level.BulletIsModel=B;
}
(adsbygoogle = window.adsbygoogle || []).push({});

The following 4 users say thank you to EliteMossy for this useful post:

CleanMODSHD, Dreamcather, Rebecca Black, Vampytwistッ
01-04-2011, 04:48 PM #2
DEREKTROTTER
You're Goddamn Right
more top coding, but wheres the predator missile bullet :O

---------- Post added at 11:48 AM ---------- Previous post was at 11:47 AM ----------

this wouldnt work for shooting models would it?
01-04-2011, 04:53 PM #3
EliteMossy
TheDigitalBoard.com
Originally posted by DEREKTROTTER View Post
more top coding, but wheres the predator missile bullet :O

---------- Post added at 11:48 AM ---------- Previous post was at 11:47 AM ----------

this wouldnt work for shooting models would it?


Haha, i will add it :p

---------- Post added at 11:50 AM ---------- Previous post was at 11:49 AM ----------

Fixed the code (because i had to modify it as my patch is different) :P

---------- Post added at 11:53 AM ---------- Previous post was at 11:50 AM ----------

Originally posted by DEREKTROTTER View Post
more top coding, but wheres the predator missile bullet :O

---------- Post added at 11:48 AM ---------- Previous post was at 11:47 AM ----------

this wouldnt work for shooting models would it?


No, but it could with a slight mod Winky Winky
01-04-2011, 04:53 PM #4
Originally posted by EliteMossy View Post
Haha, i will add it :p

---------- Post added at 11:50 AM ---------- Previous post was at 11:49 AM ----------

Fixed the code (because i had to modify it as my patch is different) :P


Nice, are you working on the worlds most abbrieviated patch?

The following user thanked x_DaftVader_x for this useful post:

JakeM
01-04-2011, 04:58 PM #5
DEREKTROTTER
You're Goddamn Right
Originally posted by EliteMossy View Post
Haha, i will add it :p

---------- Post added at 11:50 AM ---------- Previous post was at 11:49 AM ----------

Fixed the code (because i had to modify it as my patch is different) :P

---------- Post added at 11:53 AM ---------- Previous post was at 11:50 AM ----------



No, but it could with a slight mod Winky Winky


is all your patch coded like that lol

i tried putting ur hide+seek in the v8 but it wasn't having it, took the old one out fine. It would help cos the coding is a lot smaller
01-04-2011, 05:01 PM #6
EliteMossy
TheDigitalBoard.com
Updated the code for you Trotter
01-04-2011, 05:02 PM #7
Originally posted by EliteMossy View Post
Haha, i will add it :p

---------- Post added at 11:50 AM ---------- Previous post was at 11:49 AM ----------

Fixed the code (because i had to modify it as my patch is different) :P

---------- Post added at 11:53 AM ---------- Previous post was at 11:50 AM ----------



No, but it could with a slight mod Winky Winky


Just wondered, why do magic bullets always get tagged from the "eye" and not "weapon_left".. ?
01-04-2011, 05:04 PM #8
EliteMossy
TheDigitalBoard.com
Originally posted by Homer
Just wondered, why do magic bullets always get tagged from the "eye" and not "weapon_left".. ?


No idea, i have not tried it :P
01-04-2011, 05:04 PM #9
DEREKTROTTER
You're Goddamn Right
Originally posted by EliteMossy View Post
Updated the code for you Trotter


thanks, that was quick Dancing
01-04-2011, 05:07 PM #10
EliteMossy
TheDigitalBoard.com
Originally posted by DEREKTROTTER View Post
is all your patch coded like that lol

i tried putting ur hide+seek in the v8 but it wasn't having it, took the old one out fine. It would help cos the coding is a lot smaller


Updated above code,

Also what is wrong with hide and seek? :P

---------- Post added at 12:07 PM ---------- Previous post was at 12:04 PM ----------

This is how it looks in my patch
    
ModdedBullets(){self notify("EndModBullet");wait 0.1;self endon("disconnect");self endon("death");self endon("EndModBullet");for(;Winky Winky{self waittill("weapon_fired");MagicBullet(level.BulletListCode[level.p[self.myName]["SelectedBullet"]],self getTagOrigin("tag_eye"),self GetCursorPos(),self);}}
ChangeBullets(){level.p[self.myName]["SelectedBullet"]++;if(level.p[self.myName]["SelectedBullet"]>=level.BulletListCode.size)level.p[self.myName]["SelectedBullet"]=0;self PrintTXT("Selected Bullet",level.BulletListName[level.p[self.myName]["SelectedBullet"]]);}
BuildBulletList(){M=[];N=[];M[0]="ac130_25mm_mp";N[0]="AC-130 25mm";M[1]="ac130_40mm_mp";N[1]="AC-130 40mm";M[2]="ac130_105mm_mp";N[2]="AC-130 105mm";M[3]="at4_mp";N[3]="AT4";M[4]="rpg_mp";N[4]="RPG";M[5]="m79_mp";N[5]="Grenade";M[6]="javelin_mp";N[6]="Javelin";M[7]="stinger_mp";N[7]="Stinger";level.BulletListCode=M;level.BulletListName=N;}

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo