[FONT=Comic Sans MS][SPOILER] public static int Huds_Speed = 100;
public static class HElems
{
public static uint
ELEM = 0xD87888,
type = 0x00,
xOffset = 0x04,
yOffset = 0x08,
zOffset = 0x0C,
targetEntNum = 0x10,
fontScale = 0x14,
fromFontScale = 0x18,
fontScaleStartTime = 0x1C,
fontScaleTime = 0x20,
font = 0x24,
alignOrg = 0x28,
alignScreen = 0x2C,
color = 0x30,
fromColor = 0x34,
fadeStartTime = 0x38,
fadeTime = 0x3C,
label = 0x40,
text = 0x42,
width = 0x44,
height = 0x48,
materialIndex = 0x4C,
fromWidth = 0x50,
fromHeight = 0x54,
scaleStartTime = 0x58,
scaleTime = 0x5C,
fromX = 0x60,
fromY = 0x64,
fromAlignOrg = 0x68,
fromAlignScreen = 0x6C,
moveStartTime = 0x70,
moveTime = 0x74,
time = 0x78,
duration = 0x7C,
value = 0x80,
sort = 0x88,
glowColor = 0x8C,
fxBirthTime = 0x90,
fxLetterTime = 0x94,
fxDecayStartTime = 0x98,
fxDecayDuration = 0x9C,
soundID = 0xA0,
flags = 0xA4,
clientOffset = 0xA8;
}
public static int getLevelTime()
{
return PS3.Extension.ReadInt32(0x00DB5F44);
}
public static void MoveShaderXY(uint index, float X, float Y)
{
PS3.Extension.WriteFloat(0xD87888 + (index * 0xB
+ Hud.HElems.xOffset, X);
PS3.Extension.WriteFloat(0xD87888 + (index * 0xB
+ Hud.HElems.yOffset, Y);
}
public static void MoveShaderY(uint index, float Y)
{
PS3.Extension.WriteFloat(0xD87888 + (index * 0xB
+ Hud.HElems.yOffset, Y);
}
public static void ChangeWidth(int elemIndex, short width)
{
uint elem = 0xD87888 + ((Convert.ToUInt32(elemIndex)) * 0xB
;
PS3.Extension.WriteInt16(elem + Hud.HElems.width, width);
}
public static void SpinText(uint Index, int Radius, int X, int Y)
{
int cx = X;
int cy = Y;
int rad = Radius;
int i = 0;
for (; ; )
{
double xx = cx + Math.Sin(i) * rad;
double yy = cy + Math.Cos(i) * rad;
Hud.MoveShaderXY(Index, (int)xx, (int)yy);
Thread.Sleep(100);
i++;
}
}
public static void ActivateIndex(int index, int type)
{
byte[] Typ = BitConverter.GetBytes(type);
Array.Reverse(Typ);
PS3.SetMemory(Hud.HElems.ELEM + 0xb8 * (uint)index, Typ);
}
public static void ZigZagText(uint elemIndex, short Speed)
{
uint Elem = 0xD87888 + (elemIndex) * 0xB8;
float i = 0;
PS3.SetMemory(Elem + HElems.xOffset, PS3.Extension.ToHexFloat(-400));
for (; ; )
{
float X = PS3.Extension.ReadFloat(Elem + HElems.xOffset);
if (i == 480)
{
break;
}
if (X == (float)-400)
{
float y = i += 120;
float x = 800;
MoveOverTime(elemIndex, Speed, x, y);
}
if (X == (float)800)
{
float y = i += 120;
float x = -400;
MoveOverTime(elemIndex, Speed, x, y);
}
Thread.Sleep(Speed);
}
}
public static uint MoveOverTime(uint elemIndex, short Time, float X, float Y)
{
uint Elem = 0xD87888 + (elemIndex) * 0xB8;
PS3.Extension.WriteFloat(Elem + Hud.HElems.fromX, PS3.Extension.ReadFloat(Elem + Hud.HElems.xOffset));
PS3.Extension.WriteFloat(Elem + Hud.HElems.fromY, PS3.Extension.ReadFloat(Elem + Hud.HElems.yOffset));
PS3.Extension.WriteInt32(Elem + Hud.HElems.moveTime, Time);
PS3.Extension.WriteInt32(Elem + Hud.HElems.moveStartTime, getLevelTime());
PS3.Extension.WriteFloat(Elem + Hud.HElems.xOffset, X);
PS3.Extension.WriteFloat(Elem + Hud.HElems.yOffset, Y);
return Elem;
}
public static void ChangeFontScaleOverTime(uint elemIndex, short Time, double OldFont, double NewFont)
{
uint Elem = 0xD87888 + (elemIndex) * 0xB8;
PS3.Extension.WriteFloat(Elem + HElems.fromFontScale, (float)OldFont);//fromFontScale
PS3.Extension.WriteUInt32(Elem + HElems.fontScaleStartTime, (UInt32)getLevelTime());//fontScaleStartTime
PS3.Extension.WriteInt32(Elem + HElems.fontScaleTime, Time);//fontScaleTime
PS3.Extension.WriteFloat(Elem + HElems.fontScale, (float)NewFont);
}
public static void ScaleOverTime(uint elemIndex, short Time, short Width, short Height)
{
uint Elem = 0xD87888 + (elemIndex) * 0xB8;
PS3.Extension.WriteInt32(Elem + HElems.fromHeight, PS3.Extension.ReadInt16(Elem + HElems.height));//From Height
PS3.Extension.WriteInt32(Elem + HElems.fromWidth, PS3.Extension.ReadInt16(Elem + HElems.width));//from Width
PS3.Extension.WriteInt32(Elem + HElems.scaleTime, Time);
PS3.Extension.WriteInt32(Elem + HElems.scaleStartTime, getLevelTime());//MoveStartTime
PS3.Extension.WriteInt16(Elem + HElems.height, Height);
PS3.Extension.WriteInt16(Elem + HElems.width, Width);
}
public static void FadeOverTime(uint elem, short Time, int R, int G, int B, int A)
{
uint Elem = 0xD87888 + (elem) * 0xB8;
byte[] RVal = PS3.GetMemory(Elem + HElems.color, 1);//Gets Current RVal
byte[] GVal = PS3.GetMemory(Elem + HElems.color + 0x01, 1);//Gets Current GVal
byte[] BVal = PS3.GetMemory(Elem + HElems.color + 0x02, 1);//Gets Current BVal
byte[] AVal = PS3.GetMemory(Elem + HElems.color + 0x03, 1);//Gets Current AVal
PS3.SetMemory(Elem + HElems.fromColor, RVal);//Sets Current RVal
PS3.SetMemory(Elem + HElems.fromColor + 0x01, GVal);//Sets Current GVal
PS3.SetMemory(Elem + HElems.fromColor + 0x02, BVal);//Sets Current BVal
PS3.SetMemory(Elem + HElems.fromColor + 0x03, AVal);//Sets Current AVal
PS3.Extension.WriteUInt32(Elem + HElems.fadeStartTime, (UInt32)getLevelTime());//Fade Start Time
PS3.Extension.WriteInt32(Elem + HElems.fadeTime, Time);//Fade Time
PS3.SetMemory(Elem + HElems.color, RGBA(R, G, B, A));//Set New Colors
}
public static void FadeAlphaOverTime(uint elemIndex, short Time, int OldAlpha, int NewAlpha)
{
uint Elem = 0xD87888 + (elemIndex) * 0xB8;
byte[] OldAVal = BitConverter.GetBytes(Convert.ToInt32(OldAlpha));//Convert Bytes To Int
PS3.SetMemory(Elem + 0x37, OldAVal);//Set Old Alpha
PS3.Extension.WriteUInt32(Elem + Hud.HElems.fadeStartTime, (UInt32)getLevelTime());//Fade Start Time
PS3.Extension.WriteInt32(Elem + Hud.HElems.fadeTime, Time);//Fade Time
byte[] NewAVal = BitConverter.GetBytes(Convert.ToInt32(NewAlpha));//Convert Bytes To Int
PS3.SetMemory(Elem + 0x33, NewAVal);//Set New Alpha
}
public static void doTypeWriterCustom(uint Index, ushort fxLetterTime, ushort fxDecayStartTime, ushort fxDecayDuration)
{
uint elem = HElems.ELEM + (Index) * 0xB8;
//TypeWriter
PS3.Extension.WriteInt32(elem + HElems.fxBirthTime, getLevelTime());
PS3.Extension.WriteInt32(elem + HElems.fxLetterTime, fxLetterTime);
PS3.Extension.WriteInt32(elem + HElems.fxDecayStartTime, fxDecayStartTime);
PS3.Extension.WriteInt32(elem + HElems.fxDecayDuration, fxDecayDuration);
}
public static void doTypeWriter(uint ElemIndex, int client, string text, double fontScale, short font, Single X, Single Y, int fxLetterTime, int fxDecayStartTime, int fxDecayDuration, int r, int g, int b, int a, int r1, int b1, int g1, int a1)
{
uint elem = Hud.HElems.ELEM + ((Convert.ToUInt32(ElemIndex)) * 0xB
;
PS3.SetMemory(elem, new byte[0xB8]);
PS3.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x01 });
PS3.Extension.WriteInt16(elem + HElems.text, G_LocalizedStringIndex(text));
PS3.Extension.WriteInt16(elem + HElems.font, font);
PS3.Extension.WriteInt32(elem + HElems.clientOffset, client);// continue.
PS3.Extension.WriteInt16(elem + HElems.alignScreen, 0);
PS3.Extension.WriteInt16(elem + HElems.alignOrg, 0);
PS3.Extension.WriteFloat(elem + HElems.fontScale, (float)fontScale);
PS3.Extension.WriteFloat(elem + HElems.xOffset, X);
PS3.Extension.WriteFloat(elem + HElems.yOffset, Y);
PS3.SetMemory(elem + HElems.color, RGBA(r, g, b, a));
PS3.SetMemory(elem + HElems.glowColor, RGBA(r1, g1, b1, a1));
//Typewriter
PS3.Extension.WriteInt32(elem + HElems.fxBirthTime, getLevelTime());
PS3.Extension.WriteInt32(elem + HElems.fxLetterTime, fxLetterTime);
PS3.Extension.WriteInt32(elem + HElems.fxDecayStartTime, fxDecayStartTime);
PS3.Extension.WriteInt32(elem + HElems.fxDecayDuration, fxDecayDuration);
}
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 = 0; i < 0x400; i++)
{
uint offset = 0xD87888 + ((uint)(i * 0xB
);
if (PS3.GetMemory(offset, 4)[3] == 0)
{
PS3.SetMemory(offset + HElems.type, new byte[0xB8]);
return offset;
}
}
return 0;
}
public static void StoreIcon(int elemIndex, uint 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 = 0xD87888 + (((uint)elemIndex) * 0xB
;
PS3.SetMemory(elem, new byte[0xB8]);
PS3.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x04 });
PS3.Extension.WriteInt32(elem + HElems.materialIndex, shader);
PS3.Extension.WriteInt32(elem + HElems.clientOffset, (int)client);
PS3.Extension.WriteInt32(elem + HElems.width, width);
PS3.Extension.WriteInt32(elem + HElems.height, height);
PS3.Extension.WriteInt32(elem + HElems.alignScreen, 0);
PS3.Extension.WriteInt32(elem + HElems.alignOrg, 0);
PS3.Extension.WriteFloat(elem + Hud.HElems.xOffset, x);
PS3.Extension.WriteFloat(elem + Hud.HElems.yOffset, y);
PS3.SetMemory(elem + HElems.color, RGBA(r, g, b, a));
}
public static void ChangeAlpha(int index, int r, int g, int b, int alpha)
{
uint elem = 0xD87888 + ((Convert.ToUInt32(index)) * 0xB
;
PS3.SetMemory(elem + Hud.HElems.color, Hud.RGBA(r, g, b, alpha));
}
public static void ChangeTextSub(int index, string text)
{
uint elem = 0xD87888 + ((Convert.ToUInt32(index)) * 0xB
;
PS3.Extension.WriteInt16(elem + HElems.text, G_LocalizedStringIndex(text));
}
public static void ChangeText(int index, string text, float X)
{
uint elem = 0xD87888 + ((Convert.ToUInt32(index)) * 0xB
;
PS3.Extension.WriteFloat(elem + Hud.HElems.xOffset, X);
PS3.Extension.WriteInt16(elem + HElems.text, G_LocalizedStringIndex(text));
}
public static void Enable_Huds()
{
PS3.SetMemory(0x2100000, new byte[32]);
PS3.SetMemory(0x2106000, new byte[32]);
PS3.SetMemory(0x36B260, new byte[] { 0x3C, 0x60, 0x02, 0x10, 0x80, 0x83, 0x00, 0x00, 0x2C, 0x04, 0x00, 0x00, 0x41, 0x82, 0x00, 0x8C, 0x4B, 0xCC, 0x83, 0x11, 0x3C, 0x80, 0x02, 0x10, 0x90, 0x64, 0x60, 0x00, 0x38, 0x60, 0x00, 0x00, 0x90, 0x64, 0x00, 0x00, 0x48, 0x00, 0x00, 0x74 });
PS3.SetMemory(0x335C7, new byte[] { 0x01 });
}
#region RPC
private static uint function_address = 0x0049F3D0;
public static int CallFunction(uint func_address, params object[] parameters)
{
int length = parameters.Length;
uint num2 = 0;
for (uint i = 0; i < length; i++)
{
if (parameters[i] is int)
{
byte[] array = BitConverter.GetBytes((int)parameters[i]);
Array.Reverse(array);
PS3.SetMemory(0x10050000 + ((i + num2) * 4), array);
}
else if (parameters[i] is uint)
{
byte[] buffer2 = BitConverter.GetBytes((uint)parameters[i]);
Array.Reverse(buffer2);
PS3.SetMemory(0x10050000 + ((i + num2) * 4), buffer2);
}
else if (parameters[i] is string)
{
byte[] buffer3 = Encoding.UTF8.GetBytes(Convert.ToString(parameters[i]) + "\0");
PS3.SetMemory(0x10050054 + (i * 0x400), buffer3);
uint num4 = 0x10050054 + (i * 0x400);
byte[] buffer4 = BitConverter.GetBytes(num4);
Array.Reverse(buffer4);
PS3.SetMemory(0x10050000 + ((i + num2) * 4), buffer4);
}
else if (parameters[i] is float)
{
num2++;
byte[] buffer5 = BitConverter.GetBytes((float)parameters[i]);
Array.Reverse(buffer5);
PS3.SetMemory(0x10050024 + ((num2 - 1) * 4), buffer5);
}
}
byte[] bytes = BitConverter.GetBytes(func_address);
Array.Reverse(bytes);
PS3.SetMemory(0x1005004c, bytes);
System.Threading.Thread.Sleep(20);
byte[] memory = new byte[4];
PS3.GetMemoryR(0x10050050, ref memory);
Array.Reverse(memory);
return BitConverter.ToInt32(memory, 0);
}
public static void WritePPC()
{
PS3.SetMemory(function_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
System.Threading.Thread.Sleep(20);
byte[] memory = new byte[] {
0x7c, 8, 2, 0xa6, 0xf8, 1, 0, 0x80, 60, 0x60, 0x10, 5, 0x81, 0x83, 0, 0x4c,
0x2c, 12, 0, 0, 0x41, 130, 0, 100, 0x80, 0x83, 0, 4, 0x80, 0xa3, 0, 8,
0x80, 0xc3, 0, 12, 0x80, 0xe3, 0, 0x10, 0x81, 3, 0, 20, 0x81, 0x23, 0, 0x18,
0x81, 0x43, 0, 0x1c, 0x81, 0x63, 0, 0x20, 0xc0, 0x23, 0, 0x24, 0xc0, 0x43, 0, 40,
0xc0, 0x63, 0, 0x2c, 0xc0, 0x83, 0, 0x30, 0xc0, 0xa3, 0, 0x34, 0xc0, 0xc3, 0, 0x38,
0xc0, 0xe3, 0, 60, 0xc1, 3, 0, 0x40, 0xc1, 0x23, 0, 0x48, 0x80, 0x63, 0, 0,
0x7d, 0x89, 3, 0xa6, 0x4e, 0x80, 4, 0x21, 60, 0x80, 0x10, 5, 0x38, 160, 0, 0,
0x90, 0xa4, 0, 0x4c, 0x90, 100, 0, 80, 0xe8, 1, 0, 0x80, 0x7c, 8, 3, 0xa6,
0x38, 0x21, 0, 0x70, 0x4e, 0x80, 0, 0x20
};
PS3.SetMemory(function_address + 4, memory);
PS3.SetMemory(0x10050000, new byte[0x2854]);
PS3.SetMemory(function_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
}
#endregion
public static short G_LocalizedStringIndex(string Text)
{
return (short)CallFunction(0x00033580, Text);
}
public static void SetGlow(uint elemIndex, int r, int g, int b, int a)
{
uint elem = HElems.ELEM + ((elemIndex) * 0xB
;
PS3.SetMemory(elem + HElems.glowColor, RGBA(r, g, b, a));
}
public static void SetGlowText(uint elemIndex, int client, string Text, short font, double 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 = HElems.ELEM + ((elemIndex) * 0xB
;
PS3.SetMemory(elem, new byte[0xB8]);
PS3.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x01 });
PS3.Extension.WriteInt16(elem + HElems.text, G_LocalizedStringIndex(Text));
PS3.Extension.WriteInt16(elem + HElems.font, font);
PS3.Extension.WriteInt16(elem + HElems.alignScreen, 0);
PS3.Extension.WriteInt16(elem + HElems.alignOrg, 0);
PS3.Extension.WriteFloat(elem + HElems.fontScale, (float)fontScale);
PS3.Extension.WriteFloat(elem + HElems.xOffset,x);
PS3.Extension.WriteFloat(elem + HElems.yOffset, y);
PS3.SetMemory(elem + HElems.color, RGBA(r, g, b, a));
PS3.SetMemory(elem + HElems.glowColor, RGBA(r1, g1, b1, a1));
PS3.Extension.WriteInt32(elem + HElems.clientOffset, client);
}
public static void StoreTextElem(int elemIndex, int client, string Text, short font, double fontScale, float x, float y, uint align, float sort, int r, int g, int b, int a)
{
uint elem = Hud.HElems.ELEM + ((Convert.ToUInt32(elemIndex)) * 0xB
;
PS3.SetMemory(elem, new byte[0xB8]);
PS3.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x01 });
PS3.Extension.WriteInt16(elem + HElems.text, G_LocalizedStringIndex(Text));
PS3.Extension.WriteInt32(elem + HElems.font, font);
PS3.Extension.WriteInt32(elem + HElems.clientOffset, client);
PS3.Extension.WriteFloat(elem + HElems.fontScale, (float)fontScale);
PS3.Extension.WriteFloat(elem + HElems.xOffset, x);
PS3.Extension.WriteFloat(elem + HElems.yOffset, y);
PS3.SetMemory(elem + HElems.color, RGBA(r, g, b, a));
}

+ Hud.HElems.xOffset, X);
+ Hud.HElems.yOffset, Y);
+ Hud.HElems.yOffset, Y);
;
;
);
;
;
;
;
;
;
;
+ Hud.HElems.xOffset, X);
+ Hud.HElems.yOffset, Y);
+ Hud.HElems.yOffset, Y);
;
;
);
;
;
;
;
;
;
;
.......not just put it in a spoiler
[FONT=Comic Sans MS][SPOILER] public static int Huds_Speed = 100;
public static class HElems
{
public static uint
ELEM = 0xD87888,
type = 0x00,
xOffset = 0x04,
yOffset = 0x08,
zOffset = 0x0C,
targetEntNum = 0x10,
fontScale = 0x14,
fromFontScale = 0x18,
fontScaleStartTime = 0x1C,
fontScaleTime = 0x20,
font = 0x24,
alignOrg = 0x28,
alignScreen = 0x2C,
color = 0x30,
fromColor = 0x34,
fadeStartTime = 0x38,
fadeTime = 0x3C,
label = 0x40,
text = 0x42,
width = 0x44,
height = 0x48,
materialIndex = 0x4C,
fromWidth = 0x50,
fromHeight = 0x54,
scaleStartTime = 0x58,
scaleTime = 0x5C,
fromX = 0x60,
fromY = 0x64,
fromAlignOrg = 0x68,
fromAlignScreen = 0x6C,
moveStartTime = 0x70,
moveTime = 0x74,
time = 0x78,
duration = 0x7C,
value = 0x80,
sort = 0x88,
glowColor = 0x8C,
fxBirthTime = 0x90,
fxLetterTime = 0x94,
fxDecayStartTime = 0x98,
fxDecayDuration = 0x9C,
soundID = 0xA0,
flags = 0xA4,
clientOffset = 0xA8;
}
public static int getLevelTime()
{
return PS3.Extension.ReadInt32(0x00DB5F44);
}
public static void MoveShaderXY(uint index, float X, float Y)
{
PS3.Extension.WriteFloat(0xD87888 + (index * 0xB
+ Hud.HElems.xOffset, X);
PS3.Extension.WriteFloat(0xD87888 + (index * 0xB
+ Hud.HElems.yOffset, Y);
}
public static void MoveShaderY(uint index, float Y)
{
PS3.Extension.WriteFloat(0xD87888 + (index * 0xB
+ Hud.HElems.yOffset, Y);
}
public static void ChangeWidth(int elemIndex, short width)
{
uint elem = 0xD87888 + ((Convert.ToUInt32(elemIndex)) * 0xB
;
PS3.Extension.WriteInt16(elem + Hud.HElems.width, width);
}
public static void SpinText(uint Index, int Radius, int X, int Y)
{
int cx = X;
int cy = Y;
int rad = Radius;
int i = 0;
for (; ; )
{
double xx = cx + Math.Sin(i) * rad;
double yy = cy + Math.Cos(i) * rad;
Hud.MoveShaderXY(Index, (int)xx, (int)yy);
Thread.Sleep(100);
i++;
}
}
public static void ActivateIndex(int index, int type)
{
byte[] Typ = BitConverter.GetBytes(type);
Array.Reverse(Typ);
PS3.SetMemory(Hud.HElems.ELEM + 0xb8 * (uint)index, Typ);
}
public static void ZigZagText(uint elemIndex, short Speed)
{
uint Elem = 0xD87888 + (elemIndex) * 0xB8;
float i = 0;
PS3.SetMemory(Elem + HElems.xOffset, PS3.Extension.ToHexFloat(-400));
for (; ; )
{
float X = PS3.Extension.ReadFloat(Elem + HElems.xOffset);
if (i == 480)
{
break;
}
if (X == (float)-400)
{
float y = i += 120;
float x = 800;
MoveOverTime(elemIndex, Speed, x, y);
}
if (X == (float)800)
{
float y = i += 120;
float x = -400;
MoveOverTime(elemIndex, Speed, x, y);
}
Thread.Sleep(Speed);
}
}
public static uint MoveOverTime(uint elemIndex, short Time, float X, float Y)
{
uint Elem = 0xD87888 + (elemIndex) * 0xB8;
PS3.Extension.WriteFloat(Elem + Hud.HElems.fromX, PS3.Extension.ReadFloat(Elem + Hud.HElems.xOffset));
PS3.Extension.WriteFloat(Elem + Hud.HElems.fromY, PS3.Extension.ReadFloat(Elem + Hud.HElems.yOffset));
PS3.Extension.WriteInt32(Elem + Hud.HElems.moveTime, Time);
PS3.Extension.WriteInt32(Elem + Hud.HElems.moveStartTime, getLevelTime());
PS3.Extension.WriteFloat(Elem + Hud.HElems.xOffset, X);
PS3.Extension.WriteFloat(Elem + Hud.HElems.yOffset, Y);
return Elem;
}
public static void ChangeFontScaleOverTime(uint elemIndex, short Time, double OldFont, double NewFont)
{
uint Elem = 0xD87888 + (elemIndex) * 0xB8;
PS3.Extension.WriteFloat(Elem + HElems.fromFontScale, (float)OldFont);//fromFontScale
PS3.Extension.WriteUInt32(Elem + HElems.fontScaleStartTime, (UInt32)getLevelTime());//fontScaleStartTime
PS3.Extension.WriteInt32(Elem + HElems.fontScaleTime, Time);//fontScaleTime
PS3.Extension.WriteFloat(Elem + HElems.fontScale, (float)NewFont);
}
public static void ScaleOverTime(uint elemIndex, short Time, short Width, short Height)
{
uint Elem = 0xD87888 + (elemIndex) * 0xB8;
PS3.Extension.WriteInt32(Elem + HElems.fromHeight, PS3.Extension.ReadInt16(Elem + HElems.height));//From Height
PS3.Extension.WriteInt32(Elem + HElems.fromWidth, PS3.Extension.ReadInt16(Elem + HElems.width));//from Width
PS3.Extension.WriteInt32(Elem + HElems.scaleTime, Time);
PS3.Extension.WriteInt32(Elem + HElems.scaleStartTime, getLevelTime());//MoveStartTime
PS3.Extension.WriteInt16(Elem + HElems.height, Height);
PS3.Extension.WriteInt16(Elem + HElems.width, Width);
}
public static void FadeOverTime(uint elem, short Time, int R, int G, int B, int A)
{
uint Elem = 0xD87888 + (elem) * 0xB8;
byte[] RVal = PS3.GetMemory(Elem + HElems.color, 1);//Gets Current RVal
byte[] GVal = PS3.GetMemory(Elem + HElems.color + 0x01, 1);//Gets Current GVal
byte[] BVal = PS3.GetMemory(Elem + HElems.color + 0x02, 1);//Gets Current BVal
byte[] AVal = PS3.GetMemory(Elem + HElems.color + 0x03, 1);//Gets Current AVal
PS3.SetMemory(Elem + HElems.fromColor, RVal);//Sets Current RVal
PS3.SetMemory(Elem + HElems.fromColor + 0x01, GVal);//Sets Current GVal
PS3.SetMemory(Elem + HElems.fromColor + 0x02, BVal);//Sets Current BVal
PS3.SetMemory(Elem + HElems.fromColor + 0x03, AVal);//Sets Current AVal
PS3.Extension.WriteUInt32(Elem + HElems.fadeStartTime, (UInt32)getLevelTime());//Fade Start Time
PS3.Extension.WriteInt32(Elem + HElems.fadeTime, Time);//Fade Time
PS3.SetMemory(Elem + HElems.color, RGBA(R, G, B, A));//Set New Colors
}
public static void FadeAlphaOverTime(uint elemIndex, short Time, int OldAlpha, int NewAlpha)
{
uint Elem = 0xD87888 + (elemIndex) * 0xB8;
byte[] OldAVal = BitConverter.GetBytes(Convert.ToInt32(OldAlpha));//Convert Bytes To Int
PS3.SetMemory(Elem + 0x37, OldAVal);//Set Old Alpha
PS3.Extension.WriteUInt32(Elem + Hud.HElems.fadeStartTime, (UInt32)getLevelTime());//Fade Start Time
PS3.Extension.WriteInt32(Elem + Hud.HElems.fadeTime, Time);//Fade Time
byte[] NewAVal = BitConverter.GetBytes(Convert.ToInt32(NewAlpha));//Convert Bytes To Int
PS3.SetMemory(Elem + 0x33, NewAVal);//Set New Alpha
}
public static void doTypeWriterCustom(uint Index, ushort fxLetterTime, ushort fxDecayStartTime, ushort fxDecayDuration)
{
uint elem = HElems.ELEM + (Index) * 0xB8;
//TypeWriter
PS3.Extension.WriteInt32(elem + HElems.fxBirthTime, getLevelTime());
PS3.Extension.WriteInt32(elem + HElems.fxLetterTime, fxLetterTime);
PS3.Extension.WriteInt32(elem + HElems.fxDecayStartTime, fxDecayStartTime);
PS3.Extension.WriteInt32(elem + HElems.fxDecayDuration, fxDecayDuration);
}
public static void doTypeWriter(uint ElemIndex, int client, string text, double fontScale, short font, Single X, Single Y, int fxLetterTime, int fxDecayStartTime, int fxDecayDuration, int r, int g, int b, int a, int r1, int b1, int g1, int a1)
{
uint elem = Hud.HElems.ELEM + ((Convert.ToUInt32(ElemIndex)) * 0xB
;
PS3.SetMemory(elem, new byte[0xB8]);
PS3.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x01 });
PS3.Extension.WriteInt16(elem + HElems.text, G_LocalizedStringIndex(text));
PS3.Extension.WriteInt16(elem + HElems.font, font);
PS3.Extension.WriteInt32(elem + HElems.clientOffset, client);// continue.
PS3.Extension.WriteInt16(elem + HElems.alignScreen, 0);
PS3.Extension.WriteInt16(elem + HElems.alignOrg, 0);
PS3.Extension.WriteFloat(elem + HElems.fontScale, (float)fontScale);
PS3.Extension.WriteFloat(elem + HElems.xOffset, X);
PS3.Extension.WriteFloat(elem + HElems.yOffset, Y);
PS3.SetMemory(elem + HElems.color, RGBA(r, g, b, a));
PS3.SetMemory(elem + HElems.glowColor, RGBA(r1, g1, b1, a1));
//Typewriter
PS3.Extension.WriteInt32(elem + HElems.fxBirthTime, getLevelTime());
PS3.Extension.WriteInt32(elem + HElems.fxLetterTime, fxLetterTime);
PS3.Extension.WriteInt32(elem + HElems.fxDecayStartTime, fxDecayStartTime);
PS3.Extension.WriteInt32(elem + HElems.fxDecayDuration, fxDecayDuration);
}
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 = 0; i < 0x400; i++)
{
uint offset = 0xD87888 + ((uint)(i * 0xB
);
if (PS3.GetMemory(offset, 4)[3] == 0)
{
PS3.SetMemory(offset + HElems.type, new byte[0xB8]);
return offset;
}
}
return 0;
}
public static void StoreIcon(int elemIndex, uint 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 = 0xD87888 + (((uint)elemIndex) * 0xB
;
PS3.SetMemory(elem, new byte[0xB8]);
PS3.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x04 });
PS3.Extension.WriteInt32(elem + HElems.materialIndex, shader);
PS3.Extension.WriteInt32(elem + HElems.clientOffset, (int)client);
PS3.Extension.WriteInt32(elem + HElems.width, width);
PS3.Extension.WriteInt32(elem + HElems.height, height);
PS3.Extension.WriteInt32(elem + HElems.alignScreen, 0);
PS3.Extension.WriteInt32(elem + HElems.alignOrg, 0);
PS3.Extension.WriteFloat(elem + Hud.HElems.xOffset, x);
PS3.Extension.WriteFloat(elem + Hud.HElems.yOffset, y);
PS3.SetMemory(elem + HElems.color, RGBA(r, g, b, a));
}
public static void ChangeAlpha(int index, int r, int g, int b, int alpha)
{
uint elem = 0xD87888 + ((Convert.ToUInt32(index)) * 0xB
;
PS3.SetMemory(elem + Hud.HElems.color, Hud.RGBA(r, g, b, alpha));
}
public static void ChangeTextSub(int index, string text)
{
uint elem = 0xD87888 + ((Convert.ToUInt32(index)) * 0xB
;
PS3.Extension.WriteInt16(elem + HElems.text, G_LocalizedStringIndex(text));
}
public static void ChangeText(int index, string text, float X)
{
uint elem = 0xD87888 + ((Convert.ToUInt32(index)) * 0xB
;
PS3.Extension.WriteFloat(elem + Hud.HElems.xOffset, X);
PS3.Extension.WriteInt16(elem + HElems.text, G_LocalizedStringIndex(text));
}
public static void Enable_Huds()
{
PS3.SetMemory(0x2100000, new byte[32]);
PS3.SetMemory(0x2106000, new byte[32]);
PS3.SetMemory(0x36B260, new byte[] { 0x3C, 0x60, 0x02, 0x10, 0x80, 0x83, 0x00, 0x00, 0x2C, 0x04, 0x00, 0x00, 0x41, 0x82, 0x00, 0x8C, 0x4B, 0xCC, 0x83, 0x11, 0x3C, 0x80, 0x02, 0x10, 0x90, 0x64, 0x60, 0x00, 0x38, 0x60, 0x00, 0x00, 0x90, 0x64, 0x00, 0x00, 0x48, 0x00, 0x00, 0x74 });
PS3.SetMemory(0x335C7, new byte[] { 0x01 });
}
#region RPC
private static uint function_address = 0x0049F3D0;
public static int CallFunction(uint func_address, params object[] parameters)
{
int length = parameters.Length;
uint num2 = 0;
for (uint i = 0; i < length; i++)
{
if (parameters[i] is int)
{
byte[] array = BitConverter.GetBytes((int)parameters[i]);
Array.Reverse(array);
PS3.SetMemory(0x10050000 + ((i + num2) * 4), array);
}
else if (parameters[i] is uint)
{
byte[] buffer2 = BitConverter.GetBytes((uint)parameters[i]);
Array.Reverse(buffer2);
PS3.SetMemory(0x10050000 + ((i + num2) * 4), buffer2);
}
else if (parameters[i] is string)
{
byte[] buffer3 = Encoding.UTF8.GetBytes(Convert.ToString(parameters[i]) + "\0");
PS3.SetMemory(0x10050054 + (i * 0x400), buffer3);
uint num4 = 0x10050054 + (i * 0x400);
byte[] buffer4 = BitConverter.GetBytes(num4);
Array.Reverse(buffer4);
PS3.SetMemory(0x10050000 + ((i + num2) * 4), buffer4);
}
else if (parameters[i] is float)
{
num2++;
byte[] buffer5 = BitConverter.GetBytes((float)parameters[i]);
Array.Reverse(buffer5);
PS3.SetMemory(0x10050024 + ((num2 - 1) * 4), buffer5);
}
}
byte[] bytes = BitConverter.GetBytes(func_address);
Array.Reverse(bytes);
PS3.SetMemory(0x1005004c, bytes);
System.Threading.Thread.Sleep(20);
byte[] memory = new byte[4];
PS3.GetMemoryR(0x10050050, ref memory);
Array.Reverse(memory);
return BitConverter.ToInt32(memory, 0);
}
public static void WritePPC()
{
PS3.SetMemory(function_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
System.Threading.Thread.Sleep(20);
byte[] memory = new byte[] {
0x7c, 8, 2, 0xa6, 0xf8, 1, 0, 0x80, 60, 0x60, 0x10, 5, 0x81, 0x83, 0, 0x4c,
0x2c, 12, 0, 0, 0x41, 130, 0, 100, 0x80, 0x83, 0, 4, 0x80, 0xa3, 0, 8,
0x80, 0xc3, 0, 12, 0x80, 0xe3, 0, 0x10, 0x81, 3, 0, 20, 0x81, 0x23, 0, 0x18,
0x81, 0x43, 0, 0x1c, 0x81, 0x63, 0, 0x20, 0xc0, 0x23, 0, 0x24, 0xc0, 0x43, 0, 40,
0xc0, 0x63, 0, 0x2c, 0xc0, 0x83, 0, 0x30, 0xc0, 0xa3, 0, 0x34, 0xc0, 0xc3, 0, 0x38,
0xc0, 0xe3, 0, 60, 0xc1, 3, 0, 0x40, 0xc1, 0x23, 0, 0x48, 0x80, 0x63, 0, 0,
0x7d, 0x89, 3, 0xa6, 0x4e, 0x80, 4, 0x21, 60, 0x80, 0x10, 5, 0x38, 160, 0, 0,
0x90, 0xa4, 0, 0x4c, 0x90, 100, 0, 80, 0xe8, 1, 0, 0x80, 0x7c, 8, 3, 0xa6,
0x38, 0x21, 0, 0x70, 0x4e, 0x80, 0, 0x20
};
PS3.SetMemory(function_address + 4, memory);
PS3.SetMemory(0x10050000, new byte[0x2854]);
PS3.SetMemory(function_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
}
#endregion
public static short G_LocalizedStringIndex(string Text)
{
return (short)CallFunction(0x00033580, Text);
}
public static void SetGlow(uint elemIndex, int r, int g, int b, int a)
{
uint elem = HElems.ELEM + ((elemIndex) * 0xB
;
PS3.SetMemory(elem + HElems.glowColor, RGBA(r, g, b, a));
}
public static void SetGlowText(uint elemIndex, int client, string Text, short font, double 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 = HElems.ELEM + ((elemIndex) * 0xB
;
PS3.SetMemory(elem, new byte[0xB8]);
PS3.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x01 });
PS3.Extension.WriteInt16(elem + HElems.text, G_LocalizedStringIndex(Text));
PS3.Extension.WriteInt16(elem + HElems.font, font);
PS3.Extension.WriteInt16(elem + HElems.alignScreen, 0);
PS3.Extension.WriteInt16(elem + HElems.alignOrg, 0);
PS3.Extension.WriteFloat(elem + HElems.fontScale, (float)fontScale);
PS3.Extension.WriteFloat(elem + HElems.xOffset,x);
PS3.Extension.WriteFloat(elem + HElems.yOffset, y);
PS3.SetMemory(elem + HElems.color, RGBA(r, g, b, a));
PS3.SetMemory(elem + HElems.glowColor, RGBA(r1, g1, b1, a1));
PS3.Extension.WriteInt32(elem + HElems.clientOffset, client);
}
public static void StoreTextElem(int elemIndex, int client, string Text, short font, double fontScale, float x, float y, uint align, float sort, int r, int g, int b, int a)
{
uint elem = Hud.HElems.ELEM + ((Convert.ToUInt32(elemIndex)) * 0xB
;
PS3.SetMemory(elem, new byte[0xB8]);
PS3.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x01 });
PS3.Extension.WriteInt16(elem + HElems.text, G_LocalizedStringIndex(Text));
PS3.Extension.WriteInt32(elem + HElems.font, font);
PS3.Extension.WriteInt32(elem + HElems.clientOffset, client);
PS3.Extension.WriteFloat(elem + HElems.fontScale, (float)fontScale);
PS3.Extension.WriteFloat(elem + HElems.xOffset, x);
PS3.Extension.WriteFloat(elem + HElems.yOffset, y);
PS3.SetMemory(elem + HElems.color, RGBA(r, g, b, a));
}

Copyright © 2026, NextGenUpdate.
All Rights Reserved.