Post: [RELEASE] Reaper
02-17-2012, 01:36 AM #1
Blackstorm
Veni. Vidi. Vici.
(adsbygoogle = window.adsbygoogle || []).push({}); Well, here it is. No point in not releasing it. Smile

make sure you have these at the top of your GSC!
    
#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;


Add this to init()
    
precacheShader("ac130_overlay_105mm");
level.fx[0]=loadfx("fire/fire_smoke_trail_m");
level.fx[1]=loadfx("fire/tank_fire_engine");
level.fx[2]=loadfx("smoke/smoke_trail_black_heli");
level.chopper_fx["explode"]["medium"] = loadfx("explosions/aerial_explosion");


put this in OnPlayerSpawned() :
    
self thread monitorButtons();


Add this anywhere:
    
giveReaper()
{
self endon( "disconnect" );
self endon( "death" );
if( !isDefined( level.reaperInUse ) )
level.reaperInUse = 0;
self thread monitorDeath();
self.inReaper = 0;
self.showHUD = 0;
self thread reaperHUD();
cW = [];
curWeapon = 0;
for( ;; )
{
self waittillmatch( "buttonPress", "Right" );
if( !self.isShooting )
{
if( !level.reaperInUse * !self.inReaper || level.reaperInUse * self.inReaper)
{
self.inReaper = !self.inReaper;
level.reaperInUse = !level.reaperInUse;
if( self.inReaper * level.reaperInUse )
{
cW[0] = self GetWeaponsListPrimaries();
cW[1] = self getWeaponsListOffhands();
curWeapon = self getCurrentWeapon();
self takeAllWeapons();
self giveWeapon( "killstreak_ac130_mp" );
self switchToWeapon( "killstreak_ac130_mp" );
wait 1.5;
self VisionSetNakedForPlayer( "black_bw" );
wait .25;
self.showHUD = 1;
self PlayerLinkWeaponviewToDelta( level.ac130, "tag_player", 1.0, 35, 35, 35, 35 );
wait .15;
self ThermalVisionFOFOverlayOn();
self ThermalVisionOn();
self VisionSetThermalForPlayer( getDvar( "mapname" ) );
self thread monitorFire();
}
else if( !level.reaperInUse * !self.inReaper )
{
self thermalVisionOff();
self notify( "closed" );
self visionSetNakedForPlayer( "black_bw" );
self.showHUD = 0;
self unlink();self setClientDvar( "cg_fovmin", 1 );
wait .25;
self visionSetNakedForPlayer( getDvar( "mapname" ));
self thermalvisionFOFOverlayOff();
self takeWeapon( "killstreak_ac130_mp" );
for( i = 0; i < cW[0].size; i++ )
self giveWeapon( cW[0][i] );
for( i = 0; i < cW[1].size; i++ )
self giveWeapon( cW[1][i] );
wait .25;
self switchToWeapon( curWeapon );
}
}
}
else
self iPrintlnBold( "^7ERROR: Can't close laptop while missile is being fired" );
}
}


monitorFire()
{
self endon( "disconnect" );
self endon( "closed" );
zoom = 60;
self.isShooting = 0;
for( ; isAlive( self ) * self.inReaper; )
{
self setClientDvar( "cg_fovmin", zoom );
self waittill( "buttonPress", button );
if( button == "RS" )
{
if( zoom == 60 )
zoom = 10;
else
zoom = 60;
}
else if( button == "RT" )
{
self.isShooting = 1;
earthquake( 0.2, 1, self getEye(), 1000 );
self playLocalSound( "ac130_105mm_fire" );
missile = spawn( "script_model", self getEye() - ( 0, 0, 30 ) );
missile setModel( "projectile_cbu97_clusterbomb" );
missile playLoopSound("veh_b2_dist_loop");
missile missileControl( self );
missile playSound("harrier_jet_crash");
missile delete();
self.isShooting = 0;
}
}
}


missileControl( shooter )
{
turnSpeed = .05;
rollAngle = 0;
vecParts = 0;
v = 0;
vec = 0;
for ( ;; )
{
for( i = 0; i < level.fx.size; i++ )
playFX( level.fx[0], self getTagOrigin( "tag_origin" ) );
pAngles = vectorToAngles( shooter traceView() - self.origin );
self.angles = pAngles;
flyLocation = self.origin + anglesToForward( pAngles ) * 100;
self moveTo( flyLocation, .05 );
if( distance( shooter traceView(), self.origin ) < 70 )
{
origins = "200 0 0|0 200 0|200 200 0|0 0 200|100 0 0|0 100 0|100 100 0|0 0 100";
playFX( level.chopper_fx["explode"]["medium"], shooter traceView() );
vecParts = strTok( origins, "|" );
for ( i = 0; i < vecParts.size; i++ )
{
v = strTok( vecParts[i], " " );
vec = ( int( v[0] ), int( v[1] ), int( v[2] ) );
playFX( level.chopper_fx["explode"]["medium"], shooter traceView() - vec );
playFX( level.chopper_fx["explode"]["medium"], shooter traceView() + vec );
}
earthquake( 3, 1.5, shooter traceView(), 800 );
RadiusDamage( shooter traceView(), 500, 350, 50, shooter );
break;
}
wait .05;
}
}


reaperHUD()
{
self endon( "disconnect" );
reapHUD = newClientHudElem( self );
reapHUD.x = 0;
reapHUD.y = 0;
reapHUD.alignX = "center";
reapHUD.alignY = "middle";
reapHUD.horzAlign = "center";
reapHUD.vertAlign = "middle";
reapHUD.foreground = true;
reapHUD.alpha = 1;
reapHUD setShader( "ac130_overlay_105mm", 640, 480 );
for( ; isAlive( self ) ; )
{
reapHUD.alpha = self.showHUD;
wait .05;
}
reapHUD destroy();
}


monitorDeath()
{
self waittill( "death" );
self unlink();
if( self.inReaper )
{
level.reaperInUse = 0;
self.inReaper = 0;
}
}


TraceView()
{
return BulletTrace(self getEye(), anglesToForward(self getPlayerAngles()) * 1000000, 1, self)["position"];
}


monitorButtons()
{
self endon( "disconnect" );
self endon( "death" );
ent = spawnStruct();
buttons = strTok( "Right|+actionslot 4;RS|+melee;RT|+attack", ";" );
for( i = 0; i < buttons.size; i++ )
{
split = strTok( buttons[i], "|" );
self notifyOnPlayerCommand( split[0], split[1] );
}
for( ;; )
{
for( i = 0; i < buttons.size; i++ )
{
button = strTok( buttons[i], "|" );
self thread waittill_string( button[0], ent );
}
ent waittill( "returned", btn );
ent notify( "die" );
self notify( "buttonPress", btn );
}
}


then to give someone a reaper just call it like this:
    
self thread giveReaper();


how much easier could this be?

Press knife (melee) to zoom in and out, and attack (shoot) to fire, and press right to enter/exit the reaper.

ENJOOOOY =D

Credits:

TheUnkn0wn - Effects
247Yamato - For a sound effect
Lost4468 - His scripts helped me understand stuff :p
(adsbygoogle = window.adsbygoogle || []).push({});

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

aerosoul94, Amanda, BlazingDope, KCxFTW, KingcreekS, Klots, User23434, mattyjkilledme, Rainbow Gravity

The following user groaned Blackstorm for this awful post:

Cmd-X
02-18-2012, 12:03 AM #20
Blackstorm
Veni. Vidi. Vici.
Originally posted by darkcarnival View Post
Yours will be better, because you add one thing to your codes that Blackstorm doesn't... Love.


I make my codes with love wtf :FU:

The following user thanked Blackstorm for this useful post:

Cmd-X
02-18-2012, 12:07 AM #21
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by Blackstorm View Post
I make my codes with love wtf :FU:


That made me lol.

The following user thanked IVI40A3Fusionz for this useful post:

Blackstorm
02-18-2012, 12:07 AM #22
Cmd-X
It's been awhile.
Originally posted by Blackstorm View Post
I make my codes with love wtf :FU:


It doesn't seem like it.. You must respect the codes if you want the best feedback. That is my advice, respect the codes, and love them, they need love.
02-18-2012, 12:13 AM #23
Blackstorm
Veni. Vidi. Vici.
Originally posted by darkcarnival View Post
It doesn't seem like it.. You must respect the codes if you want the best feedback. That is my advice, respect the codes, and love them, they need love.


Respect this. *points at penis*
02-18-2012, 12:15 AM #24
Cmd-X
It's been awhile.
Originally posted by Blackstorm View Post
Respect this. *points at penis*


Who's penis are you pointing at? The one you don't have?
02-18-2012, 12:16 AM #25
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by Blackstorm View Post
Respect this. *points at penis*


BTW your sig = BAWS!

(I'm talking about the sexy Blackstorm picture Winky Winky).
02-18-2012, 12:18 AM #26
Blackstorm
Veni. Vidi. Vici.
Originally posted by IVI40A3Fusionz View Post
BTW your sig = BAWS!

(I'm talking about the sexy Blackstorm picture Winky Winky).



meow made it :happycry:
02-18-2012, 12:20 AM #27
Blackstorm
Veni. Vidi. Vici.
Originally posted by darkcarnival View Post
Who's penis are you pointing at? The one you don't have?


You must login or register to view this content.

The following user thanked Blackstorm for this useful post:

Cmd-X
02-18-2012, 12:28 AM #28
Originally posted by Blackstorm View Post
Well, here it is. No point in not releasing it. Smile

Add this to init()
    
precacheShader("ac130_overlay_105mm");
level.fx[0]=loadfx("fire/fire_smoke_trail_m");
level.fx[1]=loadfx("fire/tank_fire_engine");
level.fx[2]=loadfx("smoke/smoke_trail_black_heli");
level.chopper_fx["explode"]["medium"] = loadfx("explosions/aerial_explosion");

put this in OnPlayerSpawned() :
    
self thread monitorButtons();


Add this anywhere:
    
giveReaper()
{
self endon( "disconnect" );
self endon( "death" );
if( !isDefined( level.reaperInUse ) )
level.reaperInUse = 0;
self thread monitorDeath();
self.inReaper = 0;
self.showHUD = 0;
self thread reaperHUD();
cW = [];
curWeapon = 0;
for( ;; )
{
self waittillmatch( "buttonPress", "Right" );
if( !self.isShooting )
{
if( !level.reaperInUse * !self.inReaper || level.reaperInUse * self.inReaper)
{
self.inReaper = !self.inReaper;
level.reaperInUse = !level.reaperInUse;
if( self.inReaper * level.reaperInUse )
{
cW[0] = self GetWeaponsListPrimaries();
cW[1] = self getWeaponsListOffhands();
curWeapon = self getCurrentWeapon();
self takeAllWeapons();
self giveWeapon( "killstreak_ac130_mp" );
self switchToWeapon( "killstreak_ac130_mp" );
wait 1.5;
self VisionSetNakedForPlayer( "black_bw" );
wait .25;
self.showHUD = 1;
self PlayerLinkWeaponviewToDelta( level.ac130, "tag_player", 1.0, 35, 35, 35, 35 );
wait .15;
self ThermalVisionFOFOverlayOn();
self ThermalVisionOn();
self VisionSetThermalForPlayer( getDvar( "mapname" ) );
self thread monitorFire();
}
else if( !level.reaperInUse * !self.inReaper )
{
self thermalVisionOff();
self notify( "closed" );
self visionSetNakedForPlayer( "black_bw" );
self.showHUD = 0;
self unlink();self setClientDvar( "cg_fovmin", 1 );
wait .25;
self visionSetNakedForPlayer( getDvar( "mapname" ));
self thermalvisionFOFOverlayOff();
self takeWeapon( "killstreak_ac130_mp" );
for( i = 0; i < cW[0].size; i++ )
self giveWeapon( cW[0][i] );
for( i = 0; i < cW[1].size; i++ )
self giveWeapon( cW[1][i] );
wait .25;
self switchToWeapon( curWeapon );
}
}
}
else
self iPrintlnBold( "^7ERROR: Can't close laptop while missile is being fired" );
}
}


monitorFire()
{
self endon( "disconnect" );
self endon( "closed" );
zoom = 60;
self.isShooting = 0;
for( ; isAlive( self ) * self.inReaper; )
{
self setClientDvar( "cg_fovmin", zoom );
self waittill( "buttonPress", button );
if( button == "RS" )
{
if( zoom == 60 )
zoom = 10;
else
zoom = 60;
}
else if( button == "RT" )
{
self.isShooting = 1;
earthquake( 0.2, 1, self getEye(), 1000 );
self playLocalSound( "ac130_105mm_fire" );
missile = spawn( "script_model", self getEye() - ( 0, 0, 30 ) );
missile setModel( "projectile_cbu97_clusterbomb" );
missile playLoopSound("veh_b2_dist_loop");
missile missileControl( self );
missile playSound("harrier_jet_crash");
missile delete();
self.isShooting = 0;
}
}
}


missileControl( shooter )
{
turnSpeed = .05;
rollAngle = 0;
vecParts = 0;
v = 0;
vec = 0;
for ( ;; )
{
for( i = 0; i < level.fx.size; i++ )
playFX( level.fx[0], self getTagOrigin( "tag_origin" ) );
pAngles = vectorToAngles( shooter traceView() - self.origin );
self.angles = pAngles;
flyLocation = self.origin + anglesToForward( pAngles ) * 100;
self moveTo( flyLocation, .05 );
if( distance( shooter traceView(), self.origin ) < 70 )
{
origins = "200 0 0|0 200 0|200 200 0|0 0 200|100 0 0|0 100 0|100 100 0|0 0 100";
playFX( level.chopper_fx["explode"]["medium"], shooter traceView() );
vecParts = strTok( origins, "|" );
for ( i = 0; i < vecParts.size; i++ )
{
v = strTok( vecParts[i], " " );
vec = ( int( v[0] ), int( v[1] ), int( v[2] ) );
playFX( level.chopper_fx["explode"]["medium"], shooter traceView() - vec );
playFX( level.chopper_fx["explode"]["medium"], shooter traceView() + vec );
}
earthquake( 3, 1.5, shooter traceView(), 800 );
RadiusDamage( shooter traceView(), 500, 350, 50, shooter );
break;
}
wait .05;
}
}


reaperHUD()
{
self endon( "disconnect" );
reapHUD = newClientHudElem( self );
reapHUD.x = 0;
reapHUD.y = 0;
reapHUD.alignX = "center";
reapHUD.alignY = "middle";
reapHUD.horzAlign = "center";
reapHUD.vertAlign = "middle";
reapHUD.foreground = true;
reapHUD.alpha = 1;
reapHUD setShader( "ac130_overlay_105mm", 640, 480 );
for( ; isAlive( self ) ; )
{
reapHUD.alpha = self.showHUD;
wait .05;
}
reapHUD destroy();
}


monitorDeath()
{
self waittill( "death" );
self unlink();
if( self.inReaper )
{
level.reaperInUse = 0;
self.inReaper = 0;
}
}


TraceView()
{
return BulletTrace(self getEye(), anglesToForward(self getPlayerAngles()) * 1000000, 1, self)["position"];
}


monitorButtons()
{
self endon( "disconnect" );
self endon( "death" );
ent = spawnStruct();
buttons = strTok( "Right|+actionslot 4;RS|+melee;RT|+attack", ";" );
for( i = 0; i < buttons.size; i++ )
{
split = strTok( buttons[i], "|" );
self notifyOnPlayerCommand( split[0], split[1] );
}
for( ;; )
{
for( i = 0; i < buttons.size; i++ )
{
button = strTok( buttons[i], "|" );
self thread waittill_string( button[0], ent );
}
ent waittill( "returned", btn );
ent notify( "die" );
self notify( "buttonPress", btn );
}
}


then to give someone a reaper just call it like this:
    
self thread giveReaper();


how much easier could this be?

Press knife (melee) to zoom in and out, and attack (shoot) to fire, and press right to enter/exit the reaper.

ENJOOOOY =D

Credits:

TheUnkn0wn - Effects
247Yamato - For a sound effect
Lost4468 - His scripts helped me understand stuff :p

What do i do if i get it as unknown function

---------- Post added at 07:28 PM ---------- Previous post was at 07:27 PM ----------

I Get inknown function what do i do

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo