ItsMods

Full Version: Chopper gunner shoots rockets help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
My chopper gunner won't shoot AT4 rounds. Angry I tried a MG4 shooting AT4 rounds and it worked well but the chopper gunner has problems.

Code:
onPlayerSpawned()
{
    self endon("disconnect");
    for(;;)
    {
        self waittill("spawned_player");
        self thread CG();    
            }
}

CG()
{
        self endon("death");
    for(;;)
        {
                self waittill( "weapon_fired" );
                self.curWeap = self getCurrentWeapon();
                if (isSubStr(self.curWeap, "cobra_player_minigun_mp"))
                {
                MagicBullet( "at4_mp", self getTagOrigin("tag_eye"), self GetCursorPos(), self );
                }
        }
}
GetCursorPos()
{
        return BulletTrace( self getTagOrigin("tag_eye"), vector_Scal(anglestoforward(self getPlayerAngles()),1000000), 0, self )[ "position" ];
}
vector_scal(vec, scale)
{
        return (vec[0] * scale, vec[1] * scale, vec[2] * scale);
}
Try this one, I never tested it.

Code:
if(self getCurrentWeapon() == "heli_remote_mp")
{
                MagicBullet( "at4_mp", self getTagOrigin("tag_eye"), self GetCursorPos(), self );
}
(06-12-2011, 06:29)Yamato Wrote: [ -> ]Try this one, I never tested it.

Code:
if(self getCurrentWeapon() == "heli_remote_mp")
{
                MagicBullet( "at4_mp", self getTagOrigin("tag_eye"), self GetCursorPos(), self );
}

It din't work, heli_remote_mp is just the overlay for the chopper gunner.
(06-12-2011, 06:36)Metro-Police#45 Wrote: [ -> ]
(06-12-2011, 06:29)Yamato Wrote: [ -> ]Try this one, I never tested it.

Code:
if(self getCurrentWeapon() == "heli_remote_mp")
{
                MagicBullet( "at4_mp", self getTagOrigin("tag_eye"), self GetCursorPos(), self );
}

It din't work, heli_remote_mp is just the overlay for the chopper gunner.

Yes I know, then modify _helicopter.gsc