Post: BO2 Player Functions + getMapName/GameMode (C#)
03-23-2014, 05:32 PM #1
Notorious
Caprisuns Is Back
(adsbygoogle = window.adsbygoogle || []).push({}); Here are some useful payer functions for mod menus and whatever else you need them for

MULTIPLAYER



getClientName:
    
public static String getClientName(Int32 clientIndex)
{
String Name = PS3.Extension.ReadString(0x01783e6c+ ((uint)clientIndex * 0x580Cool Man (aka Tustin));
if (Name != String.Empty)
return Name;
return "Not Connected";
}


getHostNumber:
    
public static String getHostName9()
{
String Host = ReturnInfos(1Cool Man (aka Tustin);
if (Host == "hehehehehehehehe")
return "Dedicated Server (No Player is Host)";
else if (Host == "")
return "Not in game";
else return Host;
}


public static Int32 getHostNumber()
{
String Host = getHostName9();
Int32 HostNum = 0;
for (Int32 i = 0; i <= 12; i++)
{
if (getClientName(i) == Host)
{
HostNumber = i;
HostNum = i;
}
}
return HostNum;
}


Get Mapname:
    
public String getMapName()
{
String Map = GetServerDetails(6);
switch (Map)
{
default: return "Unknown Map";
case "mp_la": return "Aftermath";
case "mp_dig": return "Dig";
case "mp_pod": return "Pod";
case "mp_takeoff": return "Take Off";
case "mp_frostbite": return "Frost";
case "mp_mirage": return "Mirage";
case "mp_hydro": return "Hydro";
case "mp_skate": return "Grind";
case "mp_downhill": return "Down Hill";
case "mp_concert": return "Encore";
case "mp_vertigo": return "Vertigo";
case "mp_magma": return "Magma";
case "mp_Studio": return "studio";
case "mp_paintball": return "Rush";
case "mp_Cove": return "Castaway";
case "mp_drone": return "Drone";
case "mp_express": return "Express";
case "mp_Detour": return "bridge";
case "mp_Uplink": return "uplink";
case "mp_socotra": return "Yemen";
case "mp_turbine": return "Turbine";
case "mp_village": return "Standoff";
case "mp_Slums": return "slums";
case "mp_raid": return "Raid";
case "mp_nightclub": return "Plaza";
case "mp_overflow": return "Overflow";
case "mp_meltdown": return "Meltdown";
case "mp_hijacked": return "Hijacked";
case "mp_carrier": return "Carrier";
case "mp_dockside": return "Cargo";
case "mp_nuketown_2020": return "Nuketown 2025";
}
}


Get Game Mode:
    
public String getGameMode()
{
String GM = GetServerDetails(2);
switch (GM)
{
default: return "Unknown Gametype";
case "tdm": return "Team Deathmatch";
case "dm": return "Free for All";
case "sd": return "Search and Destroy";
case "dom": return "Domination";
case "conf": return "Kill Confirmed";
case "sr": return "Search and Rescue";
case "grind": return "Grind";
case "blitz": return "Blitz";
case "cranked": return "Cranked";
case "infect": return "Infected";
case "koth": return "Hardpoint";
case "hq": return "Headquarters";
case "sotf": return "Hunted";
case "dem": return "Demolition";
case "oneflag": return "One Flag CTF";
case "horde": return "Safeguard";
case "sotf_ffa": return "Hunted FFA";
case "shrp": return "Sharp Shooter";
case "ctf": return "Capture The Flag";
case "oic": return "One In The Chamber";
case "sas": return "Sticks And Stones";
case "gun": return "Gun Game";
}
}


Get Server Details: (needed)
    
private String GetServerDetails(Int32 Index)
{
return Encoding.ASCII.GetString(PS3.GetBytes(0x00f57fd5, 0x100)).Replace(@"\", "|").Split('|'Winky Winky[Index];
}



ZOMBIES

getClientName:
    
public static String getClientName(Int32 clientIndex)
{
String Name = PS3.Extension.ReadString(0x1783E6C+ ((uint)clientIndex * 0x580Cool Man (aka Tustin));
if (Name != String.Empty)
return Name;
return "Not Connected";
}






im going to try to update this with game modes later.

hope this was useful

PS3 Class If Needed: You must login or register to view this content.

Credits:
seb5594 - original ghosts function
AlmightySo updated ghosts function
Prime Notorious - BO2 Function
Mango_Knife - Update with all map names + Gamemode
(adsbygoogle = window.adsbygoogle || []).push({});
03-23-2014, 05:38 PM #2
Why'd you make two threads lol.
03-23-2014, 05:40 PM #3
Notorious
Caprisuns Is Back
Originally posted by AlmightySo View Post
Why'd you make two threads lol.


woops
03-23-2014, 07:09 PM #4
$ticky
Banned
Originally posted by Prime
Here are some useful payer functions for mod menus and whatever else you need them for

getClientName:
    
public static String getClientName(Int32 clientIndex)
{
String Name = PS3.Extension.ReadString(0x01783e6c+ ((uint)clientIndex * 0x580Cool Man (aka Tustin));
if (Name != String.Empty)
return Name;
return "Not Connected";
}


getHostNumber:
    
public static String getHostName9()
{
String Host = ReturnInfos(1Cool Man (aka Tustin);
if (Host == "hehehehehehehehe")
return "Dedicated Server (No Player is Host)";
else if (Host == "")
return "Not in game";
else return Host;
}


public static Int32 getHostNumber()
{
String Host = getHostName9();
Int32 HostNum = 0;
for (Int32 i = 0; i <= 12; i++)
{
if (getClientName(i) == Host)
{
HostNumber = i;
HostNum = i;
}
}
return HostNum;
}


Get Mapname:
    
public String getMapName()
{
String Map = ReturnInfos(6);
switch (Map)
{
default: return "Unknown Map";
case "mp_drone": return "Drone";
case "mp_nuketown_2020": return "Nuketown";
case "mp_carrier": return "Carrier";
case "mp_express": return "Express";
case "mp_hijacked": return "Hijacked";
case "mp_la": return "Aftermath";
case "mp_meltdown": return "Meltdown";
case "mp_nightclub": return "Plaza";
case "mp_overflow": return "Overflow";
case "mp_raid": return "Raid";
case "mp_slums": return "Slums";
case "mp_socotra": return "Yemen";
case "mp_turbine": return "Turbine";
case "mp_village": return "Standoff";
case "mp_downhill": return "Downhill";
case "mp_hydro": return "Hydro";
case "mp_mirage": return "Mirage";
case "mp_skate": return "Grind";//might be more maps but this is all i found
}
}


im going to try to update this with game modes later.

hope this was useful

PS3 Class If Needed: You must login or register to view this content.

Credits:
AlmightySo for ghosts function


Where is the returnInfos function?
03-23-2014, 07:16 PM #5
Notorious
Caprisuns Is Back
Originally posted by ticky View Post
Where is the returnInfos function?


Let me try to update that function.
03-23-2014, 08:27 PM #6
Mango_Knife
In my man cave
Originally posted by Prime
Here are some useful payer functions for mod menus and whatever else you need them for

getClientName:
    
#region Black Ops 2 Get Server Details Function:
public static String getClientName(Int32 clientIndex)
{
String Name = PS3.Extension.ReadString(0x01783e6c+ ((uint)clientIndex * 0x580Cool Man (aka Tustin));
if (Name != String.Empty)
return Name;
return "Not Connected";
}


getHostNumber:
    
public static String getHostName9()
{
String Host = ReturnInfos(1Cool Man (aka Tustin);
if (Host == "hehehehehehehehe")
return "Dedicated Server (No Player is Host)";
else if (Host == "")
return "Not in game";
else return Host;
}


public static Int32 getHostNumber()
{
String Host = getHostName9();
Int32 HostNum = 0;
for (Int32 i = 0; i <= 12; i++)
{
if (getClientName(i) == Host)
{
HostNumber = i;
HostNum = i;
}
}
return HostNum;
}


Get Mapname:
    
public String getMapName()
{
String Map = ReturnInfos(6);
switch (Map)
{
default: return "Unknown Map";
case "mp_drone": return "Drone";
case "mp_nuketown_2020": return "Nuketown";
case "mp_carrier": return "Carrier";
case "mp_express": return "Express";
case "mp_hijacked": return "Hijacked";
case "mp_la": return "Aftermath";
case "mp_meltdown": return "Meltdown";
case "mp_nightclub": return "Plaza";
case "mp_overflow": return "Overflow";
case "mp_raid": return "Raid";
case "mp_slums": return "Slums";
case "mp_socotra": return "Yemen";
case "mp_turbine": return "Turbine";
case "mp_village": return "Standoff";
case "mp_downhill": return "Downhill";
case "mp_hydro": return "Hydro";
case "mp_mirage": return "Mirage";
case "mp_skate": return "Grind";//might be more maps but this is all i found
}
}


im going to try to update this with game modes later.

hope this was useful

PS3 Class If Needed: You must login or register to view this content.

Credits:
AlmightySo for ghosts function


That's how i code it if someone interesting:
    
private String GetServerDetails(Int32 Index)
{
return Encoding.ASCII.GetString(PS3.GetBytes(0x00f57fd5, 0x100)).Replace(@"\", "|").Split('|'Winky Winky[Index];
}
public String getMapName()
{
String Map = GetServerDetails(4);
switch (Map)
{
default: return "Unknown Map";
case "": return "";
case "mp_la": return "Aftermath";
case "mp_dig": return "Dig";
case "mp_pod": return "Pod";
case "mp_takeoff": return "Take Off";
case "mp_frostbite": return "Frost";
case "mp_mirage": return "Mirage";
case "mp_hydro": return "Hydro";
case "mp_skate": return "Grind";
case "mp_downhill": return "Down Hill";
case "mp_concert": return "Encore";
case "mp_vertigo": return "Vertigo";
case "mp_magma": return "Magma";
case "mp_Studio": return "studio";
case "mp_paintball": return "Rush";
case "mp_Cove": return "Castaway";
case "mp_drone": return "Drone";
case "mp_express": return "Express";
case "mp_Detour": return "bridge";
case "mp_Uplink": return "uplink";
case "mp_socotra": return "Yemen";
case "mp_turbine": return "Turbine";
case "mp_village": return "Standoff";
case "mp_Slums": return "slums";
case "mp_raid": return "Raid";
case "mp_nightclub": return "Plaza";
case "mp_overflow": return "Overflow";
case "mp_meltdown": return "Meltdown";
case "mp_hijacked": return "Hijacked";
case "mp_carrier": return "Carrier";
case "mp_dockside": return "Cargo";
case "mp_nuketown_2020": return "Nuketown 2025";
}
}
public String getGameMode()
{
String GM = GetServerDetails(2);
switch (GM)
{
default: return "Unknown Gametype";
case "tdm": return "Team Deathmatch";
case "dm": return "Free for All";
case "sd": return "Search and Destroy";
case "dom": return "Domination";
case "conf": return "Kill Confirmed";
case "sr": return "Search and Rescue";
case "grind": return "Grind";
case "blitz": return "Blitz";
case "cranked": return "Cranked";
case "infect": return "Infected";
case "koth": return "Hardpoint";
case "hq": return "Headquarters";
case "sotf": return "Hunted";
case "dem": return "Demolition";
case "oneflag": return "One Flag CTF";
case "horde": return "Safeguard";
case "sotf_ffa": return "Hunted FFA";
case "shrp": return "Sharp Shooter";
case "ctf": return "Capture The Flag";
case "oic": return "One In The Chamber";
case "sas": return "Sticks And Stones";
case "gun": return "Gun Game";
}
}

public String getHostName()
{
String Host = GetServerDetails(12);
if (Host == "")
return "You'r not the host";
else if (Host == "")
return "You are not In-Game";
else return Host;
}
#endregion


This all the maps and gamemodes that are on Black ops 2, so just copy them Smile
By the way nice work with the Get Host Number :yes:
Never thought to find it =D

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo