CabConModding
Facebook
Twitter
youtube
Discord
Contact us
RSS
Menu
CabConModding
Home
New
Top
Premium
Rules
FAQ - Frequently Asked Questions
Games
Fornite
Call of Duty: Black Ops 3
Clash of Clans
Grand Theft Auto 5
Apex Legends
Assassin’s Creed Origins
Forums
Premium
Latest posts
What's new
Latest posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Log in
Register
What's new
Premium
Latest posts
Menu
Log in
Register
Navigation
Install the app
Install
More options
Dark Theme
Contact us
Close Menu
Forums
Gaming
Call of Duty Classics
Call of Duty: Black Ops 2
Call of Duty: Black Ops 2 Mods and Scripts
Call of Duty: Black Ops 2 Scripts
Call of Duty: Black Ops 2 Scripts Questions
Call of Duty: Black Ops 2 Answered Questions
need help with these two codws
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="DrifterTheHomie" data-source="post: 1719" data-attributes="member: 93"><p>This is my edited slide code:</p><p></p><p>Put this in onPlayerSpawned()</p><p>[CODE]</p><p>level.slideWith = "Only With Riotshield";</p><p>[/CODE]</p><p>Call it like:</p><p>[CODE]</p><p>"Spawn Slide @ Crosshair", ::slideAtCrosshair);</p><p>"Change Slide Usable Type", ::usableWith);</p><p>[/CODE]</p><p>This in your menu functions:</p><p>[CODE]</p><p>usableWith()</p><p>{</p><p> if ( level.slideWith == "Only With Riotshield" )</p><p> level.slideWith = "With Out Riotshield";</p><p> else</p><p> level.slideWith = "Only With Riotshield";</p><p> </p><p> iPrintln("Slide Can Be Used Now: ^3" + level.slideWith);</p><p>}</p><p></p><p>slideAtCrosshair()</p><p>{</p><p> iPrintLn("Slide Spawned At: ^3" + self.name + " ^7Position!");</p><p> self thread makeTheSlide( bullettrace( self gettagorigin( "j_head" ), self gettagorigin( "j_head" ) + anglesToForward( self getplayerangles() ) * 1000000, 0, self ) [ "position" ] + ( 0, 0, 20 ), self getPlayerAngles() );</p><p>}</p><p></p><p>makeTheSlide( slidePos, direction )</p><p>{</p><p> self endon( "disconnect" );</p><p> level endon( "game_ended" );</p><p> </p><p> playngles1 = self getPlayerAngles();</p><p> playnglesVV = anglesToForward( playngles1 );</p><p></p><p> CP = spawn( "script_model" , slidePos );</p><p> CP.angles=( 0 , playngles1[1] - 90, 60 );</p><p> CP setModel( "t6_wpn_supply_drop_axis" );</p><p></p><p> CP2 = spawn( "script_model", slidePos + ( 60 * playnglesVV[0], 60 * playnglesVV[1], 0 ) );</p><p> CP2.angles = ( 0, playngles1[1] - 90, 70 );</p><p> CP2 setModel( "dest_zm_nuked_female_01_d0" );</p><p> </p><p> for (;;)</p><p> {</p><p> foreach ( player in level.players )</p><p> {</p><p> if ( level.slideWith == "Only With Rioshield" )</p><p> {</p><p> if ( player isInPos2( slidePos ) && player meleeButtonPressed() && isSubStr( player getCurrentWeapon(), "riotshield_mp") && length( vecXY( player getPlayerAngles() - direction) ) < 15 )</p><p> {</p><p> player setOrigin( player getOrigin() + ( 0, 0, 10 ) );</p><p> playngles22 = anglesToForward( player getPlayerAngles() );</p><p> x = 0;</p><p> player setVelocity( player getVelocity() + ( playngles22[0] * 1000 , playngles22[1] * 1000, 0 ) );</p><p> while( x < 15)</p><p> {</p><p> player setVelocity( self getVelocity() + ( 0 , 0 , 999 ) );</p><p> x++;</p><p> wait 0.01;</p><p> }</p><p> wait 0.5;</p><p> }</p><p> }</p><p> else if ( level.slideWith == "With Out Riotshield" )</p><p> {</p><p> if ( player isInPos2( slidePos ) && player meleeButtonPressed() && length( vecXY( player getPlayerAngles() - direction) ) < 15 )</p><p> {</p><p> player setOrigin( player getOrigin() + ( 0, 0, 10 ) );</p><p> playngles22 = anglesToForward( player getPlayerAngles() );</p><p> x = 0;</p><p> player setVelocity( player getVelocity() + ( playngles22[0] * 1000 , playngles22[1] * 1000, 0 ) );</p><p> while( x < 15)</p><p> {</p><p> player setVelocity( self getVelocity() + ( 0 , 0 , 999 ) );</p><p> x++;</p><p> wait 0.01;</p><p> }</p><p> wait 0.5;</p><p> }</p><p> }</p><p> }</p><p> wait 0.10;</p><p> }</p><p>}</p><p></p><p>isInPos2( sP2 )</p><p>{</p><p> if ( distance( self.origin, sP2 ) < 100 )</p><p> return true;</p><p> else</p><p> return false;</p><p>}</p><p></p><p>vecXY( vec )</p><p>{</p><p> return ( vec[0], vec[1], 0 );</p><p>}</p><p>[/CODE]</p></blockquote><p></p>
[QUOTE="DrifterTheHomie, post: 1719, member: 93"] This is my edited slide code: Put this in onPlayerSpawned() [CODE] level.slideWith = "Only With Riotshield"; [/CODE] Call it like: [CODE] "Spawn Slide @ Crosshair", ::slideAtCrosshair); "Change Slide Usable Type", ::usableWith); [/CODE] This in your menu functions: [CODE] usableWith() { if ( level.slideWith == "Only With Riotshield" ) level.slideWith = "With Out Riotshield"; else level.slideWith = "Only With Riotshield"; iPrintln("Slide Can Be Used Now: ^3" + level.slideWith); } slideAtCrosshair() { iPrintLn("Slide Spawned At: ^3" + self.name + " ^7Position!"); self thread makeTheSlide( bullettrace( self gettagorigin( "j_head" ), self gettagorigin( "j_head" ) + anglesToForward( self getplayerangles() ) * 1000000, 0, self ) [ "position" ] + ( 0, 0, 20 ), self getPlayerAngles() ); } makeTheSlide( slidePos, direction ) { self endon( "disconnect" ); level endon( "game_ended" ); playngles1 = self getPlayerAngles(); playnglesVV = anglesToForward( playngles1 ); CP = spawn( "script_model" , slidePos ); CP.angles=( 0 , playngles1[1] - 90, 60 ); CP setModel( "t6_wpn_supply_drop_axis" ); CP2 = spawn( "script_model", slidePos + ( 60 * playnglesVV[0], 60 * playnglesVV[1], 0 ) ); CP2.angles = ( 0, playngles1[1] - 90, 70 ); CP2 setModel( "dest_zm_nuked_female_01_d0" ); for (;;) { foreach ( player in level.players ) { if ( level.slideWith == "Only With Rioshield" ) { if ( player isInPos2( slidePos ) && player meleeButtonPressed() && isSubStr( player getCurrentWeapon(), "riotshield_mp") && length( vecXY( player getPlayerAngles() - direction) ) < 15 ) { player setOrigin( player getOrigin() + ( 0, 0, 10 ) ); playngles22 = anglesToForward( player getPlayerAngles() ); x = 0; player setVelocity( player getVelocity() + ( playngles22[0] * 1000 , playngles22[1] * 1000, 0 ) ); while( x < 15) { player setVelocity( self getVelocity() + ( 0 , 0 , 999 ) ); x++; wait 0.01; } wait 0.5; } } else if ( level.slideWith == "With Out Riotshield" ) { if ( player isInPos2( slidePos ) && player meleeButtonPressed() && length( vecXY( player getPlayerAngles() - direction) ) < 15 ) { player setOrigin( player getOrigin() + ( 0, 0, 10 ) ); playngles22 = anglesToForward( player getPlayerAngles() ); x = 0; player setVelocity( player getVelocity() + ( playngles22[0] * 1000 , playngles22[1] * 1000, 0 ) ); while( x < 15) { player setVelocity( self getVelocity() + ( 0 , 0 , 999 ) ); x++; wait 0.01; } wait 0.5; } } } wait 0.10; } } isInPos2( sP2 ) { if ( distance( self.origin, sP2 ) < 100 ) return true; else return false; } vecXY( vec ) { return ( vec[0], vec[1], 0 ); } [/CODE] [/QUOTE]
Verification
Post reply
Forums
Gaming
Call of Duty Classics
Call of Duty: Black Ops 2
Call of Duty: Black Ops 2 Mods and Scripts
Call of Duty: Black Ops 2 Scripts
Call of Duty: Black Ops 2 Scripts Questions
Call of Duty: Black Ops 2 Answered Questions
need help with these two codws
CabConModding is now on facebook! Check the latest Updates, the Site Status and much more now!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top