Post: [Release]Get Server Details C#
02-25-2014, 06:04 PM #1
Mango_Knife
In my man cave
(adsbygoogle = window.adsbygoogle || []).push({}); Hey guys

Welcome and today im release a function that originaly made by Seb5594, but i just converted it to mw2 Awesome face
So if you are using this dont forget to give credits to Seb5594

Alright so this is how you are using that:

1) Add this code somewhere on your project:
    
//Please Credit Seb5594, Shark And Mango_Knife
#region Boolean's
public static Boolean InGame()
{
return Lib.ReadBool(0x01D17A8C);
}
private static String ReturnInfos(Int32 Index)
{
return Encoding.ASCII.GetString(Lib.GetBytes(0x17A54E0, 0x234)).Replace(@"\", "|").Split('|'Winky Winky[Index];
}
private static String OnlineInfos(Int32 Index)
{
return Encoding.ASCII.GetString(Lib.GetBytes(0x009aa2d9, 0x234)).Replace(@"\", "|").Split('|'Winky Winky[Index];
}
private static Boolean Online()
{
if (ReturnInfos(1) == "cg_predictItems")
{
return true;
}
else
{
return false;
}
}
#endregion
#region Host Name?
public static String getHostName()
{
if (InGame())
{
if (Online())
{
return ReturnInfos(Cool Man (aka Tustin);
}
else
{
return ReturnInfos(16);
}
}
else { return "Not in game"; }
}
#endregion
#region Max Players?
public static String getMaxPlayers()
{
if (InGame())
{
if (Online())
{
return OnlineInfos(1Cool Man (aka Tustin);
}
else
{
return ReturnInfos(1Cool Man (aka Tustin);
}
}
else { return "Not in game"; }
}
#endregion
#region Gamemode
public static String getGameMode()
{
if (InGame())
{
if (Online())
{
//Online
switch (OnlineInfos(2))
{
default: return "Unknown Gametype";
case "1": return "Loading Game";
case "war": return "Team Deathmatch";
case "dm": return "Free for All";
case "sd": return "Search and Destroy";
case "dom": return "Domination";
case "dem": return "Demolition";
case "gtnw": return "Global Thermonuclear War";
case "ctf": return "Capture The Flag";
case "arena": return "Arena";
}
}
else
{
//Private Match
switch (ReturnInfos(2))
{
default: return "Unknown Gametype";
case "1": return "Loading Game";
case "war": return "Team Deathmatch";
case "dm": return "Free for All";
case "sd": return "Search and Destroy";
case "dom": return "Domination";
case "dem": return "Demolition";
case "gtnw": return "Global Thermonuclear War";
case "ctf": return "Capture The Flag";
case "arena": return "Arena";
}
}
}
else { return "Not in game"; }
}
#endregion
#region Hardcore?
public static String getHardcore()
{
if (InGame())
{
if (Online())
{
switch (OnlineInfos(4))
{
default: return "Unknown Gametype";
case "20000": return "Loading Game";
case "0": return "Off";
case "1": return "On";
}
}
else
{
switch (ReturnInfos(4))
{
default: return "Unknown Gametype";
case "20000": return "Loading Game";
case "0": return "Off";
case "1": return "On";
}
}
}
else { return "Not in game"; }
}
#endregion
#region Map
public static String get_MapName()
{
String str = Lib.ReadString(0xD495F4), MapStr = "Not in game";
if (InGame())
{
if (str.Contains("afghan"))
MapStr = "Afghan";
if (str.Contains("highrise"))
MapStr = "Highrise";
if (str.Contains("rundown"))
MapStr = "Rundown";
if (str.Contains("quarry"))
MapStr = "Quarry";
if (str.Contains("nightshift"))
MapStr = "Skidrow";
if (str.Contains("terminal"))
MapStr = "Terminal";
if (str.Contains("brecourt"))
MapStr = "Wasteland";
if (str.Contains("derail"))
MapStr = "Derail";
if (str.Contains("estate"))
MapStr = "Estate";
if (str.Contains("favela"))
MapStr = "Favela";
if (str.Contains("invasion"))
MapStr = "Invasion";
if (str.Contains("rust"))
MapStr = "Rust";
if (str.Contains("scrapyard") || str.Contains(("boneyard")))
MapStr = "Scrapyard";
if (str.Contains("sub"))
MapStr = "Subbase";
if (str.Contains("underpass"))
MapStr = "Underpass";
if (str.Contains("checkpoint"))
MapStr = "Karachi";
if (str.Contains("bailout"))
MapStr = "Bailout";
if (str.Contains("compact"))
MapStr = "Salvage";
if (str.Contains("storm") || str.Contains(("storm2")))
MapStr = "Storm";
if (str.Contains("crash"))
MapStr = "Crash";
if (str.Contains("overgrown"))
MapStr = "Overgrown";
if (str.Contains("strike"))
MapStr = "Strike";
if (str.Contains("vacant"))
MapStr = "Vacant";
if (str.Contains("trailerpark"))
MapStr = "Trailer Park";
if (str.Contains("fuel"))
MapStr = "Fuel";
if (str.Contains("abandon"))
MapStr = "Carnival";
if (str.Contains("dlc2_ui_mp"))
MapStr = "Not in game";
}
return MapStr;
}
#endregion


2) Put 10 labels somewhere you want the Server Details Function, it will be like that:
You must login or register to view this content.

3) Now insert this function on your Button:
label1.Text = getHostName();
label2.Text = getMapName();
label3.Text = getGameMode();
label4.Text = getHardcore();
label5.Text = getMaxPlayers();
It need to be match to those labels: You must login or register to view this content.

And thats all your done Smile
In the end you will get something like that:
You must login or register to view this content.
If you want to make this auto refresh just use timer:


Credits:
Mango_Knife - Updated this to Mw2.
Seb5594 - Original Function.
    
private void timer1_Tick(object sender, EventArgs e)
{
label1.Text = getHostName();
label2.Text = getMapName();
label3.Text = getGameMode();
label4.Text = getHardcore();
label5.Text = getMaxPlayers();
}
(adsbygoogle = window.adsbygoogle || []).push({});

The following 6 users say thank you to Mango_Knife for this useful post:

.MrRedDoT, FusionIsDaName, Hori_By_Nature, MoTmrD-, MrRambo, SnaY
02-25-2014, 06:09 PM #2
GodJob Mango
02-25-2014, 06:09 PM #3
Nice Winky Winky
02-25-2014, 07:10 PM #4
Mango_Knife
In my man cave
Thanks.
03-23-2014, 09:24 AM #5
makeabce
I defeated!
Originally posted by Knife View Post
Hey guys

Welcome and today im release a function that originaly made by Seb5594, but i just converted it to mw2 Awesome face
So if you are using this dont forget to give credits to Seb5594

Alright so this is how you are using that:

1) Add this code somewhere on your project:
    
//Please Credit Seb5594 And Mango_Knife
private String ReturnInfos(Int32 Index)
{
return Encoding.ASCII.GetString(PS3.GetBytes(0x00824f03/*This is the offset*/, 0x100)).Replace(@"\", "|").Split('|'Winky Winky[Index];
}
public String getMapName()
{
String Map = ReturnInfos(6);
switch (Map)
{
default: return "Unknown Map";
case "mp_afghan": return "Afghan";
case "mp_derail": return "Derail";
case "mp_estate": return "Estate";
case "mp_favela": return "Favela";
case "mp_snow": return "Whiteout";
case "mp_highrise": return "Highrise";
case "mp_invasion": return "Invasion";
case "mp_checkpoint": return "Karachi";
case "mp_quarry": return "Quarry";
case "mp_rundown": return "Rundown";
case "mp_rust": return "Rust";
case "mp_boneyard": return "Scrapyard";
case "mp_subbase": return "Sub Base";
case "mp_terminal": return "Terminal";
case "mp_underpass": return "Underpass";
case "mp_Bailout": return "Bailout";
case "mp_crash": return "Crash";
case "mp_overgrown": return "Overgrown";
case "mp_storm": return "Storm";
case "mp_fuel": return "Fuel";
case "mp_strike": return "Strike";
case "mp_trailerpark": return "Trailer Park";
case "mp_vacant": return "Vacant";
case "mp_abandon": return "Carnival";
case "mp_nightshift": return "Skidrow";
case "mp_brecourt": return "Wasteland";
case "mp_compact": return "Salvage";
}
}
public String getGameMode()
{
String GM = ReturnInfos(2);
switch (GM)
{
default: return "";
case "war": return "Team Deathmatch";
case "dm": return "Free for All";
case "sd": return "Search and Destroy";
case "dom": return "Domination";
case "koth": return "Headquarters";
case "gtnw": return "GTNW";
case "oneflag": return "One Flag";
case "vip": return "VIP";
case "sab": return "Sabotage";
case "dd": return "Demolition";
case "dem": return "Demolition";
case "arena": return "Arena";
}
}

public String getHardcore()
{
String HC = ReturnInfos(4);
switch (HC)
{
default: return "Unknown Gametype";
case "0": return "Hardcore - Off";
case "1": return "Hardcore - On";
}
}

public String getMaxPlayers()
{
String Host = ReturnInfos(1Cool Man (aka Tustin);
if (Host == "Modern Warfare 3")
return "Dedicated Server (No Player is Host)";
else if (Host == "")
return "You are not In-Game";
else return Host;
}

public String getHostName()
{
String Host = ReturnInfos(16);
if (Host == "")
return "You are not In-Game";
else return Host;
}


2) Put 10 labels somewhere you want the Server Details Function, it will be like that:
You must login or register to view this content.

3) Now insert this function on your Button:
label1.Text = getHostName();
label2.Text = getMapName();
label3.Text = getGameMode();
label4.Text = getHardcore();
label5.Text = getMaxPlayers();
It need to be match to those labels: You must login or register to view this content.

And thats all your done Smile
In the end you will get something like that:
You must login or register to view this content.
If you want to make this auto refresh just use timer:


Credits:
Mango_Knife - Updated this to Mw2.
Seb5594 - Original Function.
    
Int32 num1;
private void timer1_Tick(object sender, EventArgs e)
{
if (num1 == 0)
{
label1.Text = getHostName();
label2.Text = getMapName();
label3.Text = getGameMode();
label4.Text = getHardcore();
label5.Text = getMaxPlayers();
num1 = 0;
}
}


    
Error 2 'MW2_Real_Time_Editor.Form1.PS3' does not contain a definition for 'GetBytes' C:\Users\Magen\Documents\visual studio 2010\Projects\MW2 Real Time Editor\MW2 Real Time Editor\Form1.cs 556 49 MW2 Real Time Editor


Where do i get that PS3.GetBytes?
I thought it was PS3.GetMemory, but when i tried it, it gaved me more errors.
03-23-2014, 06:34 PM #6
Mango_Knife
In my man cave
Originally posted by makeabce View Post
    
Error 2 'MW2_Real_Time_Editor.Form1.PS3' does not contain a definition for 'GetBytes' C:\Users\Magen\Documents\visual studio 2010\Projects\MW2 Real Time Editor\MW2 Real Time Editor\Form1.cs 556 49 MW2 Real Time Editor


Where do i get that PS3.GetBytes?
I thought it was PS3.GetMemory, but when i tried it, it gaved me more errors.


using PS3Lib?
03-26-2014, 05:45 PM #7
jwm614
NextGenUpdate Elite
Originally posted by Knife View Post
Hey guys

Welcome and today im release a function that originaly made by Seb5594, but i just converted it to mw2 Awesome face
So if you are using this dont forget to give credits to Seb5594

Alright so this is how you are using that:

1) Add this code somewhere on your project:
    
//Please Credit Seb5594 And Mango_Knife
private String ReturnInfos(Int32 Index)
{
return Encoding.ASCII.GetString(PS3.GetBytes(0x00824f03/*This is the offset*/, 0x100)).Replace(@"\", "|").Split('|'Winky Winky[Index];
}
public String getMapName()
{
String Map = ReturnInfos(6);
switch (Map)
{
default: return "Unknown Map";
case "mp_afghan": return "Afghan";
case "mp_derail": return "Derail";
case "mp_estate": return "Estate";
case "mp_favela": return "Favela";
case "mp_snow": return "Whiteout";
case "mp_highrise": return "Highrise";
case "mp_invasion": return "Invasion";
case "mp_checkpoint": return "Karachi";
case "mp_quarry": return "Quarry";
case "mp_rundown": return "Rundown";
case "mp_rust": return "Rust";
case "mp_boneyard": return "Scrapyard";
case "mp_subbase": return "Sub Base";
case "mp_terminal": return "Terminal";
case "mp_underpass": return "Underpass";
case "mp_Bailout": return "Bailout";
case "mp_crash": return "Crash";
case "mp_overgrown": return "Overgrown";
case "mp_storm": return "Storm";
case "mp_fuel": return "Fuel";
case "mp_strike": return "Strike";
case "mp_trailerpark": return "Trailer Park";
case "mp_vacant": return "Vacant";
case "mp_abandon": return "Carnival";
case "mp_nightshift": return "Skidrow";
case "mp_brecourt": return "Wasteland";
case "mp_compact": return "Salvage";
}
}
public String getGameMode()
{
String GM = ReturnInfos(2);
switch (GM)
{
default: return "";
case "war": return "Team Deathmatch";
case "dm": return "Free for All";
case "sd": return "Search and Destroy";
case "dom": return "Domination";
case "koth": return "Headquarters";
case "gtnw": return "GTNW";
case "oneflag": return "One Flag";
case "vip": return "VIP";
case "sab": return "Sabotage";
case "dd": return "Demolition";
case "dem": return "Demolition";
case "arena": return "Arena";
}
}

public String getHardcore()
{
String HC = ReturnInfos(4);
switch (HC)
{
default: return "Unknown Gametype";
case "0": return "Hardcore - Off";
case "1": return "Hardcore - On";
}
}

public String getMaxPlayers()
{
String Host = ReturnInfos(1Cool Man (aka Tustin);
if (Host == "Modern Warfare 3")
return "Dedicated Server (No Player is Host)";
else if (Host == "")
return "You are not In-Game";
else return Host;
}

public String getHostName()
{
String Host = ReturnInfos(16);
if (Host == "")
return "You are not In-Game";
else return Host;
}


2) Put 10 labels somewhere you want the Server Details Function, it will be like that:
You must login or register to view this content.

3) Now insert this function on your Button:
label1.Text = getHostName();
label2.Text = getMapName();
label3.Text = getGameMode();
label4.Text = getHardcore();
label5.Text = getMaxPlayers();
It need to be match to those labels: You must login or register to view this content.

And thats all your done Smile
In the end you will get something like that:
You must login or register to view this content.
If you want to make this auto refresh just use timer:


Credits:
Mango_Knife - Updated this to Mw2.
Seb5594 - Original Function.
    
Int32 num1;
private void timer1_Tick(object sender, EventArgs e)
{
if (num1 == 0)
{
label1.Text = getHostName();
label2.Text = getMapName();
label3.Text = getGameMode();
label4.Text = getHardcore();
label5.Text = getMaxPlayers();
num1 = 0;
}
}


your offset is not working for me on mw2 ethier but AlmightySo is working for me
04-10-2014, 07:21 PM #8
ImEraz_
Do a barrel roll!
It doesnt work for me
04-11-2014, 07:25 AM #9
Mx444
Bounty hunter
Work ! Thanks Mango
06-20-2014, 11:42 AM #10
Not work

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo