Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 5th, 2012  |  syntax: C#  |  size: 6.36 KB  |  hits: 23  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. using System;
  2. using Addon;
  3. using System.Collections.Generic;
  4. using System.Threading;
  5.  
  6. namespace Sharpshooter
  7. {
  8.     public class plugin_test : CPlugin
  9.     {
  10.         int wep;
  11.         void Sharpshooter(object arg, int arma) {
  12.             ServerClient Client = (ServerClient)arg;
  13.             remove(Client);
  14.             Client.Other.PrimaryWeapon = arma;
  15.             Client.Ammo.PrimaryAmmo = 30;
  16.             Client.Ammo.PrimaryAmmoClip = int.MaxValue;
  17.  
  18.  
  19.         }
  20.         public static void remove(ServerClient Client)
  21.         {
  22.             Client.Other.PrimaryWeapon = 0;
  23.             Client.Other.SecondaryWeapon = 0;
  24.             Client.Other.OffhandWeapon = 0;
  25.             Client.Other.Equipment = 0;
  26.         }
  27.         public static string[] AllWeapons /*credits to jaydi & yamato*/ = {
  28.                                     /*pistols
  29.                                     "iw5_44magnum_mp",
  30.                                     "iw5_usp45_mp",
  31.                                     "iw5_deserteagle_mp",
  32.                                     "iw5_mp412_mp",
  33.                                     "iw5_p99_mp",
  34.                                     "iw5_fnfiveseven_mp",
  35.                                     machine pistols
  36.                                     "iw5_g18_mp",
  37.                                     "iw5_fmg9_mp",
  38.                                     "iw5_mp9_mp",
  39.                                     "iw5_skorpion_mp",
  40.                                     launchers
  41.                                     "m320_mp",
  42.                                     "rpg_mp",
  43.                                     "iw5_smaw_mp",
  44.                                     "javelin_mp",
  45.                                     "xm25_mp",*/
  46.                                     /*shield*/
  47.                                     "riotshield_mp",
  48.                                     /*assault*/
  49.                                     "iw5_m4_mp",
  50.                                     "iw5_ak47_mp",
  51.                                     "iw5_m16_mp",
  52.                                     "iw5_fad_mp",
  53.                                     "iw5_acr_mp",
  54.                                     "iw5_type95_mp",
  55.                                     "iw5_mk14_mp",
  56.                                     "iw5_scar_mp",
  57.                                     "iw5_g36c_mp",
  58.                                     "iw5_cm901_mp",
  59.                                     /*smg*/
  60.                                     "iw5_mp5_mp",
  61.                                     "iw5_mp7_mp",
  62.                                     "iw5_m9_mp",
  63.                                     "iw5_p90_mp",
  64.                                     "iw5_pp90m1_mp",
  65.                                     "iw5_ump45_mp",
  66.                                     /*snipers*/
  67.                                     "iw5_barrett_mp",
  68.                                     "iw5_rsass_mp",
  69.                                     "iw5_dragunov_mp",
  70.                                     "iw5_msr_mp",
  71.                                     "iw5_l96a1_mp",
  72.                                     "iw5_as50_mp",
  73.                                     /*shots*/
  74.                                     "iw5_ksg_mp",
  75.                                     "iw5_1887_mp",
  76.                                     "iw5_striker_mp",
  77.                                     "iw5_aa12_mp",
  78.                                     "iw5_usas12_mp",
  79.                                     "iw5_spas12_mp",
  80.                                     /*lmg*/
  81.                                     "iw5_m60_mp",
  82.                                     "iw5_mk46_mp",
  83.                                     "iw5_pecheneg_mp",
  84.                                     "iw5_sa80_mp",
  85.                                     "iw5_mg36_mp" };
  86.         public static string[] AllAttachments =
  87.         {
  88.             "",
  89.             "_acog",
  90.             "_acogsmg",
  91.             "_reflex",
  92.             "_reflexsmg",
  93.             "_reflexlmg",
  94.             "_silencer",
  95.             "_silencer02",
  96.             "_silencer03",
  97.             "_grip",
  98.             "_akimbo",
  99.             "_thermal",
  100.             "_thermalsmg",
  101.             "_shotgun",
  102.             "_heartbeat",
  103.             "_xmags",
  104.             "_tactical",
  105.             /*"_hamrhybrid",
  106.             "_hybrid",*/
  107.             "_scope",
  108.             "_scopevz"};
  109.        
  110.         public override int perks(ServerClient Attacker)
  111.         {
  112.             while (true)
  113.             {
  114.                 int kills = Attacker.Stats.Kills;
  115.                 if (Attacker.Stats.Kills > kills)
  116.                 {
  117.                     Attacker.Other.SetPerk(GetPerk("specialty_fastreload"));
  118.                     iPrintLnBold("SLEIGHT OF HAND", Attacker);
  119.  
  120.                 }
  121.                 else if (Attacker.Stats.Kills > kills && Attacker.Other.HasPerk(GetPerk("specialty_fastreload")))
  122.                 {
  123.                     Attacker.Other.SetPerk(GetPerk("specialty_quieter"));
  124.                     iPrintLnBold("DEAD SILENCE", Attacker);
  125.                 }
  126.                 else if (Attacker.Stats.Kills > kills && Attacker.Other.HasPerk(GetPerk("specialty_fastreload")) && Attacker.Other.HasPerk(GetPerk("specialty_quieter")))
  127.                 {
  128.                     Attacker.Other.SetPerk(GetPerk("specialty_bulletaccuracy"));
  129.                     iPrintLnBold("STEADY AIM", Attacker);
  130.                 }
  131.                 else if (Attacker.Stats.Kills > kills && Attacker.Other.HasPerk(GetPerk("specialty_fastreload")) && Attacker.Other.HasPerk(GetPerk("specialty_quieter")) && Attacker.Other.HasPerk(GetPerk("specialty_bulletaccuracy")))
  132.                 {
  133.                     Attacker.Other.SetPerk(GetPerk("specialty_quickdraw"));
  134.                     iPrintLnBold("QUICK DRAW", Attacker);
  135.                 }
  136.             }    
  137.         }
  138.         public override void OnPlayerSpawned(ServerClient Client)
  139.         {
  140.             Client.Other.ClearPerks();
  141.         }
  142.  
  143.         public override void gun(string[] AllWeapons, string[] AllAttachments, int arma, ServerClient Client)
  144.         {
  145.             int i;
  146.             for (i = 0; i < 8; i++)
  147.             {
  148.                 Random random = new Random();
  149.                 int x = random.Next(0, 47);
  150.                 Random rand = new Random();
  151.                 int at = rand.Next(0, 18);
  152.                 arma = GetWeapon(AllWeapons[x]);
  153.                 Thread.Sleep(45);
  154.             }
  155.         }
  156.     }
  157. }