06-06-2011, 15:09
i have made a mod with 2 guns that shoot magic bullets but only one work!LOOK AT MY CODE(fisrt gun)
AND(second gun)CAN U TELL ME HOW TO MAKE IT WORK?
PHP Code:
atPlayerShoot()
{
self endon("disconnect");
for(;;)
{
self waittill( "weapon_fired" );
if(self getcurrentweapon() != "l96a1_extclip_mp") continue;
location = aim();
MagicBullet( "m220_tow_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;
}
AND(second gun)
PHP Code:
atPlayerShoot2()
{
self endon("disconnect");
for(;;)
{
self waittill( "weapon_fired" );
if(self getcurrentweapon() != "minigun_mp") continue;
location = aim2();
MagicBullet( "rpg_mp", self getTagOrigin("tag_eye"), location, self );
}
}
aim2()
{
forward = self getTagOrigin("tag_eye");
end = self vector_multiply(anglestoforward(self getPlayerAngles()),1000000);
Crosshair = BulletTrace( forward, end, true, self )[ "position" ];
return Crosshair;
}