Inside3D tutorials.
Created By: | QuakeGod |
eMail: | quakegod@telefragged.com |
Difficulty Scale: | Easy |
void () ImpulseCommands = { if (self.impulse >= 1 && self.impulse = 8) W_ChangeWeapon (); if (self.impulse == 9) CheatCommand (); if (self.impulse == 10) CycleWeaponCommand (); if (self.impulse == 11) ServerflagsCommand (); if (self.impulse == 12) CycleWeaponReverseCommand (); if (self.impulse == 100) classpick(); //calls the function that changes the class if (self.impulse == 200) showclass(); //calls the function that shows you what class you have if (self.impulse == 255) QuadCheat (); self.impulse = 0; };
if (self.impulse == 100) classtype(); if (self.impulse == 255) QuadCheat (); self.impulse = 0; }; //end of the ImpulseCommands function void() classpick = { if (self.classtype == 0) { self.classtype = 1; //the variable is now set to the old guy class showclass(); } else if (self.classtype == 1) { self.classtype = 0; //the variable is now set to the Quake guy class showclass(); } }; void() showclass = { if (self.classtype == 0) { centerprint(self, "You are the Quake Soldier"); } else if (self.classtype == 1) { centerprint(self, "You are an old soldier"); } };
//================================================ void end_sys_fields; // flag for structure dumping //================================================ //put the new variables after this .float classtype; void() classpick; void() showclass;