public a10() { GSCFunctions.PreCacheModel("vehicle_a10_warthog"); GSCFunctions.PreCacheMpAnim("MP_A10_strafing_run"); GSCFunctions.PreCacheShader("compass_objpoint_a10_friendly"); GSCFunctions.PreCacheShader("compass_objpoint_a10_enemy"); GSCFunctions.PreCacheMiniMapIcon("compass_objpoint_a10_friendly"); GSCFunctions.PreCacheMiniMapIcon("compass_objpoint_a10_enemy"); Dictionary <string, int> a10_fx = new Dictionary <string, int>(); a10_fx.Add("bullet_rain", GSCFunctions.LoadFX("misc/warthog_volley_runner")); a10_fx.Add("bullet_impacts", GSCFunctions.LoadFX("impacts/warthog_volley_runner")); a10_fx.Add("bullet_dust", GSCFunctions.LoadFX("dust/wing_drop_dust")); a10_fx.Add("afterburner", GSCFunctions.LoadFX("fire/jet_afterburner")); a10_fx.Add("contrail", GSCFunctions.LoadFX("smoke/jet_contrail")); a10_fx.Add("wingtip_light_green", GSCFunctions.LoadFX("misc/aircraft_light_wingtip_green")); a10_fx.Add("wingtip_light_red", GSCFunctions.LoadFX("misc/aircraft_light_wingtip_red")); level.SetField("a10_fx", new Parameter(a10_fx)); level.SetField("a10MaxHealth", 350); }
public Class1() { Utilities.PrintToConsole(string.Format("Plugin loaded at {0}", GSCFunctions.GetTime())); //GSCFunctions.PreCacheString("Test String"); //GSCFunctions.PreCacheStatusIcon("cardicon_iwlogo"); //GSCFunctions.PreCacheMenu("kickplayer"); //GSCFunctions.PreCacheMenu("elevator_floor_selector"); //GSCFunctions.PreCacheShader("faction_128_gign"); //Marshal.WriteInt32(new IntPtr(0x0585AE0C), 24); //Marshal.WriteInt32(new IntPtr(0x0585AE1C), 24); //working guns GSCFunctions.PreCacheItem("at4_mp"); GSCFunctions.PreCacheItem("airdrop_mega_marker_mp"); GSCFunctions.PreCacheItem("throwingknife_rhand_mp"); GSCFunctions.PreCacheItem("iw5_mk12spr_mp"); GSCFunctions.PreCacheItem("lightstick_mp"); GSCFunctions.PreCacheItem("killstreak_double_uav_mp"); GSCFunctions.PreCacheItem("strike_marker_mp"); GSCFunctions.PreCacheItem("killstreak_helicopter_minigun_mp"); GSCFunctions.PreCacheItem("airdrop_juggernaut_def_mp"); GSCFunctions.PreCacheItem("uav_strike_missile_mp"); GSCFunctions.PreCacheItem("uav_strike_projectile_mp"); GSCFunctions.PreCacheItem("iw5_xm25_mp"); GSCFunctions.PreCacheItem("iw5_riotshield_mp"); GSCFunctions.PreCacheItem("harrier_missile_mp"); //turret-only GSCFunctions.PreCacheTurret("manned_minigun_turret_mp"); GSCFunctions.PreCacheTurret("manned_gl_turret_mp"); GSCFunctions.PreCacheItem("remote_uav_weapon_mp"); GSCFunctions.PreCacheItem("aamissile_projectile_mp"); //Hacking in all fx //smoke /* * string[] smoke_fx; * smoke_fx = Directory.GetFiles(@"H:\USBFORMAT\MW3 GSCs\devraw\fx\smoke"); * for (int i = 0; i < smoke_fx.Length; i++) * { * GSCFunctions.LoadFX("smoke/" + smoke_fx[i].Split('\\')[6].Replace(".FXE", "")); * } * string[] prop_fx; * prop_fx = Directory.GetFiles(@"H:\USBFORMAT\MW3 GSCs\devraw\fx\props"); * for (int i = 0; i < prop_fx.Length; i++) * { * GSCFunctions.LoadFX("props/" + prop_fx[i].Split('\\')[6].Replace(".FXE", "")); * } * string[] dust_fx; * dust_fx = Directory.GetFiles(@"H:\USBFORMAT\MW3 GSCs\devraw\fx\dust"); * for (int i = 0; i < dust_fx.Length; i++) * { * GSCFunctions.LoadFX("dust/" + dust_fx[i].Split('\\')[6].Replace(".FXE", "")); * } * string[] exp_fx; * exp_fx = Directory.GetFiles(@"H:\USBFORMAT\MW3 GSCs\devraw\fx\explosions"); * for (int i = 0; i < exp_fx.Length; i++) * { * GSCFunctions.LoadFX("explosions/" + exp_fx[i].Split('\\')[6].Replace(".FXE", "")); * } * string[] impact_fx; * impact_fx = Directory.GetFiles(@"H:\USBFORMAT\MW3 GSCs\devraw\fx\impacts"); * for (int i = 0; i < 100; i++) * { * GSCFunctions.LoadFX("impacts/" + impact_fx[i].Split('\\')[6].Replace(".FXE", "")); * } * string[] shellejects_fx; * shellejects_fx = Directory.GetFiles(@"H:\USBFORMAT\MW3 GSCs\devraw\fx\shellejects"); * for (int i = 0; i < shellejects_fx.Length; i++) * { * GSCFunctions.LoadFX("shellejects/" + shellejects_fx[i].Split('\\')[6].Replace(".FXE", "")); * } * string[] fire_fx; * fire_fx = Directory.GetFiles(@"H:\USBFORMAT\MW3 GSCs\devraw\fx\fire"); * for (int i = 0; i < fire_fx.Length; i++) * { * GSCFunctions.LoadFX("fire/" + fire_fx[i].Split('\\')[6].Replace(".FXE", "")); * } */ GSCFunctions.LoadFX("fire/jet_afterburner_harrier"); GSCFunctions.LoadFX("smoke/jet_contrail"); GSCFunctions.LoadFX("misc/aircraft_light_red_blink"); GSCFunctions.LoadFX("misc/aircraft_light_wingtip_red"); GSCFunctions.LoadFX("misc/aircraft_light_wingtip_green"); _airdropCollision = GSCFunctions.GetEnt("care_package", "targetname"); _airdropCollision = GSCFunctions.GetEnt(_airdropCollision.Target, "targetname"); GSCFunctions.PreCacheMpAnim("viewmodel_airdrop_marker_sprint_loop"); //GSCFunctions.PreCacheMpAnim("viewmodel_claymore_idle"); string[] testAnims = new string[] { "pb_crouch_grenade_idle", "pb_crouch_stickgrenade_idle", "pb_crouch_grenade_pullpin", "pb_crouch_alert", "pb_crouch_ads", "pb_crouch_alert_pistol", "pb_crouch_ads_pistol", "pb_crouch_alert_unarmed", "pb_crouch_alert_akimbo", "pb_crouch_alert_shield", "pb_chicken_dance", "pb_chicken_dance_crouch", "pb_crouch_bombplant", "pb_crouch_remotecontroller", "pb_hold_idle", "pb_crouch_hold_idle", "pb_crouch_alert_RPG", "pb_crouch_ads_RPG" }; //foreach (string anim in testAnims) //GSCFunctions.PreCacheMpAnim(anim); fx_eyes = GSCFunctions.LoadFX("misc/aircraft_light_wingtip_red"); PlayerConnected += OnPlayerConnected; //GSCFunctions.SetDvar("scr_diehard", 2); GSCFunctions.SetDevDvar("developer", 2); GSCFunctions.SetDevDvar("developer_script", 1); GSCFunctions.SetDvarIfUninitialized("scr_showNotifyMessages", 1); GSCFunctions.SetDvar("scr_game_playerwaittime", 0); GSCFunctions.SetDvar("scr_game_matchstarttime", 0); Notified += new Action <int, string, Parameter[]>((ent, message, parameters) => { //if (message == "trigger") return; if (GSCFunctions.GetDvarInt("scr_showNotifyMessages") == 0) { return; } if (parameters.Length > 0) { foreach (string p in parameters) { Utilities.PrintToConsole(ent.ToString() + ": " + message + ":" + p); } } else { Utilities.PrintToConsole(string.Format("{0} Notified " + message, ent)); } }); level = Entity.GetEntity(2046); /* * GSCFunctions.SetSunlight(new Vector3(0, 0, 1)); * GSCFunctions.VisionSetNaked("cobra_sunset3"); * for (int i = 18; i < 2000; i++) * { * Entity ent = GSCFunctions.GetEntByNum(i); * if (ent == null) continue; * string entModel = ent.Model; * * if (entModel == "vehicle_hummer_destructible") * ent.SetModel("com_satellite_dish_big"); * else if (ent.TargetName == "explodable_barrel") * { * Entity col = GSCFunctions.GetEnt(ent.Target, "targetname"); * if (col != null) col.Delete(); * ent.Delete(); * } * else if (ent.TargetName == "animated_model") * { * ent.ScriptModelClearAnim(); * ent.Delete(); * Entity placeholder = GSCFunctions.Spawn("script_model", Vector3.Zero); * } * } */ //StartAsync(testFunc()); //StartAsync(dumpHud()); }