1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-07 21:58:06 -05:00

H2M-Mod Support (#337)

* feat: add h2m support

* fix: remove unneeded comma
This commit is contained in:
Liam 2024-08-13 02:05:25 +01:00 committed by GitHub
parent 4d1e7c2692
commit 88d05f5a8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 356 additions and 33 deletions

View File

@ -614,10 +614,10 @@
}
]
},
{
{
"Game": "H1",
"Gametypes": [
{
{
"Name": "conf",
"Alias": "Kill Confirmed"
},
@ -637,11 +637,11 @@
"Name": "dom",
"Alias": "Domination"
},
{
{
"Name": "gun",
"Alias": "Gun Game"
},
{
{
"Name": "hp",
"Alias": "Hardpoint"
},
@ -662,7 +662,56 @@
"Alias": "Team Deathmatch"
}
]
}
},
{
"Game": "H2M",
"Gametypes": [
{
"Name": "conf",
"Alias": "Kill Confirmed"
},
{
"Name": "ctf",
"Alias": "Capture The Flag"
},
{
"Name": "dd",
"Alias": "Demolition"
},
{
"Name": "dm",
"Alias": "Free For All"
},
{
"Name": "dom",
"Alias": "Domination"
},
{
"Name": "gun",
"Alias": "Gun Game"
},
{
"Name": "hp",
"Alias": "Hardpoint"
},
{
"Name": "koth",
"Alias": "Headquarters"
},
{
"Name": "sab",
"Alias": "Sabotage"
},
{
"Name": "sd",
"Alias": "Search & Destroy"
},
{
"Name": "war",
"Alias": "Team Deathmatch"
}
]
}
],
"Maps": [
{
@ -864,7 +913,7 @@
{
"Alias": "Der Riese",
"Name": "nazi_zombie_factory"
}
}
]
},
{
@ -1106,7 +1155,7 @@
"Alias": "Seatown",
"Name": "mp_seatown"
},
{
{
"Alias": "Mission",
"Name": "mp_bravo"
},
@ -1125,7 +1174,7 @@
{
"Alias": "Lockdown",
"Name": "mp_alpha"
}
}
]
},
{
@ -1249,15 +1298,15 @@
},
{
"Alias": "Call of the Dead",
"Name": "zombie_coast"
"Name": "zombie_coast"
},
{
"Alias": "Shangri-La",
"Name": "zombie_temple"
"Name": "zombie_temple"
},
{
"Alias": "Moon",
"Name": "zombie_moon"
"Alias": "Moon",
"Name": "zombie_moon"
},
{
"Alias": "Nacht Der Untoten",
@ -1274,7 +1323,7 @@
{
"Alias": "Der Riese",
"Name": "zombie_cod5_factory"
}
}
]
},
{
@ -1722,67 +1771,67 @@
"Alias": "Outlaw",
"Name": "mp_western"
},
{
{
"Alias": "Fringe Night",
"Name": "mp_veiled_heyday"
},
{
{
"Alias": "Redwood Snow",
"Name": "mp_redwood_ice"
},
{
{
"Alias": "Shadows of Evil",
"Name": "zm_zod"
},
{
{
"Alias": "Der Eisendrache",
"Name": "zm_castle"
},
{
{
"Alias": "Zetsubou No Shima",
"Name": "zm_island"
},
{
{
"Alias": "Gorod Krovi",
"Name": "zm_stalingrad"
},
{
{
"Alias": "Revelations",
"Name": "zm_genesis"
},
{
{
"Alias": "Ascension",
"Name": "zm_cosmodrome"
},
{
{
"Alias": "Kino der Toten",
"Name": "zm_theater"
},
{
{
"Alias": "Moon",
"Name": "zm_moon"
},
{
},
{
"Alias": "Nacht der Untoten",
"Name": "zm_prototype"
},
{
{
"Alias": "Origins",
"Name": "zm_tomb"
},
{
{
"Alias": "Shangri-La",
"Name": "zm_temple"
},
{
},
{
"Alias": "Shi No Numa",
"Name": "zm_sumpf"
},
{
{
"Alias": "The Giant",
"Name": "zm_factory"
},
{
{
"Alias": "Verrückt",
"Name": "zm_asylum"
}
@ -2158,7 +2207,228 @@
"Name": "mp_bog_summer"
}
]
},
},
{
"Game": "H2M",
"Maps": [
{
"Alias": "Ambush",
"Name": "mp_convoy"
},
{
"Alias": "Backlot",
"Name": "mp_backlot"
},
{
"Alias": "Bloc",
"Name": "mp_bloc"
},
{
"Alias": "Bog",
"Name": "mp_bog"
},
{
"Alias": "Countdown",
"Name": "mp_countdown"
},
{
"Alias": "Crash",
"Name": "mp_crash"
},
{
"Alias": "Crossfire",
"Name": "mp_crossfire"
},
{
"Alias": "District",
"Name": "mp_citystreets"
},
{
"Alias": "Downpour",
"Name": "mp_farm"
},
{
"Alias": "Overgrown",
"Name": "mp_overgrown"
},
{
"Alias": "Pipeline",
"Name": "mp_pipeline"
},
{
"Alias": "Shipment",
"Name": "mp_shipment"
},
{
"Alias": "Showdown",
"Name": "mp_showdown"
},
{
"Alias": "Strike",
"Name": "mp_strike"
},
{
"Alias": "Vacant",
"Name": "mp_vacant"
},
{
"Alias": "Wet Work",
"Name": "mp_cargoship"
},
{
"Alias": "Winter Crash",
"Name": "mp_crash_snow"
},
{
"Alias": "Broadcast",
"Name": "mp_broadcast"
},
{
"Alias": "Creek",
"Name": "mp_creek"
},
{
"Alias": "Chinatown",
"Name": "mp_carentan"
},
{
"Alias": "Killhouse",
"Name": "mp_killhouse"
},
{
"Alias": "Day Break",
"Name": "mp_farm_spring"
},
{
"Alias": "Beach Bog",
"Name": "mp_bog_summer"
},
{
"Alias": "Airport",
"Name": "airport"
},
{
"Alias": "Blizzard",
"Name": "cliffhanger"
},
{
"Alias": "Contingency",
"Name": "contingency"
},
{
"Alias": "DC Burning",
"Name": "dcburning"
},
{
"Alias": "Dumpsite",
"Name": "boneyard"
},
{
"Alias": "Gulag",
"Name": "gulag"
},
{
"Alias": "Oilrig",
"Name": "oilrig"
},
{
"Alias": "Safehouse",
"Name": "estate"
},
{
"Alias": "Whiskey Hotel",
"Name": "dc_whitehouse"
},
{
"Alias": "Afghan",
"Name": "mp_afghan"
},
{
"Alias": "Bailout",
"Name": "mp_complex"
},
{
"Alias": "Carnival",
"Name": "mp_abandon"
},
{
"Alias": "Derail",
"Name": "mp_derail"
},
{
"Alias": "Estate",
"Name": "mp_estate"
},
{
"Alias": "Favela",
"Name": "mp_favela"
},
{
"Alias": "Fuel",
"Name": "mp_fuel2"
},
{
"Alias": "Highrise",
"Name": "mp_highrise"
},
{
"Alias": "Invasion",
"Name": "mp_invasion"
},
{
"Alias": "Karachi",
"Name": "mp_checkpoint"
},
{
"Alias": "Quarry",
"Name": "mp_quarry"
},
{
"Alias": "Rundown",
"Name": "mp_rundown"
},
{
"Alias": "Rust",
"Name": "mp_rust"
},
{
"Alias": "Salvage",
"Name": "mp_compact"
},
{
"Alias": "Scrapyard",
"Name": "mp_boneyard"
},
{
"Alias": "Skidrow",
"Name": "mp_nightshift"
},
{
"Alias": "Storm",
"Name": "mp_storm"
},
{
"Alias": "Sub Base",
"Name": "mp_subbase"
},
{
"Alias": "Terminal",
"Name": "mp_terminal"
},
{
"Alias": "Trailer Park",
"Name": "mp_trailerpark"
},
{
"Alias": "Underpass",
"Name": "mp_underpass"
},
{
"Alias": "Wasteland",
"Name": "mp_brecourt"
}
]
},
{
"Game": "CSGO",
"Maps": [

View File

@ -0,0 +1,49 @@
var rconParser;
var eventParser;
var plugin = {
author: "fed, diamante",
version: 0.2,
name: "H2M-Mod Parser",
isParser: true,
onEventAsync: function (gameEvent, server) {},
onLoadAsync: function (manager) {
rconParser = manager.GenerateDynamicRConParser(this.name);
eventParser = manager.GenerateDynamicEventParser(this.name);
rconParser.Configuration.CommandPrefixes.Kick = 'kickClient {0} "{1}"';
rconParser.Configuration.CommandPrefixes.Ban = 'kickClient {0} "{1}"';
rconParser.Configuration.CommandPrefixes.TempBan = 'kickClient {0} "{1}"';
rconParser.Configuration.CommandPrefixes.Tell = 'tellraw {0} "{1}"';
rconParser.Configuration.CommandPrefixes.Say = 'sayraw "{0}"';
rconParser.Configuration.CommandPrefixes.RConResponse =
"\xff\xff\xff\xffprint";
rconParser.Configuration.Dvar.Pattern =
'^ *\\"(.+)\\" is: \\"(.+)?\\" default: \\"(.+)?\\"';
rconParser.Configuration.Status.Pattern =
"^ *([0-9]+) +-?([0-9]+) +(Yes|No) +((?:[A-Z]+|[0-9]+)) +((?:[a-z]|[0-9]){8,32}|(?:[a-z]|[0-9]){8,32}|bot[0-9]+|(?:[0-9]+)) *(.{0,32}) +(\\d+\\.\\d+\\.\\d+.\\d+\\:-*\\d{1,5}|0+.0+:-*\\d{1,5}|loopback|unknown|bot) +(-*[0-9]+) *$";
rconParser.Configuration.StatusHeader.Pattern =
"num +score +bot +ping +guid +name +address +qport *";
rconParser.Configuration.Status.AddMapping(102, 4);
rconParser.Configuration.Status.AddMapping(103, 5);
rconParser.Configuration.Status.AddMapping(104, 6);
rconParser.Configuration.WaitForResponse = false;
rconParser.Configuration.DefaultRConPort = 27016;
eventParser.Configuration.GameDirectory = "";
eventParser.Configuration.LocalizeText = "\x1f";
rconParser.Version =
"H1 MP 1.15 build 1251288 Tue Jul 23 13:38:30 2019 win64";
rconParser.GameName = 13; // H2M
eventParser.Version =
"H1 MP 1.15 build 1251288 Tue Jul 23 13:38:30 2019 win64";
eventParser.GameName = 13; // H2M
},
onUnloadAsync: function () {},
onTickAsync: function (server) {},
};

View File

@ -124,6 +124,9 @@ const plugin = {
'csgo': {
right: colorLeft
},
'h2m': {
right: colorLeft
},
};
const servers = plugin.manager.servers;

View File

@ -36,7 +36,8 @@ namespace SharedLibraryCore
SHG1 = 9,
CSGO = 10,
H1 = 11,
L4D2 = 12
L4D2 = 12,
H2M = 13
}
// only here for performance