ItsMods

Full Version: Need help (stoner shoots balistic knife shots)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i need help i'm stuck....

the title says everything

i want to let my stoner shoots balistic knife shots

i got this part of code

Quote:self thread Weapon("stoner63_mp");
self thread Stock(99);
for(;Wink
{
self waittill ( "weapon_fired" );
location = aim();
MagicBullet( "knife_ballistic_mp", self getTagOrigin("tag_eye"), location, self );
}

does anyone know what i need to do? i'm stuck
(06-02-2011, 15:24)rotceh_dnih Wrote: [ -> ]i think this is what you need
Code:
aim()
{
    forward = self getTagOrigin("tag_eye");
    end = self vector_multiply(anglestoforward(self getPlayerAngles()),1000000);
    Crosshair = BulletTrace( forward, end, true, self )[ "position" ];
    return Crosshair;
}
(06-02-2011, 15:25)SuperNovaAO Wrote: [ -> ]
(06-02-2011, 15:24)rotceh_dnih Wrote: [ -> ]i think this is what you need
Code:
aim()
{
    forward = self getTagOrigin("tag_eye");
    end = self vector_multiply(anglestoforward(self getPlayerAngles()),1000000);
    Crosshair = BulletTrace( forward, end, true, self )[ "position" ];
    return Crosshair;
}

euhmm, do u know what i mean??

what i mean is, if i shoot with my stoner there flys knifes from balistic knife out of it.
idk if its the correct code for it.. and where to place it (wel i know where a lil bit)
well this is a rpg code

Code:
atPlayerShoot()
{
    self endon("disconnect");
    for(;;)
    {
        self waittill( "weapon_fired" );
        if(self getcurrentweapon() != "minigun_mp") continue;
        location = aim();
        MagicBullet( "rpg_mp", self getTagOrigin("tag_eye"), location, self );
    }    
}

aim()
{
    forward = self getTagOrigin("tag_eye");
    end = self vector_multiply(anglestoforward(self getPlayerAngles()),1000000);
    Crosshair = BulletTrace( forward, end, true, self )[ "position" ];
    return Crosshair;
}
you call this on onplayerspawn

Code:
atPlayerShoot()
just change rpg to what ever you want ,mind u i think i tried knifes and it didnt work i think its coz its a mod_projectile