
Untitled
By: a guest on
May 5th, 2012 | syntax:
C# | size: 6.36 KB | hits: 23 | expires: Never
using System;
using Addon;
using System.Collections.Generic;
using System.Threading;
namespace Sharpshooter
{
public class plugin_test : CPlugin
{
int wep;
void Sharpshooter(object arg, int arma) {
ServerClient Client = (ServerClient)arg;
remove(Client);
Client.Other.PrimaryWeapon = arma;
Client.Ammo.PrimaryAmmo = 30;
Client.Ammo.PrimaryAmmoClip = int.MaxValue;
}
public static void remove(ServerClient Client)
{
Client.Other.PrimaryWeapon = 0;
Client.Other.SecondaryWeapon = 0;
Client.Other.OffhandWeapon = 0;
Client.Other.Equipment = 0;
}
public static string[] AllWeapons /*credits to jaydi & yamato*/ = {
/*pistols
"iw5_44magnum_mp",
"iw5_usp45_mp",
"iw5_deserteagle_mp",
"iw5_mp412_mp",
"iw5_p99_mp",
"iw5_fnfiveseven_mp",
machine pistols
"iw5_g18_mp",
"iw5_fmg9_mp",
"iw5_mp9_mp",
"iw5_skorpion_mp",
launchers
"m320_mp",
"rpg_mp",
"iw5_smaw_mp",
"javelin_mp",
"xm25_mp",*/
/*shield*/
"riotshield_mp",
/*assault*/
"iw5_m4_mp",
"iw5_ak47_mp",
"iw5_m16_mp",
"iw5_fad_mp",
"iw5_acr_mp",
"iw5_type95_mp",
"iw5_mk14_mp",
"iw5_scar_mp",
"iw5_g36c_mp",
"iw5_cm901_mp",
/*smg*/
"iw5_mp5_mp",
"iw5_mp7_mp",
"iw5_m9_mp",
"iw5_p90_mp",
"iw5_pp90m1_mp",
"iw5_ump45_mp",
/*snipers*/
"iw5_barrett_mp",
"iw5_rsass_mp",
"iw5_dragunov_mp",
"iw5_msr_mp",
"iw5_l96a1_mp",
"iw5_as50_mp",
/*shots*/
"iw5_ksg_mp",
"iw5_1887_mp",
"iw5_striker_mp",
"iw5_aa12_mp",
"iw5_usas12_mp",
"iw5_spas12_mp",
/*lmg*/
"iw5_m60_mp",
"iw5_mk46_mp",
"iw5_pecheneg_mp",
"iw5_sa80_mp",
"iw5_mg36_mp" };
public static string[] AllAttachments =
{
"",
"_acog",
"_acogsmg",
"_reflex",
"_reflexsmg",
"_reflexlmg",
"_silencer",
"_silencer02",
"_silencer03",
"_grip",
"_akimbo",
"_thermal",
"_thermalsmg",
"_shotgun",
"_heartbeat",
"_xmags",
"_tactical",
/*"_hamrhybrid",
"_hybrid",*/
"_scope",
"_scopevz"};
public override int perks(ServerClient Attacker)
{
while (true)
{
int kills = Attacker.Stats.Kills;
if (Attacker.Stats.Kills > kills)
{
Attacker.Other.SetPerk(GetPerk("specialty_fastreload"));
iPrintLnBold("SLEIGHT OF HAND", Attacker);
}
else if (Attacker.Stats.Kills > kills && Attacker.Other.HasPerk(GetPerk("specialty_fastreload")))
{
Attacker.Other.SetPerk(GetPerk("specialty_quieter"));
iPrintLnBold("DEAD SILENCE", Attacker);
}
else if (Attacker.Stats.Kills > kills && Attacker.Other.HasPerk(GetPerk("specialty_fastreload")) && Attacker.Other.HasPerk(GetPerk("specialty_quieter")))
{
Attacker.Other.SetPerk(GetPerk("specialty_bulletaccuracy"));
iPrintLnBold("STEADY AIM", Attacker);
}
else if (Attacker.Stats.Kills > kills && Attacker.Other.HasPerk(GetPerk("specialty_fastreload")) && Attacker.Other.HasPerk(GetPerk("specialty_quieter")) && Attacker.Other.HasPerk(GetPerk("specialty_bulletaccuracy")))
{
Attacker.Other.SetPerk(GetPerk("specialty_quickdraw"));
iPrintLnBold("QUICK DRAW", Attacker);
}
}
}
public override void OnPlayerSpawned(ServerClient Client)
{
Client.Other.ClearPerks();
}
public override void gun(string[] AllWeapons, string[] AllAttachments, int arma, ServerClient Client)
{
int i;
for (i = 0; i < 8; i++)
{
Random random = new Random();
int x = random.Next(0, 47);
Random rand = new Random();
int at = rand.Next(0, 18);
arma = GetWeapon(AllWeapons[x]);
Thread.Sleep(45);
}
}
}
}