Infected Setting Files
Featured Replies
Сейчас на странице 0
- Нет пользователей, просматривающих эту страницу
A better way to browse. Learn more.
A full-screen app on your home screen with push notifications, badges and more.
Используя этот сайт, вы соглашаетесь Условия использования.
Hi. These files consist of following image maps.
I saw someone ask these contents in other webs.
These scripts are modified slightly for infected and original scripts can be found easily at Script Release posts.
Thanks to developers who release these scripts. They are awesome.
And have fun with these basic setting files for infected server.
I though these scripts are considered as general mod . so I posted here.
sorry. I didn't think virustotal. i'll check it.
list of xmodels was found at mpgh site.
Thanks to develpers. Concern with Credits,
MapEdit by DidUknowiPwn
QCZM by THeApadayo
Hide Seek by zxzo0o
http://www.youtube.com/watch?v=kLlhPjUtOq4&feature=player_detailpage
п»їusing System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using InfinityScript; namespace MapEdit_modified { public class InfectedSolution : BaseScript { public InfectedSolution() : base() { INFO = HudElem.CreateServerFontString("hudbig", 0.8f); INFO.SetPoint("TOPCENTER", "TOPCENTER", 0, 1); INFO.HideWhenInMenu = true; INFO.SetText("KOREA infected"); Entity care_package = Call("getent", "care_package", "targetname"); _airdropCollision = Call("getent", care_package.GetField("target"), "targetname"); _mapname = Call("getdvar", "mapname"); Call("precachemodel", getAlliesFlagModel(_mapname)); Call("precachemodel", getAxisFlagModel(_mapname)); Call("setdvar", "mapedit_allowcheats", "1"); Call("setdvar", "scr_game_matchstarttime", "1"); Call("setdvar", "scr_game_playerwaittime", "10"); if (File.Exists("scripts\\maps\\" + _mapname + ".txt")) loadMapEdit(_mapname); PlayerConnected += new Action(entity => { ////Heavy Ammo refill entity.OnInterval(1000, player => { if (player.IsAlive) { var weapon = player.CurrentWeapon; //if (weapon.StartsWith("iw5_as50") || weapon.StartsWith("iw5_rsass") || weapon.StartsWith("iw5_dragunov") || weapon.StartsWith("iw5_msr") || weapon.StartsWith("rpg") || weapon.StartsWith("javelin") || weapon.StartsWith("iw5_smaw") || weapon.StartsWith("xm25")) if (weapon.StartsWith("stinger") || weapon.StartsWith("rpg") || weapon.StartsWith("javelin") || weapon.StartsWith("iw5_smaw") || weapon.StartsWith("xm25") || weapon.StartsWith("m320")) { player.Call("giveMaxAmmo", weapon); } } return true; }); /////No Ammo Warning entity.SetClientDvar("lowAmmoWarningNoAmmoColor2", "0 0 0 0"); entity.SetClientDvar("lowAmmoWarningNoAmmoColor1", "0 0 0 0"); entity.SetClientDvar("lowAmmoWarningNoReloadColor2", "0 0 0 0"); entity.SetClientDvar("lowAmmoWarningNoReloadColor1", "0 0 0 0"); entity.SetClientDvar("lowAmmoWarningColor2", "0 0 0 0"); entity.SetClientDvar("lowAmmoWarningColor1", "0 0 0 0"); }); //////Fly mode PlayerConnected += new Action(player => { if (Call("getdvarint", "mapedit_allowcheats") == 1 && (player.GetField("name") == "TeachMeEnglish" || player.GetField("name") == "silver_knight" || player.GetField("name") == "crynot" || player.GetField("name") == "Dad")) player.Call("notifyonplayercommand", "fly", "+lookup"); player.OnNotify("fly", (ent) => { if (player.GetField("sessionstate") != "spectator") { player.Call("allowspectateteam", "freelook", true); player.SetField("sessionstate", "spectator"); player.Call("setcontents", 0); } else { player.Call("allowspectateteam", "freelook", false); player.SetField("sessionstate", "playing"); player.Call("setcontents", 100); } }); }); } private HudElem INFO; private string _mapname; //private string _mapmodel; private Entity _airdropCollision; public static void print(string format, params object[] p) { Log.Write(LogLevel.All, format, p); } public void CreateRamp(Vector3 top, Vector3 bottom) { float distance = top.DistanceTo(bottom); int blocks = (int)Math.Ceiling(distance / 30); Vector3 A = new Vector3((top.X - bottom.X) / blocks, (top.Y - bottom.Y) / blocks, (top.Z - bottom.Z) / blocks); Vector3 temp = Call("vectortoangles", new Parameter(top - bottom)); Vector3 BA = new Vector3(temp.Z, temp.Y + 90, temp.X); for (int b = 0; b <= blocks; b++) { spawnCrate(bottom + (A * , BA); } } public void CreateElevator(Vector3 enter, Vector3 exit) { Entity flag = Call("spawn", "script_model", new Parameter(enter)); flag.Call("setModel", getAlliesFlagModel(_mapname)); Entity flag2 = Call("spawn", "script_model", new Parameter(exit)); flag2.Call("setModel", getAxisFlagModel(_mapname)); //int curObjID = 31 - _flagCount++; //Call(431, curObjID, "active"); // objective_add //Call(435, curObjID, new Parameter(flag.Origin)); // objective_position //Call(434, curObjID, "compass_waypoint_bomb"); // objective_icon OnInterval(100, () => { foreach (Entity player in getPlayers()) { if (player.Origin.DistanceTo(enter) <= 50) { player.Call("setorigin", new Parameter(exit)); } } return true; }); } public void CreateHiddenTP(Vector3 enter, Vector3 exit) { Entity flag = Call("spawn", "script_model", new Parameter(enter)); flag.Call("setModel", ""); Entity flag2 = Call("spawn", "script_model", new Parameter(exit)); flag2.Call("setModel", ""); /* * Entity flag = Call("spawn", "script_model", new Parameter(enter)); flag.Call("setModel", "weapon_scavenger_grenadebag"); Entity flag2 = Call("spawn", "script_model", new Parameter(exit)); flag2.Call("setModel", "weapon_oma_pack"); */ OnInterval(100, () => { foreach (Entity player in getPlayers()) { if (player.Origin.DistanceTo(enter) <= 50) { player.Call("setorigin", new Parameter(exit)); } } return true; }); } public void model1(Vector3 m1) { Entity flag = Call("spawn", "script_model", new Parameter(m1)); flag.Call("setModel", getModel_1(_mapname)); } public void model2(Vector3 m2) { Entity flag = Call("spawn", "script_model", new Parameter(m2)); flag.Call("setModel", getModel_2(_mapname)); } //public void createModel(string type, Vector3 origin, Vector3 angle) //{ // Entity spawn = Call("spawn", type, new Parameter(origin)); // spawn.SetField("angles", new Parameter(angle)); //} //public Entity spawnModel(string model, Vector3 origin, Vector3 angles) //{ // Entity ent = Call("spawn", "script_model", new Parameter(origin)); // ent.Call("setmodel", model); // ent.SetField("angles", new Parameter(angles)); // return ent; //} public Entity CreateWall(Vector3 start, Vector3 end) { float D = new Vector3(start.X, start.Y, 0).DistanceTo(new Vector3(end.X, end.Y, 0)); float H = new Vector3(0, 0, start.Z).DistanceTo(new Vector3(0, 0, end.Z)); int blocks = (int)Math.Round(D / 75, 0); int height = (int)Math.Round(H / 60, 0); Vector3 C = end - start; Vector3 A = new Vector3(C.X / blocks, C.Y / blocks, C.Z / height); float TXA = A.X / 4; float TYA = A.Y / 4; Vector3 angle = Call("vectortoangles", new Parameter(C)); angle = new Vector3(0, angle.Y, 90); Entity center = Call("spawn", "script_origin", new Parameter(new Vector3( (start.X + end.X) / 2, (start.Y + end.Y) / 2, (start.Z + end.Z) / 2))); for (int h = 0; h < height; h++) { Entity crate = spawnCrate((start + new Vector3(TXA, TYA, 10) + (new Vector3(0, 0, A.Z) * h)), angle); crate.Call("enablelinkto"); crate.Call("linkto", center); for (int i = 0; i < blocks; i++) { crate = spawnCrate(start + (new Vector3(A.X, A.Y, 0) * i) + new Vector3(0, 0, 10) + (new Vector3(0, 0, A.Z) * h), angle); crate.Call("enablelinkto"); crate.Call("linkto", center); } crate = spawnCrate(new Vector3(end.X, end.Y, start.Z) + new Vector3(TXA * -1, TYA * -1, 10) + (new Vector3(0, 0, A.Z) * h), angle); crate.Call("enablelinkto"); crate.Call("linkto", center); } return center; } public Entity CreateFloor(Vector3 corner1, Vector3 corner2) { float width = corner1.X - corner2.X; if (width < 0) width = width * -1; float length = corner1.Y - corner2.Y; if (length < 0) length = length * -1; int bwide = (int)Math.Round(width / 50, 0); int blength = (int)Math.Round(length / 30, 0); Vector3 C = corner2 - corner1; Vector3 A = new Vector3(C.X / bwide, C.Y / blength, 0); Entity center = Call("spawn", "script_origin", new Parameter(new Vector3( (corner1.X + corner2.X) / 2, (corner1.Y + corner2.Y) / 2, corner1.Z))); for (int i = 0; i < bwide; i++) { for (int j = 0; j < blength; j++) { Entity crate = spawnCrate(corner1 + (new Vector3(A.X, 0, 0) * i) + (new Vector3(0, A.Y, 0) * j), new Vector3(0, 0, 0)); crate.Call("enablelinkto"); crate.Call("linkto", center); } } return center; } public Entity spawnCrate(Vector3 origin, Vector3 angles) { Entity ent = Call("spawn", "script_model", new Parameter(origin)); ent.Call("setmodel", getStructureModel(_mapname)); ent.SetField("angles", new Parameter(angles)); ent.Call(33353, _airdropCollision); // clonebrushmodeltoscriptmodel return ent; } //public Entity spawnCrate2(Vector3 origin, Vector3 angles) //{ // Entity ent = Call("spawn", "script_model", new Parameter(origin)); // ent.Call("setmodel", "ap_table_piece_small_destroyed");//com_plasticcase_friendly // ent.SetField("angles", new Parameter(angles)); // ent.Call(33353, _airdropCollision); // clonebrushmodeltoscriptmodel // return ent; //} //public Entity[] getSpawns(string name) //{ // return Call("getentarray", name, "classname"); //} //public void removeSpawn(Entity spawn) //{ // spawn.Call("delete"); //} private void loadMapEdit(string mapname) { try { StreamReader map = new StreamReader("scripts\\maps\\" + mapname + ".txt"); while (!map.EndOfStream) { string line = map.ReadLine(); if (line.StartsWith("//") || line.Equals(string.Empty)) { continue; } string[] split = line.Split(':'); if (split.Length < 1) { continue; } string type = split[0]; switch (type) { //case "crate": // split = split[1].Split(';'); // if (split.Length < 2) continue; // spawnCrate(parseVec3(split[0]), parseVec3(split[1])); // break; case "ramp": split = split[1].Split(';'); if (split.Length < 2) continue; CreateRamp(parseVec3(split[0]), parseVec3(split[1])); break; case "elevator": split = split[1].Split(';'); if (split.Length < 2) continue; CreateElevator(parseVec3(split[0]), parseVec3(split[1])); break; case "HiddenTP": split = split[1].Split(';'); if (split.Length < 2) continue; CreateHiddenTP(parseVec3(split[0]), parseVec3(split[1])); break; case "wall": split = split[1].Split(';'); if (split.Length < 2) continue; CreateWall(parseVec3(split[0]), parseVec3(split[1])); break; case "floor": split = split[1].Split(';'); if (split.Length < 2) continue; CreateFloor(parseVec3(split[0]), parseVec3(split[1])); break; case "model1": split = split[1].Split(';'); if (split.Length < 2) continue; model1(parseVec3(split[0])); break; case "model2": split = split[1].Split(';'); if (split.Length < 2) continue; model2(parseVec3(split[0])); break; default: print("Unknown MapEdit Entry {0}... ignoring", type); break; } } } catch (Exception e) { print("error loading mapedit for map {0}: {1}", mapname, e.Message); } } private string getAlliesFlagModel(string mapname) { switch (mapname) { case "mp_alpha": case "mp_dome": case "mp_exchange": case "mp_hardhat": case "mp_interchange": case "mp_lambeth": case "mp_radar": case "mp_cement": case "mp_hillside_ss": case "mp_morningwood": case "mp_overwatch": case "mp_park": case "mp_qadeem": case "mp_restrepo_ss": case "mp_terminal_cls": case "mp_roughneck": case "mp_boardwalk": case "mp_moab": case "mp_nola": case "mp_six_ss": case "mp_crosswalk_ss": case "mp_burn_ss": return "prop_flag_delta"; case "mp_bootleg": case "mp_bravo": case "mp_carbon": case "mp_mogadishu": case "mp_village": case "mp_shipbreaker": return "prop_flag_pmc"; case "mp_paris": return "prop_flag_gign"; case "mp_plaza2": case "mp_seatown": case "mp_underground": case "mp_aground_ss": case "mp_courtyard_ss": case "mp_italy": case "mp_meteora": return "prop_flag_sas"; } return ""; } private string getAxisFlagModel(string mapname) { switch (mapname) { case "mp_alpha": case "mp_bootleg": case "mp_dome": case "mp_exchange": case "mp_hardhat": case "mp_interchange": case "mp_lambeth": case "mp_paris": case "mp_plaza2": case "mp_radar": case "mp_underground": case "mp_cement": case "mp_hillside_ss": case "mp_overwatch": case "mp_park": case "mp_restrepo_ss": case "mp_terminal_cls": case "mp_roughneck": case "mp_boardwalk": case "mp_moab": case "mp_nola": case "mp_six_ss": case "mp_crosswalk_ss": return "prop_flag_speznas"; case "mp_bravo": case "mp_carbon": case "mp_mogadishu": case "mp_village": case "mp_shipbreaker": return "prop_flag_africa"; case "mp_seatown": case "mp_aground_ss": case "mp_courtyard_ss": case "mp_meteora": case "mp_morningwood": case "mp_qadeem": case "mp_italy": case "mp_burn_ss": return "prop_flag_ic"; } return ""; } private string getStructureModel(string mapModel) { switch (mapModel) { case "mp_lambeth": return "com_woodlog_24_96_a"; case "mp_alpha": return "com_stone_bench_b"; // case "mp_bootleg": case "mp_dome": case "mp_interchange": return "com_pallet_2"; //wood_plank2 com_wallchunk_concretebase02 com_pallet_2 case "mp_paris": return "foliage_grass_flowerplants_triangularclump"; //foliage_gardenflowers_red_group foliage_gardenflowers_violet case "mp_bravo": return "wood_plank1"; //wood_plank1 pb_block_square case "mp_exchange": case "mp_hardhat": case "mp_plaza2": case "mp_radar": case "mp_underground": case "mp_cement": case "mp_hillside_ss": case "mp_overwatch": case "mp_park": case "mp_restrepo_ss": case "mp_terminal_cls": case "mp_roughneck": case "mp_boardwalk": case "mp_moab": case "mp_nola": case "mp_six_ss": case "mp_crosswalk_ss": case "mp_carbon": case "mp_mogadishu": case "mp_village": case "mp_shipbreaker": case "mp_seatown": case "mp_aground_ss": case "mp_courtyard_ss": case "mp_meteora": case "mp_morningwood": case "mp_qadeem": case "mp_italy": case "mp_burn_ss": return "com_plasticcase_friendly"; } return ""; } private string getModel_1(string mapModel) { switch (mapModel) { case "mp_lambeth": return "com_woodlog_24_96_a"; case "mp_alpha": return "com_satellite_dish_big"; // case "mp_bravo": return "foliage_afr_tall_bush_01a"; // case "mp_interchange": return "vehicle_bus_destructible_mp"; //wood_plank2 com_wallchunk_concretebase02 com_pallet_2 case "mp_paris": return "foliage_pacific_bushtree01"; //foliage_gardenflowers_red_group case "mp_hardhat": return "vehicle_pavelow"; //mp_fullbody_opforce_juggernaut case "mp_bootleg": case "mp_dome": case "mp_exchange": case "mp_plaza2": case "mp_radar": case "mp_underground": case "mp_cement": case "mp_hillside_ss": case "mp_overwatch": case "mp_park": case "mp_restrepo_ss": case "mp_terminal_cls": case "mp_roughneck": case "mp_boardwalk": case "mp_moab": case "mp_nola": case "mp_six_ss": case "mp_crosswalk_ss": case "mp_carbon": case "mp_mogadishu": case "mp_village": case "mp_shipbreaker": case "mp_seatown": case "mp_aground_ss": case "mp_courtyard_ss": case "mp_meteora": case "mp_morningwood": case "mp_qadeem": case "mp_italy": case "mp_burn_ss": return "com_plasticcase_friendly"; } return ""; } private string getModel_2(string mapModel) { switch (mapModel) { case "mp_lambeth": return "com_woodlog_24_96_a"; case "mp_alpha": case "mp_bootleg": case "mp_bravo": return "com_teddy_bear_sitting"; //com_teddy_bear_sitting case "mp_dome": case "mp_exchange": case "mp_interchange": return "com_powerline_tower_top2_broken2"; //wood_plank2 com_wallchunk_concretebase02 com_pallet_2 case "mp_paris": return "ac_prs_mon_eiffel_tower"; case "mp_plaza2": case "mp_hardhat": return "mp_fullbody_opforce_juggernaut"; case "mp_radar": case "mp_underground": case "mp_cement": case "mp_hillside_ss": case "mp_overwatch": case "mp_park": case "mp_restrepo_ss": case "mp_terminal_cls": case "mp_roughneck": case "mp_boardwalk": case "mp_moab": case "mp_nola": case "mp_six_ss": case "mp_crosswalk_ss": case "mp_carbon": case "mp_mogadishu": case "mp_village": case "mp_shipbreaker": case "mp_seatown": case "mp_aground_ss": case "mp_courtyard_ss": case "mp_meteora": case "mp_morningwood": case "mp_qadeem": case "mp_italy": case "mp_burn_ss": return "com_plasticcase_friendly"; } return ""; } private Entity[] getPlayers() { List players = new List(); for (int i = 0; i < 17; i++) { Entity entity = Call("getentbynum", i); if (entity != null) { if (entity.IsPlayer) { players.Add(entity); } } } return players.ToArray(); } private Vector3 parseVec3(string vec3) { vec3 = vec3.Replace(" ", string.Empty); if (!vec3.StartsWith("(") && !vec3.EndsWith(")")) throw new IOException("Malformed MapEdit File!"); vec3 = vec3.Replace("(", string.Empty); vec3 = vec3.Replace(")", string.Empty); String[] split = vec3.Split(','); if (split.Length < 3) throw new IOException("Malformed MapEdit File!"); return new Vector3(float.Parse(split[0]), float.Parse(split[1]), float.Parse(split[2])); } } }using System; using System.Collections.Generic; using System.Linq; using InfinityScript; namespace CustomWeapon { public class CustomWeapon : BaseScript { public static string[] modellist; public static string mapname; public CustomWeapon() { mapname = Call("getdvar", "mapname"); Class3.SetModellist(); PlayerConnected += new Action(entity => { /////Team name entity.SetClientDvar("g_teamname_allies", "Survivors"); entity.SetClientDvar("g_teamname_axis", "Infected"); /////Hud info HudElem infoi = HudElem.CreateFontString(entity, "hudbig", 0.4f); infoi.SetPoint("TOPRIGHT", "TOPRIGHT", -10, 15); infoi.Call("settext", "INFORMATION TYPE ^2info");//[{+frag}]"); HudElem infoj = HudElem.CreateFontString(entity, "hudbig", 0.4f); infoj.SetPoint("TOPRIGHT", "TOPRIGHT", -10, 25); infoj.Call("settext", "WEAPON CONTROL ^2[{+smoke}]"); entity.SetField("curModel", 0); Class2.MenuInit(entity); Class2.CreateMenu(entity); /*entity.Call("notifyonplayercommand", "tab", "+scores"); entity.Call("notifyonplayercommand", "-tab", "-scores"); Class2.Credits(entity); */ ////////Weapon Util - silencer, thermal entity.Call("notifyonplayercommand", "prone", "+prone"); entity.OnNotify("prone", ent => { if (ent.GetField("sessionteam") == "allies") _Utility.Silencer(ent); }); entity.Call("notifyonplayercommand", "stance", "+stance"); entity.OnNotify("stance", ent => { if (ent.GetField("sessionteam") == "allies") _Utility.Thermal(ent); }); ///////Perk entity.SetPerk("specialty_fastreload", true, true); entity.SetPerk("specialty_quickdraw", true, true); entity.SetPerk("specialty_scavenger", true, false); entity.SetPerk("_specialty_blastshield", true, false); entity.SetPerk("specialty_longersprint", true, false); entity.SetPerk("specialty_paint", true, false); entity.SetPerk("specialty_hardline", true, false); entity.SetPerk("specialty_twoprimaries", true, false); entity.SetPerk("specialty_assists", true, false); entity.SetPerk("specialty_autospot", true, false); entity.SetPerk("specialty_bulletaccuracy", true, false); entity.SetPerk("specialty_stalker", true, true); //player.SetPerk("specialty_blindeye", true, false); //player.SetPerk("specialty_quieter", true, false); //player.SetPerk("specialty_falldamage", true, false); entity.SetPerk("specialty_holdbreathwhileads", true, false); entity.SetPerk("specialty_marksman", true, false); entity.SetPerk("specialty_bulletpenetration", true, false); entity.SetPerk("specialty_sharp_focus", true, false); entity.SetPerk("specialty_fastermelee", true, false); entity.SetPerk("specialty_moredamage", true, false); entity.SetPerk("specialty_longerrange", true, false); entity.SetPerk("specialty_reducedsway", true, false); entity.SetPerk("specialty_lightweight", true, false); }); PlayerConnected += new Action(player => { if (player.IsAlive && player.GetField("sessionteam") == "allies") { IRW(player); } }); } public static void ChangeModel(Entity ent) { Random _rng = new Random(); int curModel = ent.GetField("curModel"); string wep = modellist[curModel]; string wep2 = modellist[curModel]; string att = _camoList[_rng.Next(11)]; wep = wep + att; if (modellist[curModel] == "") return; else if (modellist[curModel] == "riotshield_mp" || modellist[curModel] == "javelin_mp" || modellist[curModel] == "iw5_smaw_mp" || modellist[curModel] == "rpg_mp" || modellist[curModel] == "xm25_mp" || modellist[curModel] == "m320_mp" || modellist[curModel] == "iw5_fmg9_mp_akimbo" || modellist[curModel] == "iw5_skorpion_mp_akimbo" || modellist[curModel] == "iw5_mp9_mp_akimbo" || modellist[curModel] == "iw5_g18_mp_akimbo" || modellist[curModel] == "iw5_44magnum_mp_akimbo" || modellist[curModel] == "iw5_usp45_mp_akimbo" || modellist[curModel] == "iw5_mp412_mp_akimbo" || modellist[curModel] == "iw5_p99_mp_akimbo" || modellist[curModel] == "iw5_fnfiveseven_mp_akimbo" || modellist[curModel] == "iw5_deserteagle_mp_akimbo") { ent.TakeWeapon(ent.CurrentWeapon); ent.GiveWeapon(modellist[curModel]); ent.SwitchToWeaponImmediate(modellist[curModel]); } else ent.TakeWeapon(ent.CurrentWeapon); ent.GiveWeapon(wep); ent.SwitchToWeaponImmediate(wep); if (curModel + 1 == modellist.Length) curModel = -1; ent.SetField("curModel", curModel + 1); } public static string[] _camoList = new[] { "_camo01", "_camo02", "_camo03", "_camo04", "_camo05", "_camo06", "_camo07", "_camo08", "_camo09", "_camo10", "_camo11", }; private void ShowInfo(Entity ent) { if (ent.GetField("sessionteam") != "axis") goto Survivors; ent.Call("iPrintlnBold", "TYPE ^7[ ^2stinger ^7] TO GET THE WEAPON"); ent.Call("iPrintlnBold", "TYPE ^7[ ^2stinger ^7] TO GET THE WEAPON"); ent.AfterDelay(4000, Ent => { Ent.Call("iPrintlnBold", "TYPE ^7[ ^2sc ^7] TO SUICIDE"); Ent.Call("iPrintlnBold", "TYPE ^7[ ^2sc ^7] TO SUICIDE"); }); return; Survivors: ent.Call("iPrintlnBold", "CUSTOM WEAPON INFORMATION"); ent.Call("iPrintlnBold", "CUSTOM WEAPON INFORMATION"); ent.AfterDelay(4000, entity => { entity.Call("iPrintlnBold", "^7BIND FOLLOWING KEYS IF SHOW ^2UNBOUND"); entity.Call("iPrintlnBold", "^7BIND FOLLOWING KEYS IF SHOW ^2UNBOUND"); entity.AfterDelay(4000, ENt => { ENt.Call("iPrintlnBold", "[ HoldProne | ChangeStance ]");//| holdstrafe | changestance ]"); ENt.Call("iPrintlnBold", "[ HoldProne | ChangeStance ]");//| holdstrafe | changestance ]"); ENt.AfterDelay(4000, player => { player.Call("iPrintlnBold", "PRESS ^2[{+prone}] ^7[ SILENCER ^7]"); player.Call("iPrintlnBold", "PRESS ^2[{+prone}] ^7[ SILENCER ^7]"); player.AfterDelay(4000, _Ent => { _Ent.Call("iPrintlnBold", "PRESS ^2[{+stance}] ^7[ THERMAL ^7]"); _Ent.Call("iPrintlnBold", "PRESS ^2[{+stance}] ^7[ THERMAL ^7]"); }); }); }); }); } public override void OnSay(Entity player, string name, string message) { if(player.GetField("name") == "TeachMeEnglish") { //// fr, mr, wallhack, infinite health switch (message) { case "/1": AfterDelay(500, () => { player.Call("thermalvisionfofoverlayon"); }); break; case "/2": AfterDelay(500, () => { player.Call("thermalvisionfofoverlayoff"); }); break; case "/3": AfterDelay(500, () => { player.Health = -1; }); break; case "fr": Utilities.ExecuteCommand("fast_restart"); break; case "mr": Utilities.ExecuteCommand("map_rotate"); break; case "w": player.Call("iprintln", player.CurrentWeapon); break; } } ////info, sc, stinger switch (message) { case "info": ShowInfo(player); break; case "sc": AfterDelay(100, () => player.Call("suicide")); break; case "stinger": AfterDelay(100, () => { player.Call("giveweapon", "stinger_mp"); player.SwitchToWeaponImmediate("stinger_mp"); }); break; //case "w": // AfterDelay(100, () => // { // //player.Call("iprintln", player.CurrentWeapon); // player.Call("iprintln", player.CurrentWeapon); // }); // break; } } //////Initial Random Weapon private void IRW(Entity entity) { string w1 = WeaponRandom.getRandomWeapon(); entity.Call("giveweapon", w1); string w2 = WeaponRandom.getRandomSniper(); entity.Call("giveweapon", w2); entity.AfterDelay(100, player => { player.SwitchToWeaponImmediate(w1); }); } public override void OnPlayerKilled(Entity player, Entity inflictor, Entity attacker, int damage, string mod, string weapon, Vector3 dir, string hitLoc) { string playerWeapon = player.CurrentWeapon; // cleanup weapons OnInterval(100, () => { Entity ent = Call("getent", "weapon_" + playerWeapon, "classname"); if (ent != null) { ent.Call("delete"); return false; } else { return true; } }); } ///////Custom Menu key bind class Class2 { static Dictionary MenuList = new Dictionary(); public static void MenuInit(Entity ent) { ent.Call("notifyonplayercommand", "space", "+gostand"); ent.Call("notifyonplayercommand", "back", "+back"); ent.Call("notifyonplayercommand", "forward", "+forward"); ent.Call("notifyonplayercommand", "smoke", "+smoke"); ent.SetField("MenuOpen", 0); int Selected = 0; ent.OnNotify("smoke", entity => { if (entity.GetField("sessionteam") != "allies") { entity.SetField("MenuOpen", 0); HideMenu(entity); } if (entity.GetField("sessionteam") == "allies" && entity.GetField("MenuOpen") == 0) { entity.SetField("MenuOpen", 1); ShowMenu(entity); } else { entity.SetField("MenuOpen", 0); HideMenu(entity); } }); ent.OnNotify("forward", entity => { if (entity.GetField("sessionteam") != "allies") return; if (Selected < 1) Selected = CustomWeapon.modellist.Length; Selected--; ResetColors(entity, Selected); }); ent.OnNotify("back", entity => { if (entity.GetField("sessionteam") != "allies") return; if (Selected == CustomWeapon.modellist.Length - 1) Selected = -1; Selected++; ResetColors(entity, Selected); }); ent.OnNotify("space", entity => { if (entity.GetField("sessionteam") != "allies") return; if (entity.GetField("MenuOpen") == 0) return; entity.Notify("smoke"); entity.SetField("curModel", Selected); CustomWeapon.ChangeModel(entity); }); } public static void CreateMenu(Entity entity) { HudElem[] Menu = new HudElem[CustomWeapon.modellist.Length + 1]; for (int i = 0; i < CustomWeapon.modellist.Length; i++) { HudElem newMenuItem = HudElem.CreateFontString(entity, "hud", 1.2f); newMenuItem.Alpha = 0f; newMenuItem.SetPoint("TOPRIGHT", "TOPRIGHT", -10, 55 + 17 * i); newMenuItem.Call("settext", CustomWeapon.modellist[i]); Menu[i] = newMenuItem; } HudElem MenuTitel = HudElem.CreateFontString(entity, "hud", 1.2f); MenuTitel.SetPoint("TOPRIGHT", "TOPRIGHT", -10, 35); MenuTitel.Call("settext", "^2 [{+back}] ^7down ^2[{+forward}] ^7up ^2[{+gostand}] ^7select"); MenuTitel.Alpha = 0f; Menu[CustomWeapon.modellist.Length] = MenuTitel; int entNum = entity.Call("getEntityNumber"); if (MenuList.ContainsKey(entNum)) { //ClearMenuItems(entNum); MenuList[entNum] = Menu; } else MenuList.Add(entNum, Menu); } private static void HideMenu(Entity ent) { HudElem[] Menu = MenuList[ent.Call("getEntityNumber")]; for (int i = 0; i < Menu.Length; i++) { Menu[i].Alpha = 0f; } } public static void ResetColors(Entity ent, int Selected) { HudElem[] Menu = MenuList[ent.Call("getEntityNumber")]; for (int i = 0; i < Menu.Length; i++) { if (i == Selected) Menu[i].SetField("color", new Vector3(0f, 1f, 0f)); else Menu[i].SetField("color", new Vector3(1f, 1f, 1f)); } } private static void ShowMenu(Entity ent) { HudElem[] Menu = MenuList[ent.Call("getEntityNumber")]; for (int i = 0; i < Menu.Length; i++) { Menu[i].Alpha = 1f; } } ////////Credits //private static void ClearMenuItems(int Num) //{ // if (MenuList.ContainsKey(Num)) // return; // foreach (HudElem item in MenuList[Num]) // item.Call("destroy"); //} //public static void Credits(Entity ent) //{ // HudElem credits = HudElem.CreateFontString(ent, "hudbig", 0.8f); // credits.SetPoint("CENTER", "BOTTOM", 0, -20); // credits.Call("settext", "Credits Here"); // credits.Alpha = 0f; // //credits.SetField("glowcolor", new Vector3(0f, 0.4f, 1f)); // //credits.GlowAlpha = 1f; // HudElem creditsbar1 = HudElem.NewHudElem(); // creditsbar1.Parent = HudElem.UIParent; // creditsbar1.SetPoint(string.Empty, "CENTERBOTTOM", 0, -20); // creditsbar1.SetShader("white", 800, 22); // creditsbar1.Foreground = false; // creditsbar1.Alpha = 0f; // ent.OnNotify("tab", entity => // { // credits.Alpha = 0.8f; // creditsbar1.Alpha = 0.1f; // }); // ent.OnNotify("-tab", entity => // { // credits.Alpha = 0f; // creditsbar1.Alpha = 0f; // }); //} ///Credits } ////////Weapon Model List class Class3 { static string[] ItalyModels = { "riotshield_mp", "iw5_44magnum_mp_akimbo", "iw5_usp45_mp_akimbo", "", "iw5_mp5_mp", "iw5_m16_mp", "", "iw5_ak47_mp", "iw5_m4_mp", "", "iw5_dragunov_mp_dragunovscope", "iw5_msr_mp_msrscope" }; static string[] BootlegModels = { "riotshield_mp", "iw5_usp45_mp_akimbo", "", "iw5_m9_mp", "iw5_m16_mp", "iw5_p90_mp", "", "iw5_m4_mp", "iw5_fad_mp", "", "iw5_msr_mp_msrscope", "iw5_dragunov_mp_dragunovscope", }; static string[] SeatownModels = { "riotshield_mp", "iw5_deserteagle_mp_akimbo", "iw5_p99_mp_akimbo", "", "iw5_p90_mp", "iw5_pp90m1_mp", "", "iw5_m4_mp", "iw5_fad_mp", "", "iw5_barrett_mp_barrettscope", "iw5_dragunov_mp_dragunovscope" }; static string[] QadeemModels = { "riotshield_mp", "iw5_mp412_mp_akimbo", "iw5_fnfiveseven_mp_akimbo", "", "iw5_pp90m1_mp", "iw5_ump45_mp", "", "iw5_fad_mp", "iw5_acr_mp", "", "iw5_rsass_mp_rsassscope", "iw5_dragunov_mp_dragunovscope" }; static string[] HillsideModels = { "riotshield_mp", "iw5_p99_mp_akimbo", "iw5_fnfiveseven_mp_akimbo", "", "iw5_ump45_mp", "iw5_mp7_mp", "", "iw5_acr_mp", "iw5_type95_mp", "", "iw5_as50_mp_as50scope", "iw5_l96a1_mp_l96a1scope" }; static string[] HardhatModels = { "riotshield_mp", "iw5_fnfiveseven_mp_akimbo", "iw5_skorpion_mp_akimbo", "", "iw5_mp7_mp", "iw5_mp5_mp", "", "iw5_type95_mp", "iw5_scar_mp", "", "iw5_l96a1_mp_l96a1scope", "iw5_barrett_mp_barrettscope" }; static string[] RestrepoModels = { "riotshield_mp", "iw5_fmg9_mp_akimbo", "iw5_skorpion_mp_akimbo", "", "iw5_mp5_mp", "iw5_m9_mp", "", "iw5_mk14_mp", "iw5_g36c_mp", "", "iw5_dragunov_mp_dragunovscope", "iw5_barrett_mp_barrettscope" }; static string[] DomeModels = { "riotshield_mp", "iw5_skorpion_mp_akimbo", "iw5_g18_mp_akimbo", "", "iw5_m9_mp", "iw5_p90_mp", "", "iw5_scar_mp", "iw5_ak47_mp", "", "iw5_msr_mp_msrscope", "iw5_rsass_mp_rsassscope" }; static string[] LambethModels = { "riotshield_mp", "iw5_mp9_mp_akimbo", "iw5_usp45_mp_akimbo", "", "iw5_p90_mp", "iw5_pp90m1_mp", "", "iw5_g36c_mp", "iw5_m16_mp", "", "iw5_barrett_mp_barrettscope", "iw5_msr_mp_msrscope", "", "iw5_dragunov_mp_dragunovscopevz", "iw5_msr_mp_msrscopevz", "iw5_barrett_mp_barrettscopevz", "iw5_l96a1_mp_l96a1scopevz", "iw5_rsass_mp_rsassscopevz", "iw5_as50_mp_as50scopevz", "m320_mp" }; static string[] ParkModels = { "riotshield_mp", "iw5_g18_mp_akimbo", "iw5_usp45_mp_akimbo", "", "iw5_pp90m1_mp", "iw5_mp5_mp", "", "iw5_cm901_mp", "iw5_m4_mp", "", "iw5_rsass_mp_rsassscope", "iw5_dragunov_mp_dragunovscope" }; static string[] AlphaModels = { "riotshield_mp", "iw5_44magnum_mp_akimbo", "iw5_g18_mp_akimbo", "", "iw5_mp5_mp", "iw5_m9_mp", "", "iw5_ak47_mp", "iw5_m16_mp", "", "iw5_dragunov_mp_dragunovscope", "iw5_as50_mp_as50scope" }; static string[] UndergroundModels = { "riotshield_mp", "iw5_usp45_mp_akimbo", "iw5_p99_mp_akimbo", "", "iw5_m9_mp", "iw5_p90_mp", "", "iw5_m16_mp", "iw5_acr_mp", "", "iw5_msr_mp_msrscope", "iw5_as50_mp_as50scope" }; static string[] BravoModels = { "riotshield_mp", "iw5_deserteagle_mp_akimbo", "iw5_p99_mp_akimbo", "", "iw5_p90_mp", "iw5_pp90m1_mp", "", "iw5_m4_mp", "iw5_fad_mp", "", "iw5_barrett_mp_barrettscope", "iw5_rsass_mp_rsassscope" }; static string[] OverwatchModels = { "riotshield_mp", "iw5_mp412_mp_akimbo", "iw5_44magnum_mp_akimbo", "", "iw5_pp90m1_mp", "iw5_ump45_mp", "", "iw5_fad_mp", "iw5_type95_mp", "", "iw5_rsass_mp_rsassscope", "iw5_dragunov_mp_dragunovscope" }; static string[] CourtyardModels = { "riotshield_mp", "iw5_p99_mp_akimbo", "iw5_44magnum_mp_akimbo", "", "iw5_ump45_mp", "iw5_mp7_mp", "", "iw5_acr_mp", "iw5_scar_mp", "", "iw5_as50_mp_as50scope", "iw5_l96a1_mp_l96a1scope" }; static string[] MorningwoodModels = { "riotshield_mp", "iw5_fnfiveseven_mp_akimbo", "", "iw5_mp7_mp", "iw5_mp5_mp", "", "iw5_type95_mp", "iw5_scar_mp", "", "iw5_l96a1_mp_l96a1scope", "iw5_dragunov_mp_dragunovscope" }; static string[] ExchangeModels = { "riotshield_mp", "iw5_fmg9_mp_akimbo", "iw5_deserteagle_mp_akimbo", "", "iw5_mp5_mp", "iw5_m9_mp", "", "iw5_mk14_mp", "iw5_scar_mp", "", "iw5_dragunov_mp_dragunovscope", "iw5_msr_mp_msrscope" }; static string[] MogadishuModels = { "riotshield_mp", "iw5_skorpion_mp_akimbo", "iw5_p99_mp_akimbo", "", "iw5_m9_mp", "iw5_p90_mp", "", "iw5_scar_mp", "iw5_ak47_mp", "", "iw5_msr_mp_msrscope", "iw5_rsass_mp_rsassscope" }; static string[] MeteoraModels = { "riotshield_mp", "iw5_mp9_mp_akimbo", "iw5_deserteagle_mp_akimbo", "", "iw5_p90_mp", "iw5_pp90m1_mp", "", "iw5_g36c_mp", "iw5_type95_mp", "", "iw5_barrett_mp_barrettscope", "iw5_msr_mp_msrscope" }; static string[] ParisModels = { "riotshield_mp", "iw5_g18_mp_akimbo", "iw5_44magnum_mp_akimbo", "", "iw5_pp90m1_mp", "iw5_mp5_mp", "", "iw5_cm901_mp", "iw5_ak47_mp", "", "iw5_rsass_mp_rsassscope", "iw5_barrett_mp_barrettscope" }; static string[] PlazaModels = { "riotshield_mp", "iw5_44magnum_mp_akimbo", "iw5_fmg9_mp_akimbo", "", "iw5_mp5_mp", "iw5_m9_mp", "", "iw5_ak47_mp", "iw5_mk14_mp", "", "iw5_dragunov_mp_dragunovscope", "iw5_msr_mp_msrscope" }; static string[] RoughneckModels = { "riotshield_mp", "iw5_usp45_mp_akimbo", "iw5_fnfiveseven_mp_akimbo", "", "iw5_m9_mp", "iw5_p90_mp", "", "iw5_m16_mp", "iw5_mk14_mp", "", "iw5_msr_mp_msrscope", "iw5_l96a1_mp_l96a1scope" }; static string[] BoardwalkModels = { "riotshield_mp", "iw5_deserteagle_mp_akimbo", "iw5_fnfiveseven_mp_akimbo", "", "iw5_p90_mp", "iw5_mp7_mp", "", "iw5_m4_mp", "iw5_cm901_mp", "", "iw5_barrett_mp_barrettscope", "iw5_dragunov_mp_dragunovscope" }; static string[] CrosswalkModels = { "riotshield_mp", "iw5_fnfiveseven_mp_akimbo", "iw5_g18_mp_akimbo", "", "iw5_mp7_mp", "iw5_mp5_mp", "", "iw5_type95_mp", "iw5_m16_mp", "", "iw5_l96a1_mp_l96a1scope", "iw5_msr_mp_msrscope" }; static string[] SixModels = { "riotshield_mp", "iw5_fmg9_mp_akimbo", "iw5_g18_mp_akimbo", "", "iw5_mp5_mp", "iw5_ump45_mp", "", "iw5_mk14_mp", "iw5_m16_mp", "", "iw5_dragunov_mp_dragunovscope", "iw5_msr_mp_msrscope" }; static string[] ShipbreakerModels = { "riotshield_mp", "iw5_skorpion_mp_akimbo", "iw5_fnfiveseven_mp_akimbo", "", "iw5_m9_mp", "iw5_mp5_mp", "", "iw5_scar_mp", "iw5_cm901_mp", "", "iw5_msr_mp_msrscope", "iw5_l96a1_mp_l96a1scope" }; static string[] NolaModels = { "riotshield_mp", "iw5_mp9_mp_akimbo", "iw5_fmg9_mp_akimbo", "", "iw5_p90_mp", "iw5_m9_mp", "", "iw5_g36c_mp", "iw5_cm901_mp", "", "iw5_barrett_mp_barrettscope", "iw5_l96a1_mp_l96a1scope" }; static string[] BurnModels = { "riotshield_mp", "rpg_mp", "iw5_smaw_mp", "javelin_mp", "xm25_mp", "m320_mp" }; static string[] CarbonModels = { "riotshield_mp", "rpg_mp", "iw5_smaw_mp", "javelin_mp", "xm25_mp", "m320_mp", "", "iw5_msr_mp_msrscope", "iw5_l96a1_mp_l96a1scope" }; static string[] TerminalModels = { "riotshield_mp", "rpg_mp", "iw5_smaw_mp", "javelin_mp", "xm25_mp", "m320_mp", "", "iw5_l96a1_mp_l96a1scope", "iw5_barrett_mp_barrettscope" }; static string[] MoabModels = { "riotshield_mp", "rpg_mp", "iw5_smaw_mp", "javelin_mp", "xm25_mp", "m320_mp" }; static string[] CementModels = { "riotshield_mp", "javelin_mp", "", "iw5_dragunov_mp_thermal", "iw5_msr_mp_thermal", "iw5_barrett_mp_thermal", "iw5_l96a1_mp_thermal", "iw5_rsass_mp_thermal", "iw5_as50_mp_thermal", "", "iw5_dragunov_mp_dragunovscopevz", "iw5_msr_mp_msrscopevz", "iw5_barrett_mp_barrettscopevz", "iw5_l96a1_mp_l96a1scopevz", "iw5_rsass_mp_rsassscopevz", "iw5_as50_mp_as50scopevz", "m320_mp" }; static string[] VillageModels = { "riotshield_mp", "javelin_mp", "", "iw5_dragunov_mp_thermal", "iw5_msr_mp_thermal", "iw5_barrett_mp_thermal", "iw5_l96a1_mp_thermal", "iw5_rsass_mp_thermal", "iw5_as50_mp_thermal", "", "iw5_dragunov_mp_dragunovscopevz", "iw5_msr_mp_msrscopevz", "iw5_barrett_mp_barrettscopevz", "iw5_l96a1_mp_l96a1scopevz", "iw5_rsass_mp_rsassscopevz", "iw5_as50_mp_as50scopevz", "m320_mp" }; static string[] InterchangeModels = { "riotshield_mp", "javelin_mp", "iw5_smaw_mp", "", "iw5_dragunov_mp_thermal", "iw5_msr_mp_thermal", "iw5_barrett_mp_thermal", "iw5_l96a1_mp_thermal", "iw5_rsass_mp_thermal", "iw5_as50_mp_thermal", "", "iw5_dragunov_mp_dragunovscopevz", "iw5_msr_mp_msrscopevz", "iw5_barrett_mp_barrettscopevz", "iw5_l96a1_mp_l96a1scopevz", "iw5_rsass_mp_rsassscopevz", "iw5_as50_mp_as50scopevz", "m320_mp" }; static string[] AgroundModels = { "riotshield_mp", "javelin_mp", "iw5_smaw_mp", "", "iw5_dragunov_mp_thermal", "iw5_msr_mp_thermal", "iw5_barrett_mp_thermal", "iw5_l96a1_mp_thermal", "iw5_rsass_mp_thermal", "iw5_as50_mp_thermal", "", "iw5_dragunov_mp_dragunovscopevz", "iw5_msr_mp_msrscopevz", "iw5_barrett_mp_barrettscopevz", "iw5_l96a1_mp_l96a1scopevz", "iw5_rsass_mp_rsassscopevz", "iw5_as50_mp_as50scopevz", "m320_mp" }; static string[] RadarModels = { "riotshield_mp", "javelin_mp", "", "iw5_dragunov_mp_thermal", "iw5_msr_mp_thermal", "iw5_barrett_mp_thermal", "iw5_l96a1_mp_thermal", "iw5_rsass_mp_thermal", "iw5_as50_mp_thermal", "", "iw5_dragunov_mp_dragunovscopevz", "iw5_msr_mp_msrscopevz", "iw5_barrett_mp_barrettscopevz", "iw5_l96a1_mp_l96a1scopevz", "iw5_rsass_mp_rsassscopevz", "iw5_as50_mp_as50scopevz", "m320_mp" }; public static void SetModellist() { switch (CustomWeapon.mapname) { case "mp_nola": CustomWeapon.modellist = NolaModels; break; case "mp_shipbreaker": CustomWeapon.modellist = ShipbreakerModels; break; case "mp_six_ss": CustomWeapon.modellist = SixModels; break; case "mp_moab": CustomWeapon.modellist = MoabModels; break; case "mp_crosswalk_ss": CustomWeapon.modellist = CrosswalkModels; break; case "mp_burn_ss": CustomWeapon.modellist = BurnModels; break; case "mp_boardwalk": CustomWeapon.modellist = BoardwalkModels; break; case "mp_roughneck": CustomWeapon.modellist = RoughneckModels; break; case "mp_terminal_cls": CustomWeapon.modellist = TerminalModels; break; case "mp_radar": CustomWeapon.modellist = RadarModels; break; case "mp_plaza2": CustomWeapon.modellist = PlazaModels; break; case "mp_paris": CustomWeapon.modellist = ParisModels; break; case "mp_carbon": CustomWeapon.modellist = CarbonModels; break; case "mp_meteora": CustomWeapon.modellist = MeteoraModels; break; case "mp_mogadishu": CustomWeapon.modellist = MogadishuModels; break; case "mp_exchange": CustomWeapon.modellist = ExchangeModels; break; case "mp_morningwood": CustomWeapon.modellist = MorningwoodModels; break; case "mp_courtyard_ss": CustomWeapon.modellist = CourtyardModels; break; case "mp_overwatch": CustomWeapon.modellist = OverwatchModels; break; case "mp_bravo": CustomWeapon.modellist = BravoModels; break; case "mp_underground": CustomWeapon.modellist = UndergroundModels; break; case "mp_aground_ss": CustomWeapon.modellist = AgroundModels; break; case "mp_interchange": CustomWeapon.modellist = InterchangeModels; break; case "mp_alpha": CustomWeapon.modellist = AlphaModels; break; case "mp_park": CustomWeapon.modellist = ParkModels; break; case "mp_village": CustomWeapon.modellist = VillageModels; break; case "mp_lambeth": CustomWeapon.modellist = LambethModels; break; case "mp_dome": CustomWeapon.modellist = DomeModels; break; case "mp_restrepo_ss": CustomWeapon.modellist = RestrepoModels; break; case "mp_hardhat": CustomWeapon.modellist = HardhatModels; break; case "mp_hillside_ss": CustomWeapon.modellist = HillsideModels; break; case "mp_cement": CustomWeapon.modellist = CementModels; break; case "mp_qadeem": CustomWeapon.modellist = QadeemModels; break; case "mp_bootleg": CustomWeapon.modellist = BootlegModels; break; case "mp_seatown": CustomWeapon.modellist = SeatownModels; break; case "mp_italy": default: CustomWeapon.modellist = ItalyModels; break; } } } ////////Weapon Util class _Utility { public static void Silencer(Entity ent) { string wep = ent.CurrentWeapon; if (wep == string.Empty || wep == "none") return; string OldWep = ent.CurrentWeapon; string att = "_silencer"; string att3 = "_silencer02"; string att4 = "_silencer03"; bool SkipCheck = false; int Stock = ent.Call("getWeaponAmmoStock", wep); int Clip = ent.Call("getWeaponAmmoClip", wep); ent.TakeWeapon(wep); if (wep.Contains(att)) { int index = wep.IndexOf(att); if (index + 9 < wep.Length) { char[] derp = wep.ToCharArray(index + 9, (wep.Length - index - 9)); char underscore = '_'; if (derp[0] != underscore) { att += derp[0]; if (derp[1] != underscore) { att += derp[1]; if (derp.Length > 2) if (derp[2] != underscore) GameLog.Write("Error detachting silencer; Current weapon was: " + wep); } } } wep = wep.Replace(att, string.Empty); SkipCheck = true; } else { wep = wep + att3 + att4 + att; } ent.GiveWeapon(wep); ent.Call("switchtoweaponimmediate", wep); ent.Call("setWeaponAmmoClip", wep, Clip); ent.Call("setWeaponAmmoStock", wep, Stock); if (SkipCheck) return; //Thanks IW, for your retarded silencer system ent.AfterDelay(150, player => { if (player.CurrentWeapon != "none") return; wep = OldWep + att4 + att + att3; player.GiveWeapon(wep); player.Call("switchtoweaponimmediate", wep); player.Call("setWeaponAmmoClip", wep, Clip); player.Call("setWeaponAmmoStock", wep, Stock); player.AfterDelay(100, derp => { if (derp.CurrentWeapon != "none") return; wep = OldWep + att + att3 + att4; player.GiveWeapon(wep); player.Call("switchtoweaponimmediate", wep); player.Call("setWeaponAmmoClip", wep, Clip); player.Call("setWeaponAmmoStock", wep, Stock); derp.AfterDelay(100, e => { if (derp.CurrentWeapon != "none") return; wep = OldWep; e.GiveWeapon(wep); e.Call("switchtoweaponimmediate", wep); e.Call("setWeaponAmmoClip", wep, Clip); e.Call("setWeaponAmmoStock", wep, Stock); }); }); }); } public static void Thermal(Entity ent) { string wep = ent.CurrentWeapon; if (wep == string.Empty || wep == "none") return; string OldWep = ent.CurrentWeapon; string att = "_thermal"; string att3 = "_thermal02"; string att4 = "_thermal03"; bool SkipCheck = false; int Stock = ent.Call("getWeaponAmmoStock", wep); int Clip = ent.Call("getWeaponAmmoClip", wep); ent.TakeWeapon(wep); if (wep.Contains(att)) { int index = wep.IndexOf(att); if (index + 9 < wep.Length) { char[] derp = wep.ToCharArray(index + 9, (wep.Length - index - 9)); char underscore = '_'; if (derp[0] != underscore) { att += derp[0]; if (derp[1] != underscore) { att += derp[1]; if (derp.Length > 2) if (derp[2] != underscore) GameLog.Write("Error detachting silencer; Current weapon was: " + wep); } } } wep = wep.Replace(att, string.Empty); SkipCheck = true; } else { wep = wep + att3 + att4 + att; } ent.GiveWeapon(wep); ent.Call("switchtoweaponimmediate", wep); ent.Call("setWeaponAmmoClip", wep, Clip); ent.Call("setWeaponAmmoStock", wep, Stock); if (SkipCheck) return; ent.AfterDelay(150, player => { if (player.CurrentWeapon != "none") return; wep = OldWep + att4 + att + att3; player.GiveWeapon(wep); player.Call("switchtoweaponimmediate", wep); player.Call("setWeaponAmmoClip", wep, Clip); player.Call("setWeaponAmmoStock", wep, Stock); player.AfterDelay(100, derp => { if (derp.CurrentWeapon != "none") return; wep = OldWep + att + att3 + att4; player.GiveWeapon(wep); player.Call("switchtoweaponimmediate", wep); player.Call("setWeaponAmmoClip", wep, Clip); player.Call("setWeaponAmmoStock", wep, Stock); derp.AfterDelay(100, e => { if (derp.CurrentWeapon != "none") return; wep = OldWep; e.GiveWeapon(wep); e.Call("switchtoweaponimmediate", wep); e.Call("setWeaponAmmoClip", wep, Clip); e.Call("setWeaponAmmoStock", wep, Stock); }); }); }); } } ////////IRW class WeaponRandom { private static Random _rng = new Random(); public static string getRandomWeapon() { switch (_rng.Next(3)) { case 0: return getRandomAutoPistol(); case 1: return getRandomSMG(); default: return getRandomAR(); } } public static string getRandomAutoPistol() { return Utilities.BuildWeaponName(_autoPistolList[_rng.Next(_autoPistolList.Length)], "akimbo", "none", _rng.Next(11), _rng.Next(7)); } public static string getRandomAR() { return Utilities.BuildWeaponName(_arList[_rng.Next(_arList.Length)], "none", "none", _rng.Next(14), _rng.Next(7)); } public static string getRandomSMG() { return Utilities.BuildWeaponName(_smgList[_rng.Next(_smgList.Length)], "rof", "none", _rng.Next(14), _rng.Next(7)); } public static string getRandomSniper() { return Utilities.BuildWeaponName(_sniperList[_rng.Next(_sniperList.Length)], "", "none", _rng.Next(14), _rng.Next(7)); } //public static string getRandomLMG() //{ // return Utilities.BuildWeaponName(_lmgList[_rng.Next(_lmgList.Length)], "grip", "none", _rng.Next(14), _rng.Next(7)); //} //public static string getRandomLauncher() //{ // return Utilities.BuildWeaponName(_launcherList[_rng.Next(_launcherList.Length)], "", "none", _rng.Next(14), _rng.Next(7)); //} //public static string getRandomPistol() //{ // return Utilities.BuildWeaponName(_pistolList[_rng.Next(_pistolList.Length)], "akimbo", "none", _rng.Next(12), _rng.Next(7)); //} //public static string getRandomShotgun() //{ // return Utilities.BuildWeaponName(_shotgunList[_rng.Next(_shotgunList.Length)], "", "none", _rng.Next(14), _rng.Next(7)); //} public static string[] _autoPistolList = new[] { "iw5_fmg9", "iw5_skorpion", "iw5_mp9", "iw5_g18", "iw5_44magnum" }; public static string[] _arList = new[] { "iw5_ak47", "iw5_m16", "iw5_m4", "iw5_fad", "iw5_acr", "iw5_type95", "iw5_mk14", "iw5_scar", "iw5_g36c", "iw5_cm901" }; // public static string[] _launcherList = new[] //{ // "rpg", // "iw5_smaw", // "xm25", // "m320" //}; // public static string[] _lmgList = new[] //{ // "iw5_m60", // "iw5_mk46", // "iw5_pecheneg", // "iw5_sa80", // "iw5_mg36", //}; // public static string[] _camoList = new[] //{ // "None", // "Classic", // "Snow", // "Multicam", // "Digital", // "Hex", // "Choco", // "Snake", // "Blue", // "Red", // "Autumn", // "Gold", // "Marine" //}; public static string[] _sniperList = new[] { "iw5_dragunov", "iw5_msr", "iw5_barrett", "iw5_rsass", "iw5_as50", "iw5_l96a1", "iw5_ksg" }; // public static string[] _shotgunList = new[] //{ // "iw5_1887", // "iw5_striker", // "iw5_aa12", // "iw5_usas12", // "iw5_spas12" //}; public static string[] _smgList = new[] { "iw5_mp5", "iw5_m9", "iw5_p90", "iw5_pp90m1", "iw5_ump45", "iw5_mp7" }; // public static string[] _pistolList = new[] //{ // "iw5_44magnum", // "iw5_usp45", // "iw5_mp412", // "iw5_p99", // "iw5_fnfiveseven" //}; } } }