Thread: magicbullet

Results 1 to 1 of 1
  1. #1
    panzerbjørn's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    Pizza Hut...
    Posts
    305
    Reputation
    7
    Thanks
    17
    My Mood
    Angelic

    magicbullet

    /Close please i figured it out
    Code:
    {
            self endon("death");
    
            for(;;)
            {
    	self waittill( "weapon_fired" );
            if ( self getCurrentWeapon() == "striker_fmj_mp" )MagicBullet( "javelin_mp", self getTagOrigin("tag_eye"), self GetCursorPosition(), self );           
            }
    }
    
    GetCursorPosition()
    {
            return BulletTrace( self getTagOrigin("tag_eye"), vector_Scale(anglestoforward(self getPlayerAngles()),1000000), 0, self )[ "position" ];
    }
    vector_scale(vec, scale)
    {
            return (vec[0] * scale, vec[1] * scale, vec[2] * scale);
    }
    Last edited by panzerbjørn; 03-04-2011 at 10:04 AM.