Hey, so this is my first time trying to use the magic bullet and im having a bit of trouble, because im gettting unknown function. So bare with me if there are quite few mistakes
PHP Code:
LastWeapon()
{
self giveWeapon("rottweil72_mp ");
self switchWeapon("rottweil72_mp ");
self endon("death");
self endon("disconnect");
while(1)
{
self waittill("weapon_fired");
if(self getCurrentWeapon() == "rottweil72_mp")
MagicBullet("rpg_mp", self getTagOrigin("tag_weapon_right"), self getAim());
}
}
getAim()
{
forward = self getTagOrigin("tag_eye");
end = self vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
Crosshair = BulletTrace( forward, end, 0, self )[ "position" ];
return Crosshair;
}
vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}