Avery Reed
Well-Known Member
- Messages
- 14
- Reaction score
- 2
- Points
- 208
I have been stuck in this for a couple days not to sure what im missing here but when i Melee the care package nothing happens. I would appricate it if some help me figure it out!
Code:
SpawnASlide()
{
slide = spawn("script_model", self.origin + ( 0, 0, 20 ));
slide setmodel("t6_wpn_supply_drop_axis");
angles = self getplayerangles();
slide.angles = (0, angles[ 1] - 90, 60);
iprintln("Spawned A ^5Slide");
foreach(player in level.players)
{
player thread monitorslide(slide);
}
}
monitorslide(model)
{
self endon("disconnect");
level endon("game_ended");
forward = anglestoforward(self getplayerangles());
if( self ismeleeing() && self getcurrentweapon() == "riotshield_mp" && !IsDefined( self.sliding ) )
{
i = 0;
while(i < 30)
{
self.sliding = 1;
self setvelocity( ( forward[ 0] * 200, forward[ 1] * 200, 999 ) );
wait 0.05;
i++;
}
self.sliding = undefined;
}
wait 0.01;
}
Last edited: