Post: [SCRIPT] - Setting bullet types, the easy way!
07-13-2012, 03:52 AM #1
TOM DAINTY
Do a barrel roll!
(adsbygoogle = window.adsbygoogle || []).push({});
Got bored last night so I decided to code something for CoD5, because this section is dead. I will be coding a lot more stuff to bring to this section also as no one else does. Last night I Ended up making this which is a much easy and simpler way of setting your bullets as explosions or models etc. It's very easy to use and saves people making a different script for each bullet type. Smile

Note: Precache these in the init() located in the rank.gsc first.[/B]
precacheModel("german_shepherd_black");
precacheModel("defaultvehicle");
level.DefaultExplo = loadfx("explosions/default_explosion");

Example of menu Use using Karoolus Menu Base[/B]:
self.option[0][0] = "Dog Bullets";
self.function[0][0] = ::initBullets;
self.opt[0][0] = "Dogs";
    
initBullets( Type )
{
switch( Type )
{
case "Explosions":
self notify( "NewBullet" );
thread doBullets( "Explosions" );
break;
case "Cars":
self notify( "NewBullet" );
thread doBullets( "Cars", "defaultvehicle" );
break;
case "Dogs":
self notify( "NewBullet" );
thread doBullets( "Dogs", "german_shepherd_black" );
break;
case "None":
self notify( "NewBullet" );
self iPrintln( "Bullets: None" );
break;
}
}
doBullets( Type, Bullet )
{
self endon( "death" );
self endon( "NewBullet" );
self iPrintln( "Bullets: "+Type );
for(;Winky Winky
{
self waittill( "weapon_fired" );
my = self gettagorigin("j_head");
trace = bullettrace(my,my + anglestoforward(self getplayerangles())*100000,true,self)["position"];
if(Type == "Cars" || Type == "Dogs")
{
Model = spawn( "script_model", trace );
Model setModel( Bullet );
}
if(Type == "Explosions")
{
playfx(level.DefaultExplo,trace);
self playSound("vehicle_explo");
RadiusDamage(trace,250,50,20,self);
}
}
}

There's more codes where this came from Winky Winky
(adsbygoogle = window.adsbygoogle || []).push({});

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

Click_Tick_19, Harry, Hot-Fuzz-MoDz, Simple-_-Modz, Special-Modding
07-14-2012, 01:57 AM #2
Harry
Former Staff
awesome script man! using this in my w@w patch Winky Winky
07-14-2012, 01:57 AM #3
TOM DAINTY
Do a barrel roll!
Originally posted by Hxrry View Post
awesome script man! using this in my w@w patch Winky Winky


I thought you quit modding :confused: but thanks! Gonna try bring this section back to life

The following 2 users say thank you to TOM DAINTY for this useful post:

Click_Tick_19, Simple-_-Modz
07-14-2012, 10:44 AM #4
Harry
Former Staff
Originally posted by gstarizraw View Post
I thought you quit modding :confused: but thanks! Gonna try bring this section back to life


im not sure whether i've completely quit Winky Winky my goal is to code a patch for every cod, that just leaves me with a w@w patch aha ^^ you keep up this awesome work and you surely will :p

The following user thanked Harry for this useful post:

TOM DAINTY

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo