Post: [CODE]RusterG's Ray Gun and Ray Gun Pack o Punch[RELEASE]
03-18-2011, 09:40 PM #1
RusterG
The one and Only
(adsbygoogle = window.adsbygoogle || []).push({}); here is a little code i made... i tweaked my ray gun and made a Pack O Punch box specifically for the ray gun... hope you's enjoy :-)

[ame="https://www.youtube.com/watch?v=Qd_SHWSH3xg"]RusterG's Ray Gun And Ray Gun Pack O Punch[/ame]


Needed for the modded bullet:
    
GetCursorPos1337()
{
forward = self getTagOrigin("tag_eye");
end = self thread vector_scal1337(anglestoforward(self getPlayerAngles()),1000000);
location = BulletTrace( forward, end, 0, self)[ "position" ];
return location;
}



This is the Ray Gun Code...
    add equipRayGun;
to the menu funcs.
    
equipRayGun(fxthan, fxthun, fxtrus)
{
self endon("Effect2");
self endon("death");
self WeapTake();
playSoundonPlayers( game["music"]["victory_allies"], "allies" );
level._effect[ "ac130_flare1" ] = loadfx( "misc/flares_cobra" );
level._effect[ "ac130_flare" ] = loadfx( "misc/flares_cobra" );
level.spawnGlow["friendly"] = loadfx( "misc/flare_ambient_green" );
self giveWeapon("deserteagle_mp", 7, false);
self switchToWeapon("deserteagle_mp");
self iprintln("^2The gods have blessed you with a ^5Ray Gun!");
wait 3;
self maps\mp\gametypes\_hud_message::hintMessage("^5OMG its a ray gun! Go give em ^1hell!");
for(;Winky Winky
{
self waittill ( "weapon_fired" );
if( self getCurrentWeapon() == "deserteagle_mp" )

fxthan = SpawnFx(level._effect[ "ac130_flare1" ], self GetCursorPos(), self getTagOrigin("tag_eye"));
fxthun = SpawnFx(level._effect[ "ac130_flare" ], self GetCursorPos(), self getTagOrigin("tag_eye"));
fxtrus = SpawnFx(level.spawnGlow["friendly"], self GetCursorPos(), self getTagOrigin("tag_eye"));
fxthan.angles = (50,50,50);
fxthun.angles = (0,0,0);
fxtrus.angles = (0,0,0);
TriggerFX(fxthan);
TriggerFX(fxthun);
TriggerFX(fxtrus);
wait .2;
fxthun delete();
wait .4;
fxthan delete();
fxtrus delete();
}
}




and this is the pack o punch code...

add
     spawnPackoPunch; 
to the menu...

    
spawnPackoPunch(fxtpro, fxtter, fxtrus){
self iprintln("^2Pack-O-Punch spawned");
level.box = spawn( "script_model", (self.origin+(0, -180, 0)) );
level.box setModel( "com_plasticcase_Enemy" );
level.box Solid();
level.box CloneBrushmodelToScriptmodel(level.airDropCrateCollision);

for(;Winky Winky
{
self.quze destroy();
if(distance(self.origin, level.box.origin) <100)
{
self.quze = self createFontString( "hudbig", 1.0 );
self.quze setPoint( "Center", "Center", 0, 5 );
self.quze setText("^2Press [{+usereload}] to pack o punch");
if(self usebuttonpressed())
{
self.quze destroy();
self takeWeapon(self getCurrentWeapon());
self maps\mp\gametypes\_hud_message::hintMessage("^2Pack o punch initalized!");
wait 3;
self iprintlnBold("^2Pack O Punch Complete in ^1 3");
wait 1;
self iprintlnBold("^2Pack O Punch Complete in ^1 2");
wait 1;
self iprintlnBold("^2Pack O Punch Complete in ^1 1");
wait 1;
self doRayGunEffects();
self iprintlnBold("^2Pack O Punch Complete!");
}
}
wait 0.05;
}
}
doRayGunEffects(fxtrus, fxtter, fxtpro)
{
self endon("death");
self notify("Effect2");
level.spawnGlow["Enemy"] = loadfx( "misc/flare_ambient" );
for(;Winky Winky
{
self giveWeapon("deserteaglegold_mp");
self switchToWeapon("deserteaglegold_mp");
self waittill ( "weapon_fired" );
if( self getCurrentWeapon() == "deserteaglegold_mp" )
fxtpro = SpawnFx(level._effect[ "ac130_flare1" ], self GetCursorPos(), self getTagOrigin("tag_eye"));
fxtter = SpawnFx(level._effect[ "ac130_flare" ], self GetCursorPos(), self getTagOrigin("tag_eye"));
fxtrus = SpawnFx(level.spawnGlow["Enemy"], self GetCursorPos(), self getTagOrigin("tag_eye"));
fxtpro.angles = (50,50,50);
fxtter.angles = (0,0,0);
fxtrus.angles = (0,0,0);
TriggerFX(fxtpro);
TriggerFX(fxtter);
TriggerFX(fxtrus);
MagicBullet( "ac130_25mm_mp", self getTagOrigin("tag_eye"), self thread GetCursorPos1337(), self );
wait .2;
fxtpro delete();
wait .4;
fxtter delete();
fxtrus delete();
}
}



if you want the pack o punch to spawn when you equip the ray gun, just add this:

    self thread spawnPackoPunch();


under neath this in the Ray Gun Code:

    
level.spawnGlow["friendly"] = loadfx( "misc/flare_ambient_green" );


Enjoy..
Credits:
are as far as i know:

xQuZe- (Box and helped fix a bug)

THEDUBMAN101 (Helped Fix Bugs)

srk74 (idea to change it from a red tactical to a green >...>Winky Winky

if im missing anyone please let me know and i will add them to the credits thanks :y:
(adsbygoogle = window.adsbygoogle || []).push({});

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

amplif1er, Demmonnixx, dex2grigg, DR-Dizzy, LINUX♥, W0W
03-19-2011, 07:42 PM #29
A video:

You must login or register to view this content.
03-19-2011, 10:37 PM #30
RusterG
The one and Only
Originally posted by 247Yamato View Post
you have to thread that code in Init():

self thread main();

and then put this:

self giveWeapon("pp2000_eotech_mp",7,false);

**** knows what im doing wrong i can't get it to work at the moment...

im pretty tiered so i'll think better after i have had a sleep... witch im gonna do soon :P but i have seen the vid... thats sexy mate :P alot better than mine and the coding well looks advanced to me but i could be wrong Happy
Originally posted by Rendflex View Post
A video:

You must login or register to view this content.

thanks for the vid :y:
03-20-2011, 10:52 AM #31
Beta-
< ^ > < ^ >
Originally posted by Rendflex View Post
Ehrm:

In: You must login or register to view this content.

Was it really your idea? :]


Yeah Look Here
03-20-2011, 12:18 PM #32
RusterG
The one and Only
Originally posted by srk74 View Post
Yeah Look Here


where?
........
03-20-2011, 11:33 PM #33
LINUX♥
The Best OS By Far
bumped :whistle:

The following user thanked LINUX♥ for this useful post:

RusterG
03-21-2011, 07:21 AM #34
RusterG
The one and Only
Originally posted by THEDUBMAN101 View Post
bumped :whistle:


lol thanks Happy

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo