diff --git a/DemoManagement.cs b/DemoManagement.cs index 2c28bfe..cbde4c0 100644 --- a/DemoManagement.cs +++ b/DemoManagement.cs @@ -137,6 +137,16 @@ public async Task UploadDemoAsync(string? demoPath, long matchId, int mapNumber) { Log($"[UploadDemoAsync ERROR] Failed to upload file. Status code: {response.StatusCode} Response: {await response.Content.ReadAsStringAsync()}"); } + + var demoUploadedEvent = new MatchZyDemoUploadedEvent + { + MatchId = matchId, + MapNumber = mapNumber, + FileName = Path.GetFileName(demoPath), + Success = response.IsSuccessStatusCode + }; + await SendEventAsync(demoUploadedEvent); + } catch (Exception e) { diff --git a/EventHandlers.cs b/EventHandlers.cs index 01c473b..973e880 100644 --- a/EventHandlers.cs +++ b/EventHandlers.cs @@ -346,7 +346,7 @@ public HookResult EventDecoyDetonateHandler(EventDecoyDetonate @event, GameEvent if (!IsPlayerValid(player)) return HookResult.Continue; if(lastGrenadeThrownTime.TryGetValue(@event.Entityid, out var thrownTime)) { - PrintToPlayerChat(player!, Localizer["matchzy.pracc.decop", player!.PlayerName, $"{(DateTime.Now - thrownTime).TotalSeconds:0.00}"]); + PrintToPlayerChat(player!, Localizer["matchzy.pracc.decoy", player!.PlayerName, $"{(DateTime.Now - thrownTime).TotalSeconds:0.00}"]); lastGrenadeThrownTime.Remove(@event.Entityid); } return HookResult.Continue; diff --git a/Events.cs b/Events.cs index 0f69dff..cfae8b3 100644 --- a/Events.cs +++ b/Events.cs @@ -15,7 +15,7 @@ public MatchZyEvent(string eventName) public class MatchZyMatchEvent : MatchZyEvent { [JsonPropertyName("matchid")] - public required string MatchId { get; init; } + public required long MatchId { get; init; } protected MatchZyMatchEvent(string eventName) : base(eventName) { @@ -220,3 +220,19 @@ public MatchZySidePickedEvent() : base("side_picked") { } } + +public class MatchZyDemoUploadedEvent : MatchZyMatchEvent +{ + [JsonPropertyName("map_number")] + public required int MapNumber { get; init; } + + [JsonPropertyName("filename")] + public required string FileName { get; init; } + + [JsonPropertyName("success")] + public bool Success { get; set; } + + public MatchZyDemoUploadedEvent() : base("demo_upload_ended") + { + } +} \ No newline at end of file diff --git a/MapVeto.cs b/MapVeto.cs index 99f7ebf..bffe313 100644 --- a/MapVeto.cs +++ b/MapVeto.cs @@ -252,7 +252,7 @@ public bool PickMap(string mapName, int team) { var mapPickedEvent = new MatchZyMapPickedEvent { - MatchId = liveMatchId.ToString(), + MatchId = liveMatchId, MapName = mapRemovedName, MapNumber = matchConfig.Maplist.Count, Team = (matchzyTeam == matchzyTeam1) ? "team1" : "team2", @@ -282,7 +282,7 @@ public bool BanMap(string mapName, int team) var mapMapVetoedEvent = new MatchZyMapVetoedEvent { - MatchId = liveMatchId.ToString(), + MatchId = liveMatchId, MapName = mapRemovedName, Team = (matchzyTeam == matchzyTeam1) ? "team1" : "team2", }; @@ -533,7 +533,7 @@ public void PickSide(CsTeam side, string team) { var sidePickedEvent = new MatchZySidePickedEvent { - MatchId = liveMatchId.ToString(), + MatchId = liveMatchId, MapName = mapName, MapNumber = matchConfig.Maplist.Count, Team = (matchzyTeam == matchzyTeam1) ? "team1" : "team2", diff --git a/MatchManagement.cs b/MatchManagement.cs index ece6ead..f169cc2 100644 --- a/MatchManagement.cs +++ b/MatchManagement.cs @@ -370,7 +370,7 @@ public bool LoadMatchFromJSON(string jsonData) var seriesStartedEvent = new MatchZySeriesStartedEvent { - MatchId = liveMatchId.ToString(), + MatchId = liveMatchId, NumberOfMaps = matchConfig.NumMaps, Team1 = new(matchzyTeam1.id, matchzyTeam1.teamName), Team2 = new(matchzyTeam2.id, matchzyTeam2.teamName), @@ -586,7 +586,7 @@ public void EndSeries(string? winnerName, int restartDelay, int t1score, int t2s var seriesResultEvent = new MatchZySeriesResultEvent() { - MatchId = matchId.ToString(), + MatchId = matchId, Winner = new Winner(t1score > t2score && reverseTeamSides["CT"] == matchzyTeam1 ? "3" : "2", winnerTeam), Team1SeriesScore = team1Score, Team2SeriesScore = team2Score, diff --git a/MatchZy.cs b/MatchZy.cs index 6c1e3c2..c2e6b6a 100644 --- a/MatchZy.cs +++ b/MatchZy.cs @@ -13,7 +13,7 @@ public partial class MatchZy : BasePlugin { public override string ModuleName => "MatchZy"; - public override string ModuleVersion => "0.7.11"; + public override string ModuleVersion => "0.7.12"; public override string ModuleAuthor => "WD- (https://github.com/shobhit-pathak/)"; diff --git a/MatchZy.csproj b/MatchZy.csproj index e4fe8d8..a8c0e23 100644 --- a/MatchZy.csproj +++ b/MatchZy.csproj @@ -7,7 +7,7 @@ - + none runtime compile; build; native; contentfiles; analyzers; buildtransitive diff --git a/PracticeMode.cs b/PracticeMode.cs index 522cbae..8483f83 100644 --- a/PracticeMode.cs +++ b/PracticeMode.cs @@ -1174,7 +1174,7 @@ public void ExecDryRunCFG() } else { Log($"[ExecDryRunCFG] Starting Dryrun! Dryrun CFG not found in {absolutePath}, using default CFG!"); Server.ExecuteCommand("ammo_grenade_limit_default 1;ammo_grenade_limit_flashbang 2;ammo_grenade_limit_total 4;bot_quota 0;cash_player_bomb_defused 300;cash_player_bomb_planted 300;cash_player_damage_hostage -30;cash_player_interact_with_hostage 300;cash_player_killed_enemy_default 300;cash_player_killed_enemy_factor 1;cash_player_killed_hostage -1000;cash_player_killed_teammate -300;cash_player_rescued_hostage 1000;cash_team_elimination_bomb_map 3250;cash_team_elimination_hostage_map_ct 3000;cash_team_elimination_hostage_map_t 3000;cash_team_hostage_alive 0;cash_team_hostage_interaction 600;cash_team_loser_bonus 1400;cash_team_loser_bonus_consecutive_rounds 500;cash_team_planted_bomb_but_defused 800;cash_team_rescued_hostage 600;cash_team_terrorist_win_bomb 3500;cash_team_win_by_defusing_bomb 3500;"); - Server.ExecuteCommand("cash_team_win_by_hostage_rescue 2900;cash_team_win_by_time_running_out_bomb 3250;cash_team_win_by_time_running_out_hostage 3250;ff_damage_reduction_bullets 0.33;ff_damage_reduction_grenade 0.85;ff_damage_reduction_grenade_self 1;ff_damage_reduction_other 0.4;mp_afterroundmoney 0;mp_autokick 0;mp_autoteambalance 0;mp_backup_restore_load_autopause 1;mp_backup_round_auto 1;mp_buy_anywhere 0;mp_buy_during_immunity 0;mp_buytime 20;mp_c4timer 40;mp_ct_default_melee weapon_knife;mp_ct_default_primary \"\";mp_ct_default_secondary weapon_hkp2000;mp_death_drop_defuser 1;mp_death_drop_grenade 2;mp_death_drop_gun 1;mp_defuser_allocation 0;mp_display_kill_assists 1;mp_endmatch_votenextmap 0;mp_forcecamera 1;mp_free_armor 0;mp_freezetime 6;mp_friendlyfire 1;mp_give_player_c4 1;mp_halftime 1;mp_halftime_duration 15;mp_halftime_pausetimer 0;mp_ignore_round_win_conditions 0;mp_limitteams 0;mp_match_can_clinch 1;mp_match_end_restart 0;mp_maxmoney 16000;mp_maxrounds 24;mp_molotovusedelay 0;mp_overtime_enable 1;mp_overtime_halftime_pausetimer 0;mp_overtime_maxrounds 6;mp_overtime_startmoney 10000;mp_playercashawards 1;mp_randomspawn 0;mp_respawn_immunitytime 0;mp_respawn_on_death_ct 0;mp_respawn_on_death_t 0;mp_round_restart_delay 5;mp_roundtime 1.92;mp_roundtime_defuse 1.92;mp_roundtime_hostage 1.92;mp_solid_teammates 1;mp_starting_losses 1;mp_startmoney 16000;mp_t_default_melee weapon_knife;mp_t_default_primary \"\";mp_t_default_secondary weapon_glock;mp_teamcashawards 1;mp_timelimit 0;mp_weapons_allow_map_placed 1;mp_weapons_allow_zeus 1;mp_weapons_glow_on_ground 0;mp_win_panel_display_time 3;occlusion_test_async 0;spec_freeze_deathanim_time 0;spec_freeze_panel_extended_time 0;spec_freeze_time 2;spec_freeze_time_lock 2;spec_replay_enable 0;sv_allow_votes 1;sv_auto_full_alltalk_during_warmup_half_end 0;sv_coaching_enabled 1;sv_competitive_official_5v5 1;sv_damage_print_enable 0;sv_deadtalk 1;sv_hibernate_postgame_delay 300;sv_holiday_mode 0;sv_ignoregrenaderadio 0;sv_infinite_ammo 0;sv_occlude_players 1;sv_talk_enemy_dead 0;sv_talk_enemy_living 0;sv_voiceenable 1;tv_relayvoice 1;mp_team_timeout_max 4;mp_team_timeout_time 30;sv_vote_command_delay 0;cash_team_bonus_shorthanded 0;cash_team_loser_bonus_shorthanded 0;mp_spectators_max 20;mp_team_intro_time 0;mp_restartgame 3;mp_warmup_end;"); + Server.ExecuteCommand("cash_team_win_by_hostage_rescue 2900;cash_team_win_by_time_running_out_bomb 3250;cash_team_win_by_time_running_out_hostage 3250;ff_damage_reduction_bullets 0.33;ff_damage_reduction_grenade 0.85;ff_damage_reduction_grenade_self 1;ff_damage_reduction_other 0.4;mp_afterroundmoney 0;mp_autokick 0;mp_autoteambalance 0;mp_backup_restore_load_autopause 1;mp_backup_round_auto 1;mp_buy_anywhere 0;mp_buy_during_immunity 0;mp_buytime 20;mp_c4timer 40;mp_ct_default_melee weapon_knife;mp_ct_default_primary \"\";mp_ct_default_secondary weapon_hkp2000;mp_death_drop_defuser 1;mp_death_drop_grenade 2;mp_death_drop_gun 1;mp_defuser_allocation 0;mp_display_kill_assists 1;mp_endmatch_votenextmap 0;mp_forcecamera 1;mp_free_armor 0;mp_freezetime 6;mp_friendlyfire 1;mp_give_player_c4 1;mp_halftime 1;mp_halftime_duration 15;mp_halftime_pausetimer 0;mp_ignore_round_win_conditions 0;mp_limitteams 0;mp_match_can_clinch 1;mp_match_end_restart 0;mp_maxmoney 16000;mp_maxrounds 24;mp_overtime_enable 1;mp_overtime_halftime_pausetimer 0;mp_overtime_maxrounds 6;mp_overtime_startmoney 10000;mp_playercashawards 1;mp_randomspawn 0;mp_respawn_immunitytime 0;mp_respawn_on_death_ct 0;mp_respawn_on_death_t 0;mp_round_restart_delay 5;mp_roundtime 1.92;mp_roundtime_defuse 1.92;mp_roundtime_hostage 1.92;mp_solid_teammates 1;mp_starting_losses 1;mp_startmoney 16000;mp_t_default_melee weapon_knife;mp_t_default_primary \"\";mp_t_default_secondary weapon_glock;mp_teamcashawards 1;mp_timelimit 0;mp_weapons_allow_map_placed 1;mp_weapons_allow_zeus 1;mp_win_panel_display_time 3;spec_freeze_deathanim_time 0;spec_freeze_time 2;spec_freeze_time_lock 2;spec_replay_enable 0;sv_allow_votes 1;sv_auto_full_alltalk_during_warmup_half_end 0;sv_damage_print_enable 0;sv_deadtalk 1;sv_hibernate_postgame_delay 300;sv_ignoregrenaderadio 0;sv_infinite_ammo 0;sv_talk_enemy_dead 0;sv_talk_enemy_living 0;sv_voiceenable 1;tv_relayvoice 1;mp_team_timeout_max 4;mp_team_timeout_time 30;sv_vote_command_delay 0;cash_team_bonus_shorthanded 0;mp_spectators_max 20;mp_team_intro_time 0;mp_restartgame 3;mp_warmup_end;"); } } diff --git a/PublishEvents.cs b/PublishEvents.cs index 06c7921..d771168 100644 --- a/PublishEvents.cs +++ b/PublishEvents.cs @@ -21,7 +21,7 @@ public async Task SendEventAsync(MatchZyEvent @event) Log($"[SendEventAsync] SENDING DATA: {jsonString}"); - if (!string.IsNullOrEmpty(matchConfig.RemoteLogHeaderKey)) + if (!string.IsNullOrEmpty(matchConfig.RemoteLogHeaderKey) && !string.IsNullOrEmpty(matchConfig.RemoteLogHeaderValue)) { httpClient.DefaultRequestHeaders.Add(matchConfig.RemoteLogHeaderKey, matchConfig.RemoteLogHeaderValue); } diff --git a/README.md b/README.md index 7bcc35f..95f8379 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ MatchZy is a plugin for CS2 (Counter Strike 2) for running and managing practice [![Discord](https://discordapp.com/api/guilds/1169549878490304574/widget.png?style=banner2)](https://discord.gg/2zvhy9m7qg) -## Feature Highligts: +## Feature Highlights: * Pug mode with simple commands to manage! * Support of [Get5 Panel!](https://shobhit-pathak.github.io/MatchZy/get5/) diff --git a/Utility.cs b/Utility.cs index a858f2c..11d7324 100644 --- a/Utility.cs +++ b/Utility.cs @@ -163,7 +163,7 @@ private void ExecWarmupCfg() { Server.ExecuteCommand($"exec {warmupCfgPath}"); } else { Log($"[StartWarmup] Starting warmup! Warmup CFG not found in {absolutePath}, using default CFG!"); - Server.ExecuteCommand("bot_kick;bot_quota 0;mp_autokick 0;mp_autoteambalance 0;mp_buy_anywhere 0;mp_buytime 15;mp_death_drop_gun 0;mp_free_armor 0;mp_ignore_round_win_conditions 0;mp_limitteams 0;mp_radar_showall 0;mp_respawn_on_death_ct 0;mp_respawn_on_death_t 0;mp_solid_teammates 0;mp_spectators_max 20;mp_maxmoney 16000;mp_startmoney 16000;mp_timelimit 0;sv_alltalk 0;sv_auto_full_alltalk_during_warmup_half_end 0;sv_coaching_enabled 1;sv_competitive_official_5v5 1;sv_deadtalk 1;sv_full_alltalk 0;sv_grenade_trajectory 0;sv_hibernate_when_empty 0;mp_weapons_allow_typecount -1;sv_infinite_ammo 0;sv_showimpacts 0;sv_voiceenable 1;sm_cvar sv_mute_players_with_social_penalties 0;sv_mute_players_with_social_penalties 0;tv_relayvoice 1;sv_cheats 0;mp_ct_default_melee weapon_knife;mp_ct_default_secondary weapon_hkp2000;mp_ct_default_primary \"\";mp_t_default_melee weapon_knife;mp_t_default_secondary weapon_glock;mp_t_default_primary;mp_maxrounds 24;mp_warmup_start;mp_warmup_pausetimer 1;mp_warmuptime 9999;cash_team_bonus_shorthanded 0;cash_team_loser_bonus_shorthanded 0;"); + Server.ExecuteCommand("bot_kick;bot_quota 0;mp_autokick 0;mp_autoteambalance 0;mp_buy_anywhere 0;mp_buytime 15;mp_death_drop_gun 0;mp_free_armor 0;mp_ignore_round_win_conditions 0;mp_limitteams 0;mp_radar_showall 0;mp_respawn_on_death_ct 0;mp_respawn_on_death_t 0;mp_solid_teammates 0;mp_spectators_max 20;mp_maxmoney 16000;mp_startmoney 16000;mp_timelimit 0;sv_alltalk 0;sv_auto_full_alltalk_during_warmup_half_end 0;sv_deadtalk 1;sv_full_alltalk 0;sv_grenade_trajectory 0;sv_hibernate_when_empty 0;mp_weapons_allow_typecount -1;sv_infinite_ammo 0;sv_showimpacts 0;sv_voiceenable 1;sm_cvar sv_mute_players_with_social_penalties 0;sv_mute_players_with_social_penalties 0;tv_relayvoice 1;sv_cheats 0;mp_ct_default_melee weapon_knife;mp_ct_default_secondary weapon_hkp2000;mp_ct_default_primary \"\";mp_t_default_melee weapon_knife;mp_t_default_secondary weapon_glock;mp_t_default_primary;mp_maxrounds 24;mp_warmup_start;mp_warmup_pausetimer 1;mp_warmuptime 9999;cash_team_bonus_shorthanded 0;"); } } @@ -252,7 +252,7 @@ private void StartLive() { var goingLiveEvent = new GoingLiveEvent { - MatchId = liveMatchId.ToString(), + MatchId = liveMatchId, MapNumber = matchConfig.CurrentMapNumber, }; @@ -693,7 +693,7 @@ private void HandleMatchEnd() { var mapResultEvent = new MapResultEvent { - MatchId = liveMatchId.ToString(), + MatchId = liveMatchId, MapNumber = currentMapNumber, Winner = new Winner(t1score > t2score && reverseTeamSides["CT"] == matchzyTeam1 ? "3" : "2", team1SeriesScore > team2SeriesScore ? "team1" : "team2"), StatsTeam1 = new MatchZyStatsTeam(matchzyTeam1.id, matchzyTeam1.teamName, team1SeriesScore, t1score, 0, 0, new List()), @@ -904,7 +904,7 @@ private void HandlePostRoundEndEvent(EventRoundEnd @event) { var roundEndEvent = new MatchZyRoundEndedEvent { - MatchId = liveMatchId.ToString(), + MatchId = liveMatchId, MapNumber = matchConfig.CurrentMapNumber, RoundNumber = GetRoundNumer(), Reason = @event.Reason, @@ -1141,12 +1141,12 @@ private void ExecLiveCFG() if (gameMode == 2) { Server.ExecuteCommand("ammo_grenade_limit_default 1;ammo_grenade_limit_flashbang 2;ammo_grenade_limit_total 4;bot_quota 0;cash_player_bomb_defused 300;cash_player_bomb_planted 300;cash_player_damage_hostage -30;cash_player_interact_with_hostage 300;cash_player_killed_enemy_default 300;cash_player_killed_enemy_factor 1;cash_player_killed_hostage -1000;cash_player_killed_teammate -300;cash_player_rescued_hostage 1000;cash_team_bonus_shorthanded 1000;cash_team_elimination_bomb_map 2750;cash_team_elimination_hostage_map_ct 2500;cash_team_elimination_hostage_map_t 2500;cash_team_hostage_alive 0;cash_team_hostage_interaction 600;cash_team_loser_bonus 2000;cash_team_loser_bonus_consecutive_rounds 300;cash_team_planted_bomb_but_defused 800;cash_team_rescued_hostage 600;cash_team_terrorist_win_bomb 3000;cash_team_win_by_defusing_bomb 3000;cash_team_win_by_hostage_rescue 2900;cash_team_win_by_time_running_out_bomb 2750;cash_team_win_by_time_running_out_hostage 2750;ff_damage_reduction_bullets 0.33;ff_damage_reduction_grenade 0.85;ff_damage_reduction_grenade_self 1;ff_damage_reduction_other 0.4;mp_afterroundmoney 0;mp_autokick 0;mp_autoteambalance 0;mp_backup_restore_load_autopause 0;mp_backup_round_auto 1;mp_buy_anywhere 0;mp_buy_during_immunity 0;mp_buytime 20;mp_c4timer 40;mp_ct_default_melee weapon_knife;mp_ct_default_primary \"\";mp_ct_default_secondary weapon_hkp2000;mp_death_drop_defuser 1;mp_death_drop_grenade 2;mp_death_drop_gun 1;mp_defuser_allocation 0;mp_display_kill_assists 1;mp_endmatch_votenextmap 0;mp_forcecamera 1;mp_free_armor 0;mp_freezetime 10;mp_friendlyfire 1;mp_give_player_c4 1;mp_halftime 1;mp_halftime_duration 15;mp_halftime_pausetimer 0;mp_ignore_round_win_conditions 0;mp_limitteams 0;mp_match_can_clinch 1;mp_match_end_restart 1;mp_maxmoney 8000;"); - Server.ExecuteCommand("mp_maxrounds 16;mp_molotovusedelay 0;mp_overtime_enable 1;mp_overtime_halftime_pausetimer 0;mp_overtime_maxrounds 4;mp_overtime_startmoney 8000;mp_playercashawards 1;mp_randomspawn 0;mp_respawn_immunitytime 0;mp_respawn_on_death_ct 0;mp_respawn_on_death_t 0;mp_round_restart_delay 7;mp_roundtime 1.5;mp_roundtime_defuse 1.5;mp_roundtime_hostage 1.5;mp_solid_teammates 1;mp_starting_losses 1;mp_startmoney 800;mp_t_default_melee weapon_knife;mp_t_default_primary \"\";mp_t_default_secondary weapon_glock;mp_teamcashawards 1;mp_timelimit 0;mp_weapons_allow_map_placed 1;mp_weapons_allow_zeus 1;mp_weapons_glow_on_ground 0;mp_win_panel_display_time 3;occlusion_test_async 0;spec_freeze_deathanim_time 0;spec_freeze_panel_extended_time 0;spec_freeze_time 2;spec_freeze_time_lock 2;spec_replay_enable 0;sv_allow_votes 0;sv_auto_full_alltalk_during_warmup_half_end 0;sv_coaching_enabled 1;sv_competitive_official_5v5 1;sv_damage_print_enable 0;sv_deadtalk 1;sv_hibernate_postgame_delay 300;sv_holiday_mode 0;sv_ignoregrenaderadio 0;sv_infinite_ammo 0;sv_occlude_players 1;sv_talk_enemy_dead 0;sv_talk_enemy_living 0;sv_voiceenable 1;tv_relayvoice 0"); + Server.ExecuteCommand("mp_maxrounds 16;mp_overtime_enable 1;mp_overtime_halftime_pausetimer 0;mp_overtime_maxrounds 4;mp_overtime_startmoney 8000;mp_playercashawards 1;mp_randomspawn 0;mp_respawn_immunitytime 0;mp_respawn_on_death_ct 0;mp_respawn_on_death_t 0;mp_round_restart_delay 7;mp_roundtime 1.5;mp_roundtime_defuse 1.5;mp_roundtime_hostage 1.5;mp_solid_teammates 1;mp_starting_losses 1;mp_startmoney 800;mp_t_default_melee weapon_knife;mp_t_default_primary \"\";mp_t_default_secondary weapon_glock;mp_teamcashawards 1;mp_timelimit 0;mp_weapons_allow_map_placed 1;mp_weapons_allow_zeus 1;mp_win_panel_display_time 3;spec_freeze_deathanim_time 0;spec_freeze_time 2;spec_freeze_time_lock 2;spec_replay_enable 0;sv_allow_votes 0;sv_auto_full_alltalk_during_warmup_half_end 0;sv_damage_print_enable 0;sv_deadtalk 1;sv_hibernate_postgame_delay 300;sv_ignoregrenaderadio 0;sv_infinite_ammo 0;sv_talk_enemy_dead 0;sv_talk_enemy_living 0;sv_voiceenable 1;tv_relayvoice 0"); } else { Server.ExecuteCommand("ammo_grenade_limit_default 1;ammo_grenade_limit_flashbang 2;ammo_grenade_limit_total 4;bot_quota 0;cash_player_bomb_defused 300;cash_player_bomb_planted 300;cash_player_damage_hostage -30;cash_player_interact_with_hostage 300;cash_player_killed_enemy_default 300;cash_player_killed_enemy_factor 1;cash_player_killed_hostage -1000;cash_player_killed_teammate -300;cash_player_rescued_hostage 1000;cash_team_elimination_bomb_map 3250;cash_team_elimination_hostage_map_ct 3000;cash_team_elimination_hostage_map_t 3000;cash_team_hostage_alive 0;cash_team_hostage_interaction 600;cash_team_loser_bonus 1400;cash_team_loser_bonus_consecutive_rounds 500;cash_team_planted_bomb_but_defused 800;cash_team_rescued_hostage 600;cash_team_terrorist_win_bomb 3500;cash_team_win_by_defusing_bomb 3500;"); - Server.ExecuteCommand("cash_team_win_by_hostage_rescue 2900;cash_team_win_by_time_running_out_bomb 3250;cash_team_win_by_time_running_out_hostage 3250;ff_damage_reduction_bullets 0.33;ff_damage_reduction_grenade 0.85;ff_damage_reduction_grenade_self 1;ff_damage_reduction_other 0.4;mp_afterroundmoney 0;mp_autokick 0;mp_autoteambalance 0;mp_backup_restore_load_autopause 1;mp_backup_round_auto 1;mp_buy_anywhere 0;mp_buy_during_immunity 0;mp_buytime 20;mp_c4timer 40;mp_ct_default_melee weapon_knife;mp_ct_default_primary \"\";mp_ct_default_secondary weapon_hkp2000;mp_death_drop_defuser 1;mp_death_drop_grenade 2;mp_death_drop_gun 1;mp_defuser_allocation 0;mp_display_kill_assists 1;mp_endmatch_votenextmap 0;mp_forcecamera 1;mp_free_armor 0;mp_freezetime 18;mp_friendlyfire 1;mp_give_player_c4 1;mp_halftime 1;mp_halftime_duration 15;mp_halftime_pausetimer 0;mp_ignore_round_win_conditions 0;mp_limitteams 0;mp_match_can_clinch 1;mp_match_end_restart 0;mp_maxmoney 16000;mp_maxrounds 24;mp_molotovusedelay 0;mp_overtime_enable 1;mp_overtime_halftime_pausetimer 0;mp_overtime_maxrounds 6;mp_overtime_startmoney 10000;mp_playercashawards 1;mp_randomspawn 0;mp_respawn_immunitytime 0;mp_respawn_on_death_ct 0;mp_respawn_on_death_t 0;mp_round_restart_delay 5;mp_roundtime 1.92;mp_roundtime_defuse 1.92;mp_roundtime_hostage 1.92;mp_solid_teammates 1;mp_starting_losses 1;mp_startmoney 800;mp_t_default_melee weapon_knife;mp_t_default_primary \"\";mp_t_default_secondary weapon_glock;mp_teamcashawards 1;mp_timelimit 0;mp_weapons_allow_map_placed 1;mp_weapons_allow_zeus 1;mp_weapons_glow_on_ground 0;mp_win_panel_display_time 3;occlusion_test_async 0;spec_freeze_deathanim_time 0;spec_freeze_panel_extended_time 0;spec_freeze_time 2;spec_freeze_time_lock 2;spec_replay_enable 0;sv_allow_votes 1;sv_auto_full_alltalk_during_warmup_half_end 0;sv_coaching_enabled 1;sv_competitive_official_5v5 1;sv_damage_print_enable 0;sv_deadtalk 1;sv_hibernate_postgame_delay 300;sv_holiday_mode 0;sv_ignoregrenaderadio 0;sv_infinite_ammo 0;sv_occlude_players 1;sv_talk_enemy_dead 0;sv_talk_enemy_living 0;sv_voiceenable 1;tv_relayvoice 1;mp_team_timeout_max 4;mp_team_timeout_time 30;sv_vote_command_delay 0;cash_team_bonus_shorthanded 0;cash_team_loser_bonus_shorthanded 0;mp_spectators_max 20;mp_team_intro_time 0;mp_restartgame 3;mp_warmup_end;"); + Server.ExecuteCommand("cash_team_win_by_hostage_rescue 2900;cash_team_win_by_time_running_out_bomb 3250;cash_team_win_by_time_running_out_hostage 3250;ff_damage_reduction_bullets 0.33;ff_damage_reduction_grenade 0.85;ff_damage_reduction_grenade_self 1;ff_damage_reduction_other 0.4;mp_afterroundmoney 0;mp_autokick 0;mp_autoteambalance 0;mp_backup_restore_load_autopause 1;mp_backup_round_auto 1;mp_buy_anywhere 0;mp_buy_during_immunity 0;mp_buytime 20;mp_c4timer 40;mp_ct_default_melee weapon_knife;mp_ct_default_primary \"\";mp_ct_default_secondary weapon_hkp2000;mp_death_drop_defuser 1;mp_death_drop_grenade 2;mp_death_drop_gun 1;mp_defuser_allocation 0;mp_display_kill_assists 1;mp_endmatch_votenextmap 0;mp_forcecamera 1;mp_free_armor 0;mp_freezetime 18;mp_friendlyfire 1;mp_give_player_c4 1;mp_halftime 1;mp_halftime_duration 15;mp_halftime_pausetimer 0;mp_ignore_round_win_conditions 0;mp_limitteams 0;mp_match_can_clinch 1;mp_match_end_restart 0;mp_maxmoney 16000;mp_maxrounds 24;mp_overtime_enable 1;mp_overtime_halftime_pausetimer 0;mp_overtime_maxrounds 6;mp_overtime_startmoney 10000;mp_playercashawards 1;mp_randomspawn 0;mp_respawn_immunitytime 0;mp_respawn_on_death_ct 0;mp_respawn_on_death_t 0;mp_round_restart_delay 5;mp_roundtime 1.92;mp_roundtime_defuse 1.92;mp_roundtime_hostage 1.92;mp_solid_teammates 1;mp_starting_losses 1;mp_startmoney 800;mp_t_default_melee weapon_knife;mp_t_default_primary \"\";mp_t_default_secondary weapon_glock;mp_teamcashawards 1;mp_timelimit 0;mp_weapons_allow_map_placed 1;mp_weapons_allow_zeus 1;mp_win_panel_display_time 3;spec_freeze_deathanim_time 0;spec_freeze_time 2;spec_freeze_time_lock 2;spec_replay_enable 0;sv_allow_votes 1;sv_auto_full_alltalk_during_warmup_half_end 0;sv_damage_print_enable 0;sv_deadtalk 1;sv_hibernate_postgame_delay 300;sv_ignoregrenaderadio 0;sv_infinite_ammo 0;sv_talk_enemy_dead 0;sv_talk_enemy_living 0;sv_voiceenable 1;tv_relayvoice 1;mp_team_timeout_max 4;mp_team_timeout_time 30;sv_vote_command_delay 0;cash_team_bonus_shorthanded 0;mp_spectators_max 20;mp_team_intro_time 0;mp_restartgame 3;mp_warmup_end;"); } } } diff --git a/cfg/MatchZy/dryrun.cfg b/cfg/MatchZy/dryrun.cfg index 9d3b1d0..e6b3d0c 100644 --- a/cfg/MatchZy/dryrun.cfg +++ b/cfg/MatchZy/dryrun.cfg @@ -61,7 +61,6 @@ mp_match_can_clinch 1 mp_match_end_restart 0 mp_maxmoney 16000 mp_maxrounds 24 -mp_molotovusedelay 0 mp_overtime_enable 1 mp_overtime_halftime_pausetimer 0 mp_overtime_maxrounds 6 @@ -85,25 +84,18 @@ mp_teamcashawards 1 mp_timelimit 0 mp_weapons_allow_map_placed 1 mp_weapons_allow_zeus 1 -mp_weapons_glow_on_ground 0 mp_win_panel_display_time 3 -occlusion_test_async 0 spec_freeze_deathanim_time 0 -spec_freeze_panel_extended_time 0 spec_freeze_time 2 spec_freeze_time_lock 2 spec_replay_enable 0 sv_allow_votes 1 sv_auto_full_alltalk_during_warmup_half_end 0 -sv_coaching_enabled 1 -sv_competitive_official_5v5 1 sv_damage_print_enable 0 sv_deadtalk 1 sv_hibernate_postgame_delay 300 -sv_holiday_mode 0 sv_ignoregrenaderadio 0 sv_infinite_ammo 0 -sv_occlude_players 1 sv_talk_enemy_dead 0 sv_talk_enemy_living 0 sv_voiceenable 1 @@ -112,7 +104,6 @@ mp_team_timeout_max 4 mp_team_timeout_time 30 sv_vote_command_delay 0 cash_team_bonus_shorthanded 0 -cash_team_loser_bonus_shorthanded 0 mp_spectators_max 20 mp_team_intro_time 0 mp_disconnect_kills_players 0 diff --git a/cfg/MatchZy/live.cfg b/cfg/MatchZy/live.cfg index 2d0d3a7..934181a 100644 --- a/cfg/MatchZy/live.cfg +++ b/cfg/MatchZy/live.cfg @@ -61,7 +61,6 @@ mp_match_can_clinch 1 mp_match_end_restart 0 mp_maxmoney 16000 mp_maxrounds 24 -mp_molotovusedelay 0 mp_overtime_enable 1 mp_overtime_halftime_pausetimer 0 mp_overtime_maxrounds 6 @@ -85,25 +84,18 @@ mp_teamcashawards 1 mp_timelimit 0 mp_weapons_allow_map_placed 1 mp_weapons_allow_zeus 1 -mp_weapons_glow_on_ground 0 mp_win_panel_display_time 3 -occlusion_test_async 0 spec_freeze_deathanim_time 0 -spec_freeze_panel_extended_time 0 spec_freeze_time 2 spec_freeze_time_lock 2 spec_replay_enable 0 sv_allow_votes 1 sv_auto_full_alltalk_during_warmup_half_end 0 -sv_coaching_enabled 1 -sv_competitive_official_5v5 1 sv_damage_print_enable 0 sv_deadtalk 1 sv_hibernate_postgame_delay 300 -sv_holiday_mode 0 sv_ignoregrenaderadio 0 sv_infinite_ammo 0 -sv_occlude_players 1 sv_talk_enemy_dead 0 sv_talk_enemy_living 0 sv_voiceenable 1 @@ -112,7 +104,6 @@ mp_team_timeout_max 4 mp_team_timeout_time 30 sv_vote_command_delay 0 cash_team_bonus_shorthanded 0 -cash_team_loser_bonus_shorthanded 0 mp_spectators_max 20 mp_team_intro_time 0 mp_disconnect_kills_players 0 diff --git a/cfg/MatchZy/live_wingman.cfg b/cfg/MatchZy/live_wingman.cfg index fdadaab..20cd8b1 100644 --- a/cfg/MatchZy/live_wingman.cfg +++ b/cfg/MatchZy/live_wingman.cfg @@ -62,7 +62,6 @@ mp_match_can_clinch 1 mp_match_end_restart 1 mp_maxmoney 8000 mp_maxrounds 16 -mp_molotovusedelay 0 mp_overtime_enable 1 mp_overtime_halftime_pausetimer 0 mp_overtime_maxrounds 4 @@ -86,25 +85,18 @@ mp_teamcashawards 1 mp_timelimit 0 mp_weapons_allow_map_placed 1 mp_weapons_allow_zeus 1 -mp_weapons_glow_on_ground 0 mp_win_panel_display_time 3 -occlusion_test_async 0 spec_freeze_deathanim_time 0 -spec_freeze_panel_extended_time 0 spec_freeze_time 2 spec_freeze_time_lock 2 spec_replay_enable 0 sv_allow_votes 0 sv_auto_full_alltalk_during_warmup_half_end 0 -sv_coaching_enabled 1 -sv_competitive_official_5v5 1 sv_damage_print_enable 0 sv_deadtalk 1 sv_hibernate_postgame_delay 300 -sv_holiday_mode 0 sv_ignoregrenaderadio 0 sv_infinite_ammo 0 -sv_occlude_players 1 sv_talk_enemy_dead 0 sv_talk_enemy_living 0 sv_voiceenable 1 diff --git a/cfg/MatchZy/sleep.cfg b/cfg/MatchZy/sleep.cfg index 2d0d3a7..934181a 100644 --- a/cfg/MatchZy/sleep.cfg +++ b/cfg/MatchZy/sleep.cfg @@ -61,7 +61,6 @@ mp_match_can_clinch 1 mp_match_end_restart 0 mp_maxmoney 16000 mp_maxrounds 24 -mp_molotovusedelay 0 mp_overtime_enable 1 mp_overtime_halftime_pausetimer 0 mp_overtime_maxrounds 6 @@ -85,25 +84,18 @@ mp_teamcashawards 1 mp_timelimit 0 mp_weapons_allow_map_placed 1 mp_weapons_allow_zeus 1 -mp_weapons_glow_on_ground 0 mp_win_panel_display_time 3 -occlusion_test_async 0 spec_freeze_deathanim_time 0 -spec_freeze_panel_extended_time 0 spec_freeze_time 2 spec_freeze_time_lock 2 spec_replay_enable 0 sv_allow_votes 1 sv_auto_full_alltalk_during_warmup_half_end 0 -sv_coaching_enabled 1 -sv_competitive_official_5v5 1 sv_damage_print_enable 0 sv_deadtalk 1 sv_hibernate_postgame_delay 300 -sv_holiday_mode 0 sv_ignoregrenaderadio 0 sv_infinite_ammo 0 -sv_occlude_players 1 sv_talk_enemy_dead 0 sv_talk_enemy_living 0 sv_voiceenable 1 @@ -112,7 +104,6 @@ mp_team_timeout_max 4 mp_team_timeout_time 30 sv_vote_command_delay 0 cash_team_bonus_shorthanded 0 -cash_team_loser_bonus_shorthanded 0 mp_spectators_max 20 mp_team_intro_time 0 mp_disconnect_kills_players 0 diff --git a/cfg/MatchZy/warmup.cfg b/cfg/MatchZy/warmup.cfg index 826b18f..db20741 100644 --- a/cfg/MatchZy/warmup.cfg +++ b/cfg/MatchZy/warmup.cfg @@ -8,7 +8,6 @@ mp_death_drop_gun 0 mp_free_armor 0 mp_ignore_round_win_conditions 0 mp_limitteams 0 -mp_radar_showall 0 mp_respawn_on_death_ct 0 mp_respawn_on_death_t 0 mp_solid_teammates 0 @@ -18,18 +17,13 @@ mp_startmoney 16000 mp_timelimit 0 sv_alltalk 0 sv_auto_full_alltalk_during_warmup_half_end 0 -sv_coaching_enabled 1 -sv_competitive_official_5v5 1 sv_deadtalk 1 sv_full_alltalk 0 -sv_grenade_trajectory 0 sv_hibernate_when_empty 0 mp_weapons_allow_typecount -1 sv_infinite_ammo 0 sv_showimpacts 0 sv_voiceenable 1 -sm_cvar sv_mute_players_with_social_penalties 0 -sv_mute_players_with_social_penalties 0 tv_relayvoice 1 sv_cheats 0 mp_ct_default_melee weapon_knife @@ -43,5 +37,3 @@ mp_warmup_start mp_warmup_pausetimer 1 mp_warmuptime 9999 cash_team_bonus_shorthanded 0 -cash_team_loser_bonus_shorthanded 0 - diff --git a/documentation/docs/event_schema.yml b/documentation/docs/event_schema.yml index 1909914..5a18526 100644 --- a/documentation/docs/event_schema.yml +++ b/documentation/docs/event_schema.yml @@ -226,6 +226,23 @@ webhooks: description: The stats for team 2. allOf: - $ref: "#/components/schemas/MatchZyStatsTeam" + "MatchZyOnDemoUploadEnded": + post: + requestBody: + content: + application/json: + schema: + title: MatchZyDemoUploadEndedEvent + allOf: + - "$ref": "#/components/schemas/MatchZyDemoFileEvent" + - type: object + properties: + event: + enum: + - demo_upload_ended + success: + type: boolean + description: Whether the upload was successful. components: schemas: @@ -241,9 +258,9 @@ components: - type: object properties: matchid: - type: string + type: integer description: The ID of the match. - example: '14272' + example: 14272 MatchZyMatchTeamEvent: allOf: - "$ref": "#/components/schemas/MatchZyMatchEvent" @@ -560,6 +577,17 @@ components: minimum: 0 description: 'The number of times the player was elected the round MVP.' example: 4 + MatchZyDemoFileEvent: + allOf: + - "$ref": "#/components/schemas/MatchZyMapEvent" + - type: object + properties: + filename: + type: string + example: "1324_map_0_de_nuke.dem" + description: | + The name of the file containing the CSTV recording of the map. The format is determined by the + `matchzy_demo_name_format` parameter. tags: - name: All Events description: Forward fired for all events. diff --git a/documentation/docs/match_setup.md b/documentation/docs/match_setup.md index 012ea3c..8294be7 100644 --- a/documentation/docs/match_setup.md +++ b/documentation/docs/match_setup.md @@ -19,7 +19,7 @@ There are 2 commands available which can be used to load a match: ```json title="csgo/astralis_vs_navi_27.json" { - "matchid": "27", + "matchid": 27, "team1": { "name": "Astralis", "players": {