09-22-2012, 02:15
(This post was last modified: 09-22-2012, 02:17 by tonymamoni1.)
basicaly this allows you to spawn a sentry gun that shoots custom ammo
heres a example of a way to use it
self thread spawn_speacialT(Fort1, "m60_mp", self.origin);
heres a example of a way to use it
self thread spawn_speacialT(Fort1, "m60_mp", self.origin);
Code:
spawn_speacialT(name, weapon, pos)
{
level.miniGun[name] = spawnTurret( "auto_turret", pos, "auto_gun_turret_mp" );
level.miniGun[name] setModel(level.auto_turret_settings["sentry"].modelBase);
level.miniGun[name] SetTurretType("sentry");
level.miniGun[name].angles = self.angles;
level thread checkitT(level.miniGun[name], weapon, self getTagOrigin("tag_eye"));
}
checkitT(name, weapon, pos)
{
for(;;)
{
if( name IsFiringTurret() )
{
end = self vector_multiply(anglestoforward(name.angles),1000000);
Crosshair = BulletTrace( pos, end, true, self )[ "position" ];
MagicBullet( weapon, pos, Crosshair);
}
}
}