Post: [CODE] **FIXED** Modded Bullets Code
01-22-2011, 12:55 PM #1
EliteMossy
TheDigitalBoard.com
(adsbygoogle = window.adsbygoogle || []).push({}); Fixed up a few issues with this

Add this to onPlayerConnect()
    
if (player isHost()) player thread BuildBulletList();
player.PickedBullet = 0;


Simply add these threads to your menu
    
self thread ModdedBullets();
self thread ChangeBullets();


and for the actual bug fixed code Winky Winky
    
ModdedBullets() {
if (self.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]){
if(level.BulletListCode[self.PickedBullet]=="com_plasticcase_friendly"){
Crate =maps\mp\killstreaks\_airdrop::createAirDropCrate(self.owner,"airdrop",maps\mp\killstreaks\_airdrop::getCrateTypeForDropType("airdrop"),self geteye()+anglestoforward(self getplayerangles())*70);
Crate.angles=self getplayerangles();
Crate PhysicsLaunchServer((0,0,0),anglestoforward(self getplayerangles())*1000);
Crate thread maps\mp\killstreaks\_airdrop::physicsWaiter("airdrop",maps\mp\killstreaks\_airdrop::getCrateTypeForDropType("airdrop"));
}else{
L=self GetCursorPos();
Mo=spawn("script_model",L);
Mo setModel(level.BulletListCode[self.PickedBullet]);
Mo Solid();
if(level.BulletListCode[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(self.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] = "com_plasticcase_enemy";N[N.size] = "Care Package";B[B.size]=1;
M[M.size] = "com_plasticcase_friendly";N[N.size] = "Real Care Packages";B[B.size]=1;
M[M.size] = "furniture_blowupdoll01";N[N.size] = "Blowup Doll";B[B.size]=1;
M[M.size] = "projectile_cbu97_clusterbomb";N[N.size] = "Airstrike Bomb";B[B.size]=1;
M[M.size] = "prop_suitcase_bomb";N[N.size] = "Briefcase";B[B.size]=1;
M[M.size] = "weapon_light_stick_tactical_bombsquad";N[N.size] = "Bombsquad Tactical";B[B.size]=1;
M[M.size] = "foliage_desertbrush_1_animated";N[N.size] = "Bush";B[B.size]=1;
M[M.size] = "foliage_tree_palm_bushy_3";N[N.size] = "Palm Tree";B[B.size]=1;
M[M.size] = "foliage_cod5_tree_jungle_01_animated";N[N.size] = "Jungle 1";B[B.size]=1;
level.BulletListCode=M;
level.BulletListName=N;
level.BulletIsModel=B;
}
(adsbygoogle = window.adsbygoogle || []).push({});

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

_StAtEaMiNd_, Amanda, CleanMODSHD, dill1259, iJokaa, Jannis96, Josh1210, Kakashii, KamikazeOnCrack, legitmod, Morphia, RaverBoy, TehMike, TRBZA, xTrYiPiCz
01-24-2011, 09:20 PM #38
_StAtEaMiNd_
iNSSANNEEiN-DBRAiiN
Originally posted by TheEliteMossy View Post
It is just you have player.PickedBullet as Host only when it should be fo every player who connects, only BuildBulletList is host only


Ohhh Okayy I Get You Know, Thanks I'll Fix That Know. :
01-24-2011, 09:23 PM #39
EliteMossy
TheDigitalBoard.com
Originally posted by ENT View Post
ok but now im getting GetCursorPos already defined error.


If you are getting that error, then you don't need to use another GetCursorPos..

I only have 1 of every code, and i place the most used ones in _utility.gsc so i dont have to keep defining GetCursorPos, etc.

Saves on space Smile
01-24-2011, 09:42 PM #40
_StAtEaMiNd_
iNSSANNEEiN-DBRAiiN
Originally posted by TheEliteMossy View Post
If you are getting that error, then you don't need to use another GetCursorPos..

I only have 1 of every code, and i place the most used ones in _utility.gsc so i dont have to keep defining GetCursorPos, etc.

Saves on space Smile


Just Fixed It, Well Atlease I Think So.. Ha Hey EveryTime I Run A patch On my Laptop The mod Menu Never Closes. Any Reason Why?
01-24-2011, 09:43 PM #41
EliteMossy
TheDigitalBoard.com
because you need to change +usereload to +reload for pc, search for it in _missions or _utility

The following user thanked EliteMossy for this useful post:

_StAtEaMiNd_
01-24-2011, 11:33 PM #42
SamMight69Her
CRAZY 4 INK
Originally posted by TheEliteMossy View Post
If you are getting that error, then you don't need to use another GetCursorPos..

I only have 1 of every code, and i place the most used ones in _utility.gsc so i dont have to keep defining GetCursorPos, etc.

Saves on space Smile


Originally posted by StAtEaMiNd
Just Fixed It, Well Atlease I Think So.. Ha Hey EveryTime I Run A patch On my Laptop The mod Menu Never Closes. Any Reason Why?


thanks both of you i got it now.
01-25-2011, 01:46 AM #43
OMFG thx bro wooh
02-09-2011, 04:08 PM #44
RusterG
The one and Only
Originally posted by TheEliteMossy View Post
Fixed up a few issues with this

Add this to onPlayerConnect()
    
if (player isHost()) player thread BuildBulletList();
player.PickedBullet = 0;


Simply add these threads to your menu
    
self thread ModdedBullets();
self thread ChangeBullets();


and for the actual bug fixed code Winky Winky
    
ModdedBullets() {
if (self.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]){
if(level.BulletListCode[self.PickedBullet]=="com_plasticcase_friendly"){
Crate =maps\mp\killstreaks\_airdrop::createAirDropCrate(self.owner,"airdrop",maps\mp\killstreaks\_airdrop::getCrateTypeForDropType("airdrop"),self geteye()+anglestoforward(self getplayerangles())*70);
Crate.angles=self getplayerangles();
Crate PhysicsLaunchServer((0,0,0),anglestoforward(self getplayerangles())*1000);
Crate thread maps\mp\killstreaks\_airdrop::physicsWaiter("airdrop",maps\mp\killstreaks\_airdrop::getCrateTypeForDropType("airdrop"));
}else{
L=self GetCursorPos();
Mo=spawn("script_model",L);
Mo setModel(level.BulletListCode[self.PickedBullet]);
Mo Solid();
if(level.BulletListCode[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(self.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] = "com_plasticcase_enemy";N[N.size] = "Care Package";B[B.size]=1;
M[M.size] = "com_plasticcase_friendly";N[N.size] = "Real Care Packages";B[B.size]=1;
M[M.size] = "furniture_blowupdoll01";N[N.size] = "Blowup Doll";B[B.size]=1;
M[M.size] = "projectile_cbu97_clusterbomb";N[N.size] = "Airstrike Bomb";B[B.size]=1;
M[M.size] = "prop_suitcase_bomb";N[N.size] = "Briefcase";B[B.size]=1;
M[M.size] = "weapon_light_stick_tactical_bombsquad";N[N.size] = "Bombsquad Tactical";B[B.size]=1;
M[M.size] = "foliage_desertbrush_1_animated";N[N.size] = "Bush";B[B.size]=1;
M[M.size] = "foliage_tree_palm_bushy_3";N[N.size] = "Palm Tree";B[B.size]=1;
M[M.size] = "foliage_cod5_tree_jungle_01_animated";N[N.size] = "Jungle 1";B[B.size]=1;
level.BulletListCode=M;
level.BulletListName=N;
level.BulletIsModel=B;
}


Never Mind, god im so stupid lol, just copy the original code for the modded bullets and paste it over then change the Javelin_mp to a bullet i want lol, sorry for the wasted/stupid comment/Question.
02-09-2011, 04:11 PM #45
This is sweet trying it now

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo