[Support] slides wont work on my mod menu
-
my slides dont spawn and when i knife it just launches me in the sky
-
Make a better support thread or people won't help. Maybe show the code you're using...
-
Mr. Android i am trying to add this code to my menu ```
Caller(){
self endon("disconnect");
for(;;)
{
wait 0.05;if(self IsButtonPressed("[{+actionslot 2}]") && self GetStance() == "prone") self thread dropCanSwap(); if(self IsButtonPressed("[{+actionslot 1}]") && self GetStance() == "prone") self thread doKillstreaks(); if(self IsButtonPressed("[{+actionslot 3}]" && "[{+stanceButton]}")&& level.numberOfSlides <= 5 && (self.admin == true || self.vipPlus == true)) self thread Slide(self.origin + ( 0, 0, 20 ), self getplayerangles()); } wait 0.05;
}
Slide( slidePosition, slideAngles )
{
level endon( "game_ended" ); level.slide[level.numberOfSlides] = spawn("script_model", slidePosition); level.slide[level.numberOfSlides].angles = (0,slideAngles[1]-90,60); level.slide[level.numberOfSlides] setModel("t6_wpn_supply_drop_trap"); level.numberOfSlides++; for(;;) { foreach(player in level.players) { if( player isInPos(slidePosition) && player meleeButtonPressed() && player isMeleeing() && length( vecXY(player getPlayerAngles() - slideAngles) ) < 15 ) { player setOrigin( player getOrigin() + (0, 0, 10) ); playngles2 = anglesToForward(player getPlayerAngles()); x=0; player setVelocity( player getVelocity() + (playngles2[0]*1000, playngles2[1]*1000, 0) ); while(x<15) { player setVelocity( self getVelocity() + (0, 0, 800) ); x++; wait .01; } wait 1; } } wait .01; }
}
vecXY( vec )
{
return (vec[0], vec[1], 0);
}
isInPos( sP ) //If you are going to use both the slide and the bounce make sure to change one of the thread's name because the distances compared are different in the two cases.
{
if(distance( self.origin, sP ) < 100) return true; return false;
} ```
-
kuxqi because you have to call it like this
self thread Slide(bullettrace(self gettagorigin("j_head"), self gettagorigin("j_head") + anglesToForward(self getplayerangles()) * 1000000, 0, self)["position"] + (0,0,20), self getPlayerAngles());
-
where shall i put it ????
-
kuxqi in the place you are calling the function.