Post: Call Of Duty Ghosts PS3Lib + Button Monitoring + HUD Elements + Offsets + DVAR Dump
11-01-2013, 09:42 AM #1
ItsMagiicsz
Bounty hunter
(adsbygoogle = window.adsbygoogle || []).push({}); Hey guys, it has come to my attention that people have been trying to make ghosts mod menus but HUD Elements and other things have not been released. Here is everything you need and i hope this will help you.

PS3Lib :

    using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using System.Windows.Forms;
using PS3Lib;

// Made By iMCSx //

public static void SetElement(uint Element, uint HudTypes)
{
DEX.Extension.WriteUInt32(Element, HudTypes);
}


public static void SetClientDvars(int client, string dvars)
{
SV_SendServerCommand(client, "v " + dvars);
}


public static void iPrintln(int client, string message)
{
SV_SendServerCommand(client, "f \"" + message);
}


public static void iPrintlnBold(int client, string message)
{
SV_SendServerCommand(client, "c \"" + message);
}
}
}


Button Monitoring:

    public static string Key_IsDown(uint client)
{
byte[] But = new byte[4];
PS3.GetMemory(0x01393fe0 + (0x3580 * client), ref But);

string mystring = null;
mystring = BitConverter.ToString(But);
string result = mystring.Replace("-", "");
string result1 = result.Replace(" ", "");

string key = result1;
string KeyPressed = "";
if (key == "00000000")
{
KeyPressed = "NOKEY";
}
else if (key == "00000400")
{
KeyPressed = "X";
}
else if (key == "00000030")
{
KeyPressed = "[]";
}
else if (key == "00000200")
{
KeyPressed = "Crouch";
}
else if (key == "00000100")
{
KeyPressed = "Prone";
}
else if (key == "04000004")
{
KeyPressed = "R3";
}
else if (key == "00002002")
{
KeyPressed = "L3";
}
else if (key == "00004000")
{
KeyPressed = "R2";
}
else if (key == "00008000")
{
KeyPressed = "L2";
}
else if (key == "00080800")
{
KeyPressed = "L1";
}
else if (key == "00000001")
{
KeyPressed = "R1";
}
else if (key == "04002006")
{
KeyPressed = "R3 + L3";
}
else if (key == "0000C200")
{
KeyPressed = "Prone + R2 + L2";
}
else if (key == "0000C000")
{
KeyPressed = "R2 + L2";
}
else if (key == "00800000")
{
KeyPressed = "Start";
}
else
{
KeyPressed = key;
}
return KeyPressed;
}


HUD Elements (what you been waiting for!)

    public class Ghosts
{
class PS3
{
public static uint[] ProcessIDs;
public static uint ProcessID;
public static void Connect()
{
PS3TMAPI.InitTargetComms();
PS3TMAPI.Connect(0, null);
}
public static void TurnOFF()
{
PS3TMAPI.PowerOff(0, true);
}
public static void Attach()
{
PS3TMAPI.GetProcessList(0, out ProcessIDs);
ulong uProcess = ProcessIDs[0];
ProcessID = Convert.ToUInt32(uProcess);
PS3TMAPI.ProcessAttach(0, PS3TMAPI.UnitType.PPU, ProcessID);
PS3TMAPI.ProcessContinue(0, ProcessID);
}

public static void SetMemory(uint Address, byte[] Bytes)
{
PS3TMAPI.ProcessSetMemory(0, PS3TMAPI.UnitType.PPU, ProcessID, 0, Address, Bytes);
}
public static byte[] ReadMemory(uint addr, int lenght)
{
byte[] Get = new byte[lenght];
PS3.GetMemory(addr, ref Get);
return Get;
}
public static void GetMemory(uint Address, ref byte[] bytes)
{
PS3TMAPI.ProcessGetMemory(0, PS3TMAPI.UnitType.PPU, ProcessID, 0, Address, ref bytes);
}

public static string ReadString(uint addr)
{
byte[] Reader = new byte[1]; uint i = 0;
List<byte> StringBuilder = new List<byte>();
while (true)
{
PS3.GetMemory(addr + i, ref Reader);
if (Reader[0] == 0x00)
break;
else
StringBuilder.Add(Reader[0]);
i++;
}
System.Text.UTF8Encoding Encode = new System.Text.UTF8Encoding();
return Encode.GetString(StringBuilder.ToArray());
}
public static void WriteFloat(uint addr, float f)
{
byte[] Float = BitConverter.GetBytes(f);
Array.Reverse(Float);
PS3.SetMemory(addr, Float);
}
public static float ReadFloat(uint addr, int lenght)
{
byte[] F = PS3.ReadMemory(addr, 4);
if (BitConverter.IsLittleEndian)
{
Array.Reverse(F); // Convert big endian to little endian
}
float myFloat = BitConverter.ToSingle(F, 0);
return myFloat;
}


}
class Conversions
{
public static byte[] ReverseBytes(byte[] input)
{
Array.Reverse(input);
return input;
}
public static byte[] RandomizeRGBA()
{
byte[] RGBA = new byte[4];
Random randomize = new Random();
RGBA[0] = BitConverter.GetBytes(randomize.Next(0, 255))[0];
RGBA[1] = BitConverter.GetBytes(randomize.Next(0, 255))[0];
RGBA[2] = BitConverter.GetBytes(randomize.Next(0, 255))[0];
RGBA[3] = BitConverter.GetBytes(randomize.Next(0, 255))[0];
return RGBA;
}
}
public static class Hud
{
public static class HElems
{
public static uint //0xb8 4 = icon, 1 = text
xOffset = 0x04,
yOffset = 0x08,
textOffset = 0x40,
fontOffset = 0x24,
fontSizeOffset = 0x14, //43 30 ..
colorOffset = 0x30,
relativeOffset = 0x28, //no idea idc.. set it to 0
widthOffset = 0x44,
heightOffset = 0x48,
shaderOffset = 0x4C,
GlowColor = 0x8C,
clientOffset = 0x10,
alignOffset = 0x2C; //set it to 0 also..


}
public static byte[] ToHexFloat(float Axis)
{

byte[] bytes = BitConverter.GetBytes(Axis);
Array.Reverse(bytes);
return bytes;
}


public static byte[] RGBA(decimal R, decimal G, decimal B, decimal A)
{
byte[] RGBA = new byte[4];
byte[] RVal = BitConverter.GetBytes(Convert.ToInt32(R));
byte[] GVal = BitConverter.GetBytes(Convert.ToInt32(G));
byte[] BVal = BitConverter.GetBytes(Convert.ToInt32(B));
byte[] AVal = BitConverter.GetBytes(Convert.ToInt32(A));
RGBA[0] = RVal[0];
RGBA[1] = GVal[0];
RGBA[2] = BVal[0];
RGBA[3] = AVal[0];
return RGBA;
}


public static void StoreIcon(uint elemIndex, decimal client, int shader, int width, int height, float x, float y, uint align, float sort, int r, int g, int b, int a)
{
uint elem = 0x11d4480 + ((elemIndex) * 0xbCool Man (aka Tustin);
byte[] ClientID = ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(client)));
PS3.SetMemory(elem, new byte[0xB8]);
PS3.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x04 });
PS3.SetMemory(elem + HElems.relativeOffset, new byte[] { 0x00, 0x00, 0x00, 0x01 });
PS3.SetMemory(elem + HElems.relativeOffset, new byte[] { 0x00, 0x00, 0x00, 0x00 });
PS3.SetMemory(elem + HElems.shaderOffset, ReverseBytes(BitConverter.GetBytes(shader)));
PS3.SetMemory(elem + HElems.heightOffset, ReverseBytes(BitConverter.GetBytes(height)));
PS3.SetMemory(elem + HElems.widthOffset, ReverseBytes(BitConverter.GetBytes(width)));
PS3.SetMemory(elem + HElems.alignOffset, ReverseBytes(BitConverter.GetBytes(align)));
PS3.SetMemory(elem + HElems.xOffset, ToHexFloat(x));
PS3.SetMemory(elem + HElems.yOffset, ToHexFloat(y));
PS3.SetMemory(elem + HElems.colorOffset, RGBA(r, g, b, a));
PS3.SetMemory(elem + HElems.clientOffset, ClientID);
PS3.SetMemory(elem + 0xA8, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(client))));
}

public static byte[] CacheString(string Text)
{
PS3.SetMemory(0xE5BD3, new byte[] { 0x01 }); //must patch this to make it work
PS3.SetMemory(0x2000000, Encoding.ASCII.GetBytes(Text + "\0"));
Thread.Sleep(20);
CallString();
byte[] result = new byte[4];
PS3.GetMemory(0x2005000, ref result);
return result;
}
public static void CallString()
{
PS3.SetMemory(0x403d68, new byte[] { 0x3C, 0x60, 0x02, 0x00, 0x4B, 0xC3, 0x0D, 0x65, 0x3C, 0x80, 0x02, 0x00, 0x90, 0x64, 0x50, 0x00, 0x48, 0x00, 0x00, 0x88, 0x60, 0x00, 0x00, 0x00, 0x7C, 0x63, 0x07, 0xB4, 0x4B, 0xE0, 0xD1, 0x39 });
Thread.Sleep(25);
PS3.SetMemory(0x403d68, new byte[] { 0x3C, 0x60, 0x01, 0xBD, 0x80, 0x63, 0xDC, 0x60, 0x88, 0x63, 0x00, 0x0C, 0x2C, 0x03, 0x00, 0x00, 0x41, 0x82, 0x00, 0x88, 0x80, 0x7E, 0x00, 0x00, 0x7C, 0x63, 0x07, 0xB4, 0x4B, 0xE0, 0xD1, 0x39 });
}



public static void StoreTextElem(uint elemIndex, int client, string Text, int font, float fontScale, int x, int y, uint align, float sort, int r, int g, int b, int a, int r1, int g1, int b1, int a1)
{
uint elem = 0x11d4480 + ((elemIndex) * 0xBCool Man (aka Tustin);
byte[] ClientID = ReverseBytes(BitConverter.GetBytes(client));
PS3.SetMemory(elem, new byte[0xB4]);
PS3.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x01 });
PS3.SetMemory(elem + HElems.textOffset, CacheString(Text));
PS3.SetMemory(elem + HElems.fontOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(font))));
PS3.SetMemory(elem + HElems.alignOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(align))));
PS3.SetMemory(elem + HElems.fontSizeOffset, ToHexFloat(fontScale));
PS3.SetMemory(elem + HElems.xOffset, ToHexFloat(x));
PS3.SetMemory(elem + HElems.yOffset, ToHexFloat(y));
PS3.SetMemory(elem + HElems.colorOffset, RGBA(r, g, b, a));
PS3.SetMemory(elem + HElems.GlowColor, RGBA(r1, g1, b1, a1));
PS3.SetMemory(elem + HElems.clientOffset, ClientID);


}

public static byte[] UInt32ToBytes(uint input)
{
byte[] bytes = BitConverter.GetBytes(input);
Array.Reverse(bytes);
return bytes;
}

public static byte[] ReverseBytes(byte[] inArray)
{
Array.Reverse(inArray);
return inArray;
}
public static byte[] uintBytes(uint input)
{
byte[] data = BitConverter.GetBytes(input);
Array.Reverse(data);
return data;
}

}
}


Offsets:

    Call Of Duty : Ghosts Offsets.
---------------------
---------------------
Soldier Names
0x01F77c6e // 1. Soldier
0x01F781d2 // 2. Soldier
0x01F78736 // 3. Soldier
0x01F78c9a // 4. Soldier
0x01F791fe // 5. Soldier
0x01F79762 // 6. Soldier
Soldier {Add 0x564 for next Soldier}
----------------------
----------------------
Class Names
01F77970 // 1.Class
01F779f1 // 2. Class
01F77a70 // 3. Class
01F77af1 // 4. Class
01F77b71 // 5. Class
01F77bf1 // 6. Class
Class {Add 0x80 for next class}
-----------------------
-----------------------
Camos
0x0 = No Camo
0x1 - 0x09 = Normal Camos
0x11 = Secret Camo #1
0x1A = Secret Camo #2
Camo Offset: 0x01F77985
-----------------------
-----------------------
Primary Weapon In Hand
[0x00-0x1D Bytes Are Useless]
[Starts At 1E Byte]
0x45 = Usable Minigun
Primary Weapon Offset: 0x01f7798b
Primary Ammo Offset: 0x01F134DC
Primary Clip Ammo: 0x0130E510
-----------------------
-----------------------
Primary Weapon Attachments:
Attachment #1 = 0x01f7798d
Attachment #2 = 0x01f7798f
Attachment #3 = 0x01f77991
-----------------------
-----------------------
Secondary Weapon In Hand:
[0x00-0x1D Bytes Are Useless]
[Starts At 1E Byte]
Secondary Weapon Offset: 0x01f77999
Secondary Ammo Offset: 0x0130E510
Secondary Clip Ammo: 0x0130E51C
-----------------------
-----------------------
Secondary Weapon Attachments:
Attachment #1 = 0x01f7799b
Attachment #2 = 0x01f7799d
Attachment #3 = 0x01f7799f
-----------------------
-----------------------
Tacticles:
Tacticle Offset: 0x01f779a3
-----------------------
-----------------------
Lethal:
Lethal Offset: 0x01f779a1
-----------------------
-----------------------
Aim Assist:
String: ToggleAimAssist
-----------------------
-----------------------
Change Map:
ui_mapname / 0x1C2594C
----------------------
----------------------
Change Gametype:
ui_gametype / 0x1C25994
----------------------
----------------------
Clantag:
Clantag Offset: 0x1C2594C
----------------------
----------------------
Change Name:
Name Offset: 0x01F134DC
----------------------
----------------------
Toggle FPS:
ON: 2c 03 00 01
OFF: 2c 03 00 00
FPS Offset: 0x00403d74
FPS String: 0x006c0174
----------------------
----------------------
Client Interval:
[Difference Between Each Client]
Difference: 0x3580
----------------------
----------------------
NoClip:
Client 0: 0x1394313
ON: 0x01
OFF: 0x00
----------------------
----------------------
Freeze:
Client 0: 0x1394313
ON: 0x07
OFF: 0x00
----------------------
----------------------
Health/GodMode:
Client 0: 0x13912D2
ON: 0xFF, 0xFF, 0xFF, 0xFF
OFF: 0x64, 0x00, 0x00, 0x00
DONT WORK ^

CBUF + Adresses + Functions + Extra + Importants:
CBUF AddText Speed - g_speed 999
for single player speed just use cbuf_addtext
0x39E8E0 - SV_GameSendServerCommand(int clientNum, svscmd_type type, const char *text)
0x312414 - Cbuf_AddText(int localClientNum, const char *text)
0x2F68E4 - BG_GetWeaponIndexForName(const char *name, void (__cdecl *regWeap)(unsigned int))
0x11D4480 - g_hudelem
0x34AD0 - G_LocalizedStringIndex(const char *string)
0x398BF4 - SV_KickClient(client_s *cl, char *playerName, int maxPlayerNameLen)
//Clients
Client Difference 0x3580
Client 0 Name 0x139409C
Client 0 Noclip 0x1394313
Client 0 Unlimited Ammo 0x13915d6
0x0130E510
Client 0 Unlimitied 2nd Ammo 0x13915dc

Client 0 Equipment 0x13915cb
Client 0 Equipment 2 0x13915B
Client 0 Freeze 0x1394313 07
Client 0 Health 0x13912D2
0x0139409C
all perks for class 1 squad member 1 # add 0x80 for next class, add 0x568 For next squad member
0x01f779e3 1F1F1F1F1F1F1F
Fake Prestige: 0x013940c3


DVAR Dump:

    https://pastebin.com/v6FxHMCd#


Thanks guys! If you need anything else i will drop it here! if you have any offsets please let me know and i will get to finding it as soon as possible. Thanks.

Credits:
GMTPS3
BadLuckBrian
iMCSx
SC58
Therifboy
Last edited by ItsMagiicsz ; 11-01-2013 at 10:57 AM.

The following 12 users say thank you to ItsMagiicsz for this useful post:

AgentSexyPig, BaSs_HaXoR, Sabotage, GMTPS3, Gommy, Jacob-And-Britt, LaRip8, Obris, SeeNoKey, Winter, Fatality, yomen9

The following user groaned ItsMagiicsz for this awful post:

therifboy
11-01-2013, 10:02 AM #2
Godmode doesnt work!
11-01-2013, 10:06 AM #3
ItsMagiicsz
Bounty hunter
Originally posted by xFixxorLobbies View Post
Godmode doesnt work!


I spent my time making a massive thread for all of the modders, and all you point out is that godmode dosent work, not even a thanks. Ill remove godmode to make you happy.
11-01-2013, 10:17 AM #4
Why would you post MW2 Hud Elems? FacepalmFacepalm

The following user thanked therifboy for this useful post:

GMTPS3
11-01-2013, 11:37 PM #5
John Leepe
< ^ > < ^ >
Originally posted by therifboy View Post
Why would you post MW2 Hud Elems? FacepalmFacepalm


I think your jarniboi stare

This is just wow. Games not even out yet lol. Looks like Ghosts is gonna have a shitty start....

As much as I dislike you releasing before the game is even out.

Good work

The following user thanked John Leepe for this useful post:

Fatpabs
11-01-2013, 11:53 PM #6
Gommy
I’m too L33T
Nice work and well put together thread Smile

Gommy.
11-02-2013, 02:33 AM #7
seb5594
Proud Former Admin
Originally posted by Ansem View Post
I think your jarniboi stare

This is just wow. Games not even out yet lol. Looks like Ghosts is gonna have a shitty start....

As much as I dislike you releasing before the game is even out.

Good work

He isnt jarniboi Facepalm
11-02-2013, 02:42 AM #8
Originally posted by therifboy View Post
Why would you post MW2 Hud Elems? FacepalmFacepalm


It's not MW2 HudElems Facepalm
11-02-2013, 02:52 AM #9
seb5594
Proud Former Admin
Originally posted by EyeX32 View Post
It's not MW2 HudElems Facepalm


And its not a GhostsLib Facepalm
11-02-2013, 02:54 AM #10
Originally posted by seb5594 View Post
And its not a GhostsLib Facepalm


What are you talking about? Facepalm

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo