public juggernaut() { Dictionary <string, Entity> juggSettings = new Dictionary <string, Entity>(); juggSettings["juggernaut"] = GSCFunctions.SpawnStruct(); juggSettings["juggernaut"].SetField("splashUsedName", "used_juggernaut"); juggSettings["juggernaut"].SetField("overlay", "goggles_overlay"); juggSettings["juggernaut_recon"] = GSCFunctions.SpawnStruct(); juggSettings["juggernaut_recon"].SetField("splashUsedName", "used_juggernaut"); juggSettings["juggernaut_recon"].SetField("overlay", "goggles_overlay"); juggSettings["tjugg_juggernaut"] = GSCFunctions.SpawnStruct(); juggSettings["tjugg_juggernaut"].SetField("splashUsedName", "callout_new_juggernaut"); juggSettings["tjugg_juggernaut"].SetField("overlay", "goggles_overlay"); juggSettings["jugg_juggernaut"] = GSCFunctions.SpawnStruct(); juggSettings["jugg_juggernaut"].SetField("splashUsedName", "callout_new_juggernaut"); juggSettings["jugg_juggernaut"].SetField("overlay", "goggles_overlay"); level.SetField("juggSettings", new Parameter(juggSettings)); foreach (string jugg in juggSettings.Keys) { //GSCFunctions.PreCacheShader(juggSettings[jugg].GetField<string>("overlay")); GSCFunctions.PreCacheShader("overlay_goggles"); } }
public heros() { //Call("precacheitem", "iw5_mk12spr_mp"); GSCFunctions.PreCacheShellShock("dog_bite"); GSCFunctions.PreCacheShader("compassping_portable_radar_sweep"); tempestFX = GSCFunctions.LoadFX("explosions/powerlines_c"); fireflyFX = GSCFunctions.LoadFX("misc/insects_carcass_runner"); PlayerConnected += onPlayerConnect; }
public Thrusters() : base() { GSCFunctions.PreCacheShader("line_horizontal"); GSCFunctions.SetDevDvarIfUninitialized("g_thrusterType", 0); PlayerConnected += onPlayerConnect; }
private void PreCachePerksHud() { GSCFunctions.PreCacheShader("specialty_longersprint_upgrade"); GSCFunctions.PreCacheShader("specialty_fastreload_upgrade"); GSCFunctions.PreCacheShader("specialty_quickdraw_upgrade"); GSCFunctions.PreCacheShader("specialty_stalker_upgrade"); GSCFunctions.PreCacheShader("specialty_coldblooded_upgrade"); GSCFunctions.PreCacheShader("specialty_paint_upgrade"); GSCFunctions.PreCacheShader("specialty_steadyaim_upgrade"); GSCFunctions.PreCacheShader("specialty_quieter_upgrade"); }
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 ball() { string gametype = GSCFunctions.GetDvar("g_gametype"); if (gametype != "ctf") { Log.Write(LogLevel.Info, "Gametype must be set to CTF for Uplink. Restarting..."); GSCFunctions.SetDvar("g_gametype", "ctf"); Utilities.ExecuteCommand("map_restart"); return; } GSCFunctions.PreCacheItem(ballWeapon); GSCFunctions.PreCacheShader("waypoint_defend"); GSCFunctions.PreCacheShader("waypoint_target"); GSCFunctions.PreCacheShader("waypoint_kill"); GSCFunctions.PreCacheShader("waypoint_targetneutral"); GSCFunctions.PreCacheShader("equipment_emp_grenade"); ballGlow = GSCFunctions.LoadFX("misc/aircraft_light_wingtip_green"); ballSiteFX = GSCFunctions.LoadFX("misc/ui_flagbase_gold"); alliesSiteFX = GSCFunctions.LoadFX("misc/ui_flagbase_red"); axisSiteFX = GSCFunctions.LoadFX("misc/ui_flagbase_silver"); ballContrail = GSCFunctions.LoadFX("misc/light_semtex_geotrail"); ballExplodeFX = GSCFunctions.LoadFX("explosions/emp_grenade"); GSCFunctions.SetDevDvarIfUninitialized("scr_ball_scorelimit", 10); //GSCFunctions.SetDevDvarIfUninitialized("scr_ball_halftime", 0); //GSCFunctions.SetDevDvarIfUninitialized("scr_ball_overtime", 0); StartAsync(setGameScoreLimit()); StartAsync(setGameHalftimeSetting()); Log.Debug(isHalftime.ToString()); //Delete flags Entity obj = GSCFunctions.GetEnt("ctf_zone_axis", "targetname"); axisSite = obj.Origin; //obj.Delete(); axisFlagBase = Entity.GetEntity(obj.EntRef); Entity flag = GSCFunctions.GetEnt("ctf_flag_axis", "targetname"); //flag.Delete(); axisFlag = Entity.GetEntity(flag.EntRef); Entity trig = GSCFunctions.GetEnt("ctf_trig_axis", "targetname"); axisFlagTrig = Entity.GetEntity(trig.EntRef); obj = GSCFunctions.GetEnt("ctf_zone_allies", "targetname"); alliesSite = obj.Origin; //obj.Delete(); alliesFlagBase = Entity.GetEntity(obj.EntRef); flag = GSCFunctions.GetEnt("ctf_flag_allies", "targetname"); //flag.Delete(); alliesFlag = Entity.GetEntity(flag.EntRef); trig = GSCFunctions.GetEnt("ctf_trig_allies", "targetname"); alliesFlagTrig = Entity.GetEntity(trig.EntRef); StartAsync(getFlagTriggers()); //Teleport flags under map and hide them axisFlagBase.Origin -= new Vector3(0, 0, 1000); axisFlagBase.Hide(); axisFlag.Origin -= new Vector3(0, 0, 1000); axisFlag.Hide(); axisFlagTrig.Origin -= new Vector3(0, 0, 1000); alliesFlagBase.Origin -= new Vector3(0, 0, 1000); alliesFlagBase.Hide(); alliesFlag.Origin -= new Vector3(0, 0, 1000); alliesFlag.Hide(); alliesFlagTrig.Origin -= new Vector3(0, 0, 1000); //Init stations and ball locations site = GSCFunctions.GetEnt("sab_bomb", "targetname").Origin; spawnBall(site); StartAsync(spawnStations(alliesSite, axisSite)); OnNotify("game_ended", (reason) => { gameEnded = true; if ((int)GSCFunctions.GetMatchData("alliesScore") == 1) { //GSCFunctions.SetDvar("scr_ball_halftime", 0);//Reset dvar if it's set GSCFunctions.SetMatchData("alliesScore", 0); } if ((string)reason == "halftime") { //GSCFunctions.SetDvar("scr_ball_halftime", 1); GSCFunctions.SetMatchData("alliesScore", 1); } }); OnNotify("prematch_over", () => prematchOver = true); //Set ball throw time GSCFunctions.SetDvar("perk_weapRateMultiplier", 0.3f); PlayerConnected += onPlayerConnect; Notified += onNotify; StartAsync(initGameHud()); }