C++ Code
- scrambleClass()
- {
- WeaponPrimary = [];
- WeaponPrimary[WeaponPrimary.size] = "m4";
- PickWeapon = WeaponPrimary[randomInt(WeaponPrimary.size)];
- WeaponToGive = "";
- if(PickWeapon == "m4_mp")
- {
- M4Attach = [];
- M4Attach[M4Attach.size] = "";
- M4Attach[M4Attach.size] = "_acog";
- M4Attach[M4Attach.size] = "_reflex";
- M4Attach[M4Attach.size] = "_thermal";
- M4Attach[M4Attach.size] = "_eotech";
- WeaponToGive = "m4" + M4Attach[randomInt(M4Attach.size)] + "_mp";
- }
-
- self takeAllWeapons();
- self clearPerks();
- wait 0.05;
- self giveWeapon(WeaponToGive, 0, false);
- wait 0.05;
- self switchToWeapon(WeaponToGive, 0, false);
- }