Post: [CODE] Dolphin Dive in MW2
02-27-2011, 08:32 PM #1
xQuZe-
You talkin to me?
(adsbygoogle = window.adsbygoogle || []).push({});
Dolphin Dive


Video:
[ame="https://www.youtube.com/watch?v=tGTgHMhjfkg"]Dolphin Dive[/ame]



Originally posted by another user
Yup, this is for MW2. Made this code because i wanted the abillity to dolphin dive in mw2.
I know it doesn't look that sexy but it's a start.
A good coder like derek or mossy could pick this up and make it better.
You can remove the HUDmessage if you want.
If you put this on onplayerspawned() it's just like a normal button.
It's just as in BO, Sprint and Circle.





Code:
    
Dive()
{
self endon("disconnect");
self maps\mp\gametypes\_hud_message::hintMessage("Press [{+breath_sprint}] and [{+stance}] to dive.");
self notifyOnPlayerCommand( "Run", "+breath_sprint" );
self notifyOnPlayerCommand( "Dive", "+stance" );
for(;Winky Winky
{
self waittill( "Run" );
self waittill( "Dive" );
self setPlayerAngles(self.angles + (22, 0, 0));
self setOrigin(self.origin+(0,0,25));
wait .01;
forward = self getTagOrigin("j_head");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
MaCrosshair = BulletTrace( forward, end, 0, self )[ "position" ];
setDvar("timescale", 0.4 );
wait .01;
self setOrigin(MaCrosshair+(0,0,0));
self SetStance( "prone" );
self freezeControls(true);
wait .2;
setDvar("timescale", 1.0 );
wait .5;
self freezeControls(false);
}
}
vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}


In 1 line:
    Dive(){self endon("disconnect");self maps\mp\gametypes\_hud_message::hintMessage("Press [{+breath_sprint}] and [{+stance}] to dive."); self notifyOnPlayerCommand( "Run", "+breath_sprint" );self notifyOnPlayerCommand( "Dive", "+stance" ); for(;Winky Winky {self waittill( "Run" );self waittill( "Dive" );self setPlayerAngles(self.angles + (22, 0, 0));self setOrigin(self.origin+(0,0,25));wait .01;forward = self getTagOrigin("j_head");        end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);        MaCrosshair = BulletTrace( forward, end, 0, self )[ "position" ];setDvar("timescale", 0.4 );wait .01;self setOrigin(MaCrosshair+(0,0,0));self SetStance( "prone" );self freezeControls(true);wait .2;                setDvar("timescale", 1.0 );wait .5;self freezeControls(false);}}vector_scal(vec, scale){        vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);        return vec;}

(adsbygoogle = window.adsbygoogle || []).push({});

The following 17 users say thank you to xQuZe- for this useful post:

Beta-, Brian235026, CleanMODSHD, Correy, emersons35, Fifa97, I am Mara, Man Dime, matt944057, maxrox, Mr. Aimbot, Ninja, Officer Laggy, oGHOSTLYMODZ, PussayPatrol, ViiZiiKz, xT4sSin
02-27-2011, 11:05 PM #29
Blackstorm
Veni. Vidi. Vici.
Originally posted by xQuZe
Yea i know dude but when i did it it only dived to one direction. And now it works in every direction and it aims down before diving so you aint flying 3123124miles. Just a perfect range. I added a sexy slomo.


You should use SetSlowMotion function.

The following user thanked Blackstorm for this useful post:

I Got Cookies
02-27-2011, 11:14 PM #30
Originally posted by xQuZe
Fixed Code. Made it more diving. New video.


this looks much betterClaps
02-27-2011, 11:43 PM #31
Man Dime
▶ ♥ Bieber Fever ♥ ◀
Originally posted by xQuZe
Dolphin Dive


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







Code:
    
Dive()
{
self endon("disconnect");
self maps\mp\gametypes\_hud_message::hintMessage("Press [{+breath_sprint}] and [{+stance}] to dive.");
self notifyOnPlayerCommand( "Run", "+breath_sprint" );
self notifyOnPlayerCommand( "Dive", "+stance" );
for(;Winky Winky
{
self waittill( "Run" );
self waittill( "Dive" );
self setPlayerAngles(self.angles + (22, 0, 0));
self setOrigin(self.origin+(0,0,25));
wait .01;
forward = self getTagOrigin("j_head");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
MaCrosshair = BulletTrace( forward, end, 0, self )[ "position" ];
setDvar("timescale", 0.4 );
wait .01;
self setOrigin(MaCrosshair+(0,0,0));
self SetStance( "prone" );
self freezeControls(true);
wait .2;
setDvar("timescale", 1.0 );
wait .5;
self freezeControls(false);
}
}
vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}


In 1 line:
    Dive(){self endon("disconnect");self maps\mp\gametypes\_hud_message::hintMessage("Press [{+breath_sprint}] and [{+stance}] to dive."); self notifyOnPlayerCommand( "Run", "+breath_sprint" );self notifyOnPlayerCommand( "Dive", "+stance" ); for(;Winky Winky {self waittill( "Run" );self waittill( "Dive" );self setPlayerAngles(self.angles + (22, 0, 0));self setOrigin(self.origin+(0,0,25));wait .01;forward = self getTagOrigin("j_head");        end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);        MaCrosshair = BulletTrace( forward, end, 0, self )[ "position" ];setDvar("timescale", 0.4 );wait .01;self setOrigin(MaCrosshair+(0,0,0));self SetStance( "prone" );self freezeControls(true);wait .2;                setDvar("timescale", 1.0 );wait .5;self freezeControls(false);}}vector_scal(vec, scale){        vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);        return vec;}



Now that's what I call music!!... I mean dolphin dive :mudkip:
02-28-2011, 12:48 AM #32
DEXMoDzFTW
Vault dweller
Originally posted by xQuZe
Dolphin Dive


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







Code:
    
Dive()
{
self endon("disconnect");
self maps\mp\gametypes\_hud_message::hintMessage("Press [{+breath_sprint}] and [{+stance}] to dive.");
self notifyOnPlayerCommand( "Run", "+breath_sprint" );
self notifyOnPlayerCommand( "Dive", "+stance" );
for(;Winky Winky
{
self waittill( "Run" );
self waittill( "Dive" );
self setPlayerAngles(self.angles + (22, 0, 0));
self setOrigin(self.origin+(0,0,25));
wait .01;
forward = self getTagOrigin("j_head");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
MaCrosshair = BulletTrace( forward, end, 0, self )[ "position" ];
setDvar("timescale", 0.4 );
wait .01;
self setOrigin(MaCrosshair+(0,0,0));
self SetStance( "prone" );
self freezeControls(true);
wait .2;
setDvar("timescale", 1.0 );
wait .5;
self freezeControls(false);
}
}
vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}


In 1 line:
    Dive(){self endon("disconnect");self maps\mp\gametypes\_hud_message::hintMessage("Press [{+breath_sprint}] and [{+stance}] to dive."); self notifyOnPlayerCommand( "Run", "+breath_sprint" );self notifyOnPlayerCommand( "Dive", "+stance" ); for(;Winky Winky {self waittill( "Run" );self waittill( "Dive" );self setPlayerAngles(self.angles + (22, 0, 0));self setOrigin(self.origin+(0,0,25));wait .01;forward = self getTagOrigin("j_head");        end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);        MaCrosshair = BulletTrace( forward, end, 0, self )[ "position" ];setDvar("timescale", 0.4 );wait .01;self setOrigin(MaCrosshair+(0,0,0));self SetStance( "prone" );self freezeControls(true);wait .2;                setDvar("timescale", 1.0 );wait .5;self freezeControls(false);}}vector_scal(vec, scale){        vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);        return vec;}



haha nice code lol very good made me laughh ClapsClapsClaps

The following user thanked DEXMoDzFTW for this useful post:

Killer1478
02-28-2011, 10:19 AM #33
xQuZe-
You talkin to me?
Originally posted by Chrom3
Now that's what I call music!!... I mean dolphin dive :mudkip:


Haha lol:mudkip:
02-28-2011, 10:41 AM #34
This is sick as Happy
02-28-2011, 12:06 PM #35
Beta-
< ^ > < ^ >
Ultra Cool Code BRO :y:

Originally posted by xQuZe
Dolphin Dive


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







Code:
    
Dive()
{
self endon("disconnect");
self maps\mp\gametypes\_hud_message::hintMessage("Press [{+breath_sprint}] and [{+stance}] to dive.");
self notifyOnPlayerCommand( "Run", "+breath_sprint" );
self notifyOnPlayerCommand( "Dive", "+stance" );
for(;Winky Winky
{
self waittill( "Run" );
self waittill( "Dive" );
self setPlayerAngles(self.angles + (22, 0, 0));
self setOrigin(self.origin+(0,0,25));
wait .01;
forward = self getTagOrigin("j_head");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
MaCrosshair = BulletTrace( forward, end, 0, self )[ "position" ];
setDvar("timescale", 0.4 );
wait .01;
self setOrigin(MaCrosshair+(0,0,0));
self SetStance( "prone" );
self freezeControls(true);
wait .2;
setDvar("timescale", 1.0 );
wait .5;
self freezeControls(false);
}
}
vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}


In 1 line:
    Dive(){self endon("disconnect");self maps\mp\gametypes\_hud_message::hintMessage("Press [{+breath_sprint}] and [{+stance}] to dive."); self notifyOnPlayerCommand( "Run", "+breath_sprint" );self notifyOnPlayerCommand( "Dive", "+stance" ); for(;Winky Winky {self waittill( "Run" );self waittill( "Dive" );self setPlayerAngles(self.angles + (22, 0, 0));self setOrigin(self.origin+(0,0,25));wait .01;forward = self getTagOrigin("j_head");        end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);        MaCrosshair = BulletTrace( forward, end, 0, self )[ "position" ];setDvar("timescale", 0.4 );wait .01;self setOrigin(MaCrosshair+(0,0,0));self SetStance( "prone" );self freezeControls(true);wait .2;                setDvar("timescale", 1.0 );wait .5;self freezeControls(false);}}vector_scal(vec, scale){        vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);        return vec;}

02-28-2011, 06:05 PM #36
ill be using this
02-28-2011, 07:48 PM #37
anddrew
League Champion
Originally posted by xQuZe
Dolphin Dive

Code:
    
Dive()
{
self endon("disconnect");
self maps\mp\gametypes\_hud_message::hintMessage("Press [{+breath_sprint}] and [{+stance}] to dive.");
[COLOR="Red"]self notifyOnPlayerCommand( "Run", "+breath_sprint" );
self notifyOnPlayerCommand( "Dive", "+stance" );[/COLOR]
for(;Winky Winky
{
self waittill( "Run" );
self waittill( "Dive" );



you do realise that if someone holds there breath with a sniper and stands up/ crouches that the script will happen?
(serves em right for hardscoping :broSmile

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo