Seeing as I didnt see this anywhere else I thought I would release it
G_LocalizedStringIndex PPC Function was updated by me
Credits to BLB and Lollo and Shark
public class Offsets
{
public static uint
FPS = 0x3979DC,
G_LocalizedStringIndex = 0x275D24,
LevelTime = 0x1603198,
G_Client = 0x0177E928,
G_HudElems = 0x15DB500,
G_MaterialIndex = 0x275EE0, //Wrong
HudelemSize = 0x88,
}
public class HudElements
{
public class HElems
{
public static uint ElemIndex = Offsets.G_HudElems;
public static uint HudsLength = 0x88;
public static uint abilityFlag = 0x84;
public static uint alignOrg = 0x72;
public static uint alignScreen = 0x73;
public static uint color = 0x18;
public static uint duration = 0x38;
public static uint fadeStartTime = 0x20;
public static uint fadeTime = 0x54;
public static uint flag2 = 0x7A;
public static uint flags = 0x4C;
public static uint Font = 0x70;
public static uint FontSize = 0xC;
public static uint fontScaleStartTime = 0x14;
public static uint fontScaleTime = 0x52;
public static uint fromAlignOrg = 0x76;
public static uint fromAlignScreen = 0x77;
public static uint fromColor = 0x1C;
public static uint fromFontScale = 0x10;
public static uint fromHeight = 0x5e;
public static uint fromWidth = 0x5c;
public static uint fromX = 0x28;
public static uint fromY = 0x2C;
public static uint fxBirthTime = 0x48;
public static uint fxDecayDuration = 0x6A;
public static uint fxDecayStartTime = 0x68;
public static uint fxLetterTime = 0x66;
public static uint fxRedactDecayDuration = 110;
public static uint fxRedactDecayStartTime = 0x6c;
public static uint glowColor = 0x44;
public static uint Height = 0x5A;
public static uint label = 0x56;
public static uint materialIndex = 0x71;
public static uint moveStartTime = 0x30;
public static uint moveTime = 0x62;
public static uint offscreenMaterialIdx = 0x75;
public static uint clientOffset = 0x7c;
public static uint scaleStartTime = 0x24;
public static uint scaleTime = 0x60;
public static uint sort = 0x40;
public static uint soundID = 0x78;
public static uint targetEntNum = 80;
public static uint team = 0x80;
public static uint text = 0x62;
public static uint time = 0x34;
public static uint type = 0x6D;
public static uint ui3dWindow = 0x4f;
public static uint value = 60;
public static uint Width = 0x58;
public static uint X = 0x00;
public static uint Y = 0x04;
public static uint Z = 0x08;
}
public static byte[] G_LocalizedStringIndex(string Text)
{
byte[] clean = new byte[250];
PS3.SetMemory(0x2000000, clean);
PS3.SetMemory(0x2000000, Encoding.ASCII.GetBytes(Text + "\0"));
byte[] Patch = new byte[] { 0x48, 0x44, 0xBF, 0x2D, 0x3C, 0x60, 0x00, 0xD8, 0x80, 0x63, 0xBD, 0x70, 0x2C, 0x03, 0x00, 0x00, 0x40, 0x82, 0x00, 0x7C, 0x3C, 0x60, 0x02, 0x00, 0x30, 0x63, 0x00, 0x00, 0x4B, 0xED, 0xE3, 0x2D, 0x3C, 0x80, 0x02, 0x00, 0x90, 0x64, 0x50, 0x00, 0x48, 0x00, 0x00, 0x68 };
byte[] Unpatch = new byte[] { 0x48, 0x44, 0xBF, 0x2D, 0x3C, 0x60, 0x00, 0xD8, 0x80, 0x63, 0xBD, 0x70, 0x2C, 0x03, 0x00, 0x00, 0x41, 0x82, 0x00, 0x7C, 0x3C, 0x60, 0x00, 0x39, 0x38, 0x80, 0x00, 0x00, 0x3B, 0xE3, 0x73, 0xE4, 0x63, 0x43, 0x00, 0x00, 0xC3, 0xFF, 0x00, 0x08, 0xFC, 0x20, 0xF8, 0x90 };
PS3.SetMemory(Offsets.FPS, Patch);
Thread.Sleep(30);
PS3.SetMemory(Offsets.FPS, Unpatch);
byte[] GetX = new byte[4];
PS3.GetMemory(0x2005000, GetX);
return GetX;
}
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;
}
private static uint HudElem_Alloc()
{
for (int i = 30; i < 0x400; i++)
{
uint offset = Offsets.G_HudElems + (uint)(i) * 0x88;
if (PS3.Extension.ReadInt16(offset + 0x70) == 0)
{
PS3.SetMemory(offset, new byte[0x88]);
return offset;
}
}
return 0;
}
public static uint SetShader(int clientIndex, object Material, short width, short height, float x, float y, int r = 255, int g = 255, int b = 255, int a = 255)
{
uint elem = HudElem_Alloc();
PS3.Extension.WriteInt32(elem + HElems.type, 8);//8 = Icon
PS3.Extension.WriteInt32(elem + HElems.materialIndex, (int)Material);
PS3.Extension.WriteInt16(elem + HElems.Height, height);
PS3.Extension.WriteInt16(elem + HElems.Width, width);
PS3.Extension.WriteFloat(elem + HElems.X, x);
PS3.Extension.WriteFloat(elem + HElems.Y, y);
PS3.Extension.WriteInt32(elem + HElems.clientOffset, clientIndex);
PS3.SetMemory(elem + 0x79, new byte[] { 0xFF });
PS3.SetMemory(elem + HElems.color, RGBA(r, g, b, a));
return elem;
}
public static uint SetText(int clientIndex, string Text, short Font, double FontSize, float x, float y, int r = 255, int g = 255, int b = 255, int a = 255, int glowr = 255, int glowg = 255, int glowb = 255, int glowa = 0)
{
uint elem = HudElem_Alloc();
PS3.Extension.WriteInt32(elem + HElems.type, 1);//1 = Text
PS3.Extension.WriteFloat(elem + HElems.FontSize, (float)FontSize);
PS3.Extension.WriteInt16(elem + HElems.Font, Font);
PS3.Extension.WriteFloat(elem + HElems.X, x);
PS3.Extension.WriteFloat(elem + HElems.Y, y);
PS3.Extension.WriteInt32(elem + HElems.clientOffset, clientIndex);
PS3.SetMemory(elem + HElems.text, G_LocalizedStringIndex(Text));
PS3.SetMemory(elem + HElems.color, RGBA(r, g, b, a));
PS3.SetMemory(elem + HElems.glowColor, RGBA(glowr, glowg, glowb, glowa));
PS3.SetMemory(elem + 0x79, new byte[] { 0xFF });
PS3.SetMemory(elem + HElems.Font, new byte[] { 0x01 });
return elem;
}
public static void DestroyElement(uint Element)
{
PS3.SetMemory(Element, new byte[HElems.HudsLength]);
}
}
-TacticalLobbies
G_LocalizedStringIndex PPC Function was updated by me
Credits to BLB and Lollo and Shark
public class Offsets
{
public static uint
FPS = 0x3979DC,
G_LocalizedStringIndex = 0x275D24,
LevelTime = 0x1603198,
G_Client = 0x0177E928,
G_HudElems = 0x15DB500,
G_MaterialIndex = 0x275EE0, //Wrong
HudelemSize = 0x88,
}
public class HudElements
{
public class HElems
{
public static uint ElemIndex = Offsets.G_HudElems;
public static uint HudsLength = 0x88;
public static uint abilityFlag = 0x84;
public static uint alignOrg = 0x72;
public static uint alignScreen = 0x73;
public static uint color = 0x18;
public static uint duration = 0x38;
public static uint fadeStartTime = 0x20;
public static uint fadeTime = 0x54;
public static uint flag2 = 0x7A;
public static uint flags = 0x4C;
public static uint Font = 0x70;
public static uint FontSize = 0xC;
public static uint fontScaleStartTime = 0x14;
public static uint fontScaleTime = 0x52;
public static uint fromAlignOrg = 0x76;
public static uint fromAlignScreen = 0x77;
public static uint fromColor = 0x1C;
public static uint fromFontScale = 0x10;
public static uint fromHeight = 0x5e;
public static uint fromWidth = 0x5c;
public static uint fromX = 0x28;
public static uint fromY = 0x2C;
public static uint fxBirthTime = 0x48;
public static uint fxDecayDuration = 0x6A;
public static uint fxDecayStartTime = 0x68;
public static uint fxLetterTime = 0x66;
public static uint fxRedactDecayDuration = 110;
public static uint fxRedactDecayStartTime = 0x6c;
public static uint glowColor = 0x44;
public static uint Height = 0x5A;
public static uint label = 0x56;
public static uint materialIndex = 0x71;
public static uint moveStartTime = 0x30;
public static uint moveTime = 0x62;
public static uint offscreenMaterialIdx = 0x75;
public static uint clientOffset = 0x7c;
public static uint scaleStartTime = 0x24;
public static uint scaleTime = 0x60;
public static uint sort = 0x40;
public static uint soundID = 0x78;
public static uint targetEntNum = 80;
public static uint team = 0x80;
public static uint text = 0x62;
public static uint time = 0x34;
public static uint type = 0x6D;
public static uint ui3dWindow = 0x4f;
public static uint value = 60;
public static uint Width = 0x58;
public static uint X = 0x00;
public static uint Y = 0x04;
public static uint Z = 0x08;
}
public static byte[] G_LocalizedStringIndex(string Text)
{
byte[] clean = new byte[250];
PS3.SetMemory(0x2000000, clean);
PS3.SetMemory(0x2000000, Encoding.ASCII.GetBytes(Text + "\0"));
byte[] Patch = new byte[] { 0x48, 0x44, 0xBF, 0x2D, 0x3C, 0x60, 0x00, 0xD8, 0x80, 0x63, 0xBD, 0x70, 0x2C, 0x03, 0x00, 0x00, 0x40, 0x82, 0x00, 0x7C, 0x3C, 0x60, 0x02, 0x00, 0x30, 0x63, 0x00, 0x00, 0x4B, 0xED, 0xE3, 0x2D, 0x3C, 0x80, 0x02, 0x00, 0x90, 0x64, 0x50, 0x00, 0x48, 0x00, 0x00, 0x68 };
byte[] Unpatch = new byte[] { 0x48, 0x44, 0xBF, 0x2D, 0x3C, 0x60, 0x00, 0xD8, 0x80, 0x63, 0xBD, 0x70, 0x2C, 0x03, 0x00, 0x00, 0x41, 0x82, 0x00, 0x7C, 0x3C, 0x60, 0x00, 0x39, 0x38, 0x80, 0x00, 0x00, 0x3B, 0xE3, 0x73, 0xE4, 0x63, 0x43, 0x00, 0x00, 0xC3, 0xFF, 0x00, 0x08, 0xFC, 0x20, 0xF8, 0x90 };
PS3.SetMemory(Offsets.FPS, Patch);
Thread.Sleep(30);
PS3.SetMemory(Offsets.FPS, Unpatch);
byte[] GetX = new byte[4];
PS3.GetMemory(0x2005000, GetX);
return GetX;
}
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;
}
private static uint HudElem_Alloc()
{
for (int i = 30; i < 0x400; i++)
{
uint offset = Offsets.G_HudElems + (uint)(i) * 0x88;
if (PS3.Extension.ReadInt16(offset + 0x70) == 0)
{
PS3.SetMemory(offset, new byte[0x88]);
return offset;
}
}
return 0;
}
public static uint SetShader(int clientIndex, object Material, short width, short height, float x, float y, int r = 255, int g = 255, int b = 255, int a = 255)
{
uint elem = HudElem_Alloc();
PS3.Extension.WriteInt32(elem + HElems.type, 8);//8 = Icon
PS3.Extension.WriteInt32(elem + HElems.materialIndex, (int)Material);
PS3.Extension.WriteInt16(elem + HElems.Height, height);
PS3.Extension.WriteInt16(elem + HElems.Width, width);
PS3.Extension.WriteFloat(elem + HElems.X, x);
PS3.Extension.WriteFloat(elem + HElems.Y, y);
PS3.Extension.WriteInt32(elem + HElems.clientOffset, clientIndex);
PS3.SetMemory(elem + 0x79, new byte[] { 0xFF });
PS3.SetMemory(elem + HElems.color, RGBA(r, g, b, a));
return elem;
}
public static uint SetText(int clientIndex, string Text, short Font, double FontSize, float x, float y, int r = 255, int g = 255, int b = 255, int a = 255, int glowr = 255, int glowg = 255, int glowb = 255, int glowa = 0)
{
uint elem = HudElem_Alloc();
PS3.Extension.WriteInt32(elem + HElems.type, 1);//1 = Text
PS3.Extension.WriteFloat(elem + HElems.FontSize, (float)FontSize);
PS3.Extension.WriteInt16(elem + HElems.Font, Font);
PS3.Extension.WriteFloat(elem + HElems.X, x);
PS3.Extension.WriteFloat(elem + HElems.Y, y);
PS3.Extension.WriteInt32(elem + HElems.clientOffset, clientIndex);
PS3.SetMemory(elem + HElems.text, G_LocalizedStringIndex(Text));
PS3.SetMemory(elem + HElems.color, RGBA(r, g, b, a));
PS3.SetMemory(elem + HElems.glowColor, RGBA(glowr, glowg, glowb, glowa));
PS3.SetMemory(elem + 0x79, new byte[] { 0xFF });
PS3.SetMemory(elem + HElems.Font, new byte[] { 0x01 });
return elem;
}
public static void DestroyElement(uint Element)
{
PS3.SetMemory(Element, new byte[HElems.HudsLength]);
}
}
-TacticalLobbies