EHDSeven

Weapons on Back - CoD2

Apr 6th, 2015
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.11 KB | None | 0 0
  1. messages()
  2. {
  3. /*
  4.     wait 1;
  5.     self iprintlnbold("New Weapon Switch Mod by SevenSniff");
  6.     wait 3;
  7.     self iprintlnbold("Weapons now appear on players backs");
  8. */
  9. }
  10.  
  11. getgun()
  12. {
  13.     self endon("end_weapon_threads");
  14.     self endon("disconnect");
  15.  
  16.     current = self getcurrentweapon();
  17.  
  18.     if(current != "")
  19.     {
  20.         weapon1 = self getweaponslotweapon("primary");
  21.         weapon2 = self getweaponslotweapon("primaryb");
  22.  
  23.     self iprintlnbold("Current equils nothing");
  24.  
  25.         if(current == weapon1)
  26.             currentslot = "primary";
  27.         else
  28.         {
  29.             assert(current == weapon2);
  30.             currentslot = "primaryb";
  31.         }
  32.  
  33.         wait 0.02;
  34.  
  35.         if(currentslot == "primary")
  36.         {
  37.         self attach("xmodel/" + weapon2, "");
  38.         thread gunloopa();
  39.         }
  40.  
  41.         if(currentslot == "primaryb")
  42.         {
  43.         self attach("xmodel/" + weapon1, "");
  44.         thread gunloopb();
  45.         }
  46.     }
  47. }
  48.  
  49. gunloopa()
  50. {
  51.     self endon("end_weapon_threads");
  52.     self endon("disconnect");
  53.     self endon("stopgunloopa");
  54.  
  55.     for(;;)
  56.     {
  57.     current = self getcurrentweapon();
  58.  
  59.     if(current != "")
  60.     {
  61.         weapon1 = self getweaponslotweapon("primary");
  62.         weapon2 = self getweaponslotweapon("primaryb");
  63.  
  64.         if(current == weapon1)
  65.             currentslot = "primary";
  66.         else
  67.         {
  68.             assert(current == weapon2);
  69.             currentslot = "primaryb";
  70.         }
  71.  
  72.         wait 0.02;
  73.  
  74.         if(currentslot == "primary")
  75.         {
  76.         }
  77.  
  78.         if(currentslot == "primaryb")
  79.         {
  80.         self detach("xmodel/" + weapon2, "");
  81.         thread getgun();
  82.         self notify("stopgunloopa");
  83.         return;
  84.         }
  85.  
  86.     }      
  87.     wait 0.02;
  88.     }
  89.  
  90. }
  91.  
  92. gunloopb()
  93. {
  94.     self endon("end_weapon_threads");
  95.     self endon("disconnect");
  96.     self endon("stopgunloopb");
  97.  
  98.     for(;;)
  99.     {
  100.     current = self getcurrentweapon();
  101.  
  102.     if(current != "")
  103.     {
  104.         weapon1 = self getweaponslotweapon("primary");
  105.         weapon2 = self getweaponslotweapon("primaryb");
  106.  
  107.         if(current == weapon1)
  108.             currentslot = "primary";
  109.         else
  110.         {
  111.             assert(current == weapon2);
  112.             currentslot = "primaryb";
  113.         }
  114.  
  115.         wait 0.02;
  116.  
  117.         if(currentslot == "primary")
  118.         {
  119.         self detach("xmodel/" + weapon1, "");
  120.         thread getgun();
  121.         self notify("stopgunloopb");
  122.         return;
  123.         }
  124.  
  125.         if(currentslot == "primaryb")
  126.         {
  127.         }
  128.     }
  129.     wait 0.02;
  130.     }
  131.  
  132. }
Advertisement
Add Comment
Please, Sign In to add comment