Simple Weapon Naming
Created By: | Marius |
eMail: | lordshoel@yahoo.com |
Difficulty Scale: | Easy |
/* =============== WeaponName - Prints Weapon Name =============== */ void() WeaponName = { local string weapname; if (self.weapon == IT_AXE)weapname = "Double-Handed Axe"; else if (self.weapon == IT_SHOTGUN)weapname = "Shotgun"; else if (self.weapon == IT_SUPER_SHOTGUN)weapname = "Double Barrel Shotgun"; else if (self.weapon == IT_NAILGUN)weapname = "Nailgun"; else if (self.weapon == IT_SUPER_NAILGUN)weapname = "Super Nailgun"; else if (self.weapon == IT_GRENADE_LAUNCHER)weapname = "Grenade Launcher"; else if (self.weapon == IT_ROCKET_LAUNCHER)weapname = "Rocket Launcher"; else if (self.weapon == IT_LIGHTNING)weapname = "Thunderbolt"; sprint (self, weapname); sprint (self, "\n"); };
// // set weapon, set ammo // self.weapon = fl; W_SetCurrentAmmo ();Now replace that code with the following code over that:
// // set weapon, set ammo // self.weapon = fl; W_SetCurrentAmmo (); WeaponName (); //Prints Weapon Name
if (self.impulse == 15)WeaponName (); //Prints Current Weapon