Post: [Updated/1.13] Huds Elements
04-29-2014, 12:50 PM #1
iTпDM
Vault dweller
(adsbygoogle = window.adsbygoogle || []).push({});
    

public static class HElems
{
public static uint //0xb8 4 = icon, 1 = text

//Updated 1.13 - By iTnDM

ELEM = 0xD87888, //patched
FIX_ELEM = 0x3363F,
FPS = 0x36C2D0,
G_LocalizedString = 0x335F8,

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(0xdb5a44);
}

public static void SetGlow(uint elemIndex, int r, int g, int b, int a)
{
uint num = HElems.ELEM + (elemIndex * 0xbCool Man (aka Tustin);
PS3.SetMemory(num + HElems.glowColor, RGBA(r, g, b, a));
}


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 short G_LocalizedStringIndex(String Text)
{
return (short)RPC.CallFunction(HElems.G_LocalizedStringIndex, new object[] { Text });
}


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;
}


//StoreIcon


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 offset = (uint) (0xD87808 + (elemIndex * 0xbCool Man (aka Tustin));
PS3.SetMemory(offset, new byte[0xb8]);
byte[] buffer = new byte[4];
buffer[3] = 4;
PS3.SetMemory(offset, buffer);
PS3.Extension.WriteInt32(offset + HElems.materialIndex, shader);
PS3.Extension.WriteInt32(offset + HElems.clientOffset, (int) client);
PS3.Extension.WriteInt32(offset + HElems.width, width);
PS3.Extension.WriteInt32(offset + HElems.height, height);
PS3.Extension.WriteInt32(offset + HElems.alignScreen, 0);
PS3.Extension.WriteInt32(offset + HElems.alignOrg, 0);
PS3.Extension.WriteFloat(offset + HElems.xOffset, x);
PS3.Extension.WriteFloat(offset + HElems.yOffset, y);
PS3.SetMemory(offset + HElems.color, RGBA(r, g, b, a));
}




private byte[] CacheString(string Text)
{
PS3.SetMemory(0x2100000, Encoding.ASCII.GetBytes(Text + "\0"));
byte[] result = new byte[4];
Thread.Sleep(50);
PS3.GetMemory(0x2105000, result);
return result;
}


//StoreTextElem

public static void StoreTextElem(int elemIndex, int client, string Text, short font, float fontSize, float x, float y, uint align, float sort, int r, int g, int b, int a)
{
uint offset = HElems.ELEM + (Convert.ToUInt32(elemIndex) * 0xbCool Man (aka Tustin);
PS3.SetMemory(offset, new byte[0xb8]);
byte[] buffer = new byte[4];
buffer[3] = 1;
PS3.SetMemory(offset, buffer);
PS3.Extension.WriteInt16(offset + HElems.text, G_LocalizedStringIndex(Text));
PS3.Extension.WriteInt32(offset + HElems.font, font);
PS3.Extension.WriteInt32(offset + HElems.clientOffset, client);
PS3.Extension.WriteFloat(offset + HElems.fontScale, fontSize);
PS3.Extension.WriteFloat(offset + HElems.xOffset, x);
PS3.Extension.WriteFloat(offset + HElems.yOffset, y);
PS3.SetMemory(offset + HElems.color, RGBA(r, g, b, a));
}

//doTypewriter

public static void doTypeWriter(uint ElemIndex, int client, string text, double fontScale, short font, float X, float Y, int fxLetterTime, int fxDecayStartTime, int fxDecayDuration, int r, int g, int b, int a, int r1, int b1, int g1, int a1)
{
uint offset = HElems.ELEM + (Convert.ToUInt32(ElemIndex) * 0xbCool Man (aka Tustin);
PS3.SetMemory(offset, new byte[0xb8]);
byte[] buffer = new byte[4];
buffer[3] = 1;
PS3.SetMemory(offset, buffer);
PS3.Extension.WriteInt16(offset + HElems.text, G_LocalizedStringIndex(text));
PS3.Extension.WriteInt16(offset + HElems.font, font);
PS3.Extension.WriteInt32(offset + HElems.clientOffset, client);
PS3.Extension.WriteInt16(offset + HElems.alignScreen, 0);
PS3.Extension.WriteInt16(offset + HElems.alignOrg, 0);
PS3.Extension.WriteFloat(offset + HElems.fontScale, (float) fontScale);
PS3.Extension.WriteFloat(offset + HElems.xOffset, X);
PS3.Extension.WriteFloat(offset + HElems.yOffset, Y);
PS3.SetMemory(offset + HElems.color, RGBA(r, g, b, a));
PS3.SetMemory(offset + HElems.glowColor, RGBA(r1, g1, b1, a1));
PS3.Extension.WriteInt32(offset + HElems.fxBirthTime, getLevelTime());
PS3.Extension.WriteInt32(offset + HElems.fxLetterTime, fxLetterTime);
PS3.Extension.WriteInt32(offset + HElems.fxDecayStartTime, fxDecayStartTime);
PS3.Extension.WriteInt32(offset + HElems.fxDecayDuration, fxDecayDuration);
}







public static uint MoveOverTime(uint elemIndex, short Time, float X, float Y)
{
uint Elem = 0xD87808 + (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 = 0xD87808 + (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 = 0xD87808 + (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 = 0xD87808 + (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());
PS3.Extension.WriteInt32(Elem + HElems.fadeTime, Time);//Fade Time
PS3.SetMemory(Elem + HElems.color, RGBA(R, G, B, A));//Set New Colors
}



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;
}

}



Credits

Me - Updated Huds Elements

Bad Luck Brain - Huds + Help
Last edited by iTпDM ; 06-03-2014 at 12:30 PM.
05-04-2014, 06:20 PM #11
how do i use this ? and is there any tools for 1.11 update?
05-06-2014, 04:06 AM #12
jamaan
Banned
I found offsets on debugger its like thi line
0x12d6e7|11 11 11 11 22 22 22 22 00 00 00 00 00
Example' all of number one "11" is for kills
and the first "11" byte for milions the second for thousends etc...same for "22" its for deaths my qustion how to put it in the tool
05-06-2014, 07:05 AM #13
I'm pretty sure text is at 0x84 within the structure, not 0x42. I'll be mapping the whole structure out later today, and I'll post it on this thread.

EDIT:

    
typedef enum : int
{
FREE, TEXT, VALUE, MATERIAL=4, WAYPOINT = 0xB //<-- Just a guess lol
}he_type_t;

typedef struct game_hudelem_s
{
hudelem_s elem; //0x00 - 0xA8
int clientIndex; //0xA8 - 0xAC
int teamNum; //0xAC - 0xB0
int unknown; //0xB0 - 0xB4
int archived; //0xB4 - 0xB8
};

typedef struct hudelem_s
{
he_type_t type; //0x00 - 0x04
float origin[3]; //0x04 - 0x10
int entityIndex; //0x10 - 0x14
float fontScale; //0x14 - 0x18
float unknown[3]; //0x18 - 0x24
int font; //0x24 - 0x28
/* Everything else after font is just +0x10 from the cod4 structure */
int align[2]; //0x28 - 0x30
unsigned char colour[4]; //0x30 - 0x34
unsigned char fromColour[4]; //0x34 - 0x38
int fadeStartTime; //0x38 - 0x3C
int fadeTime; //0x3C - 0x40
int label; //0x40 - 0x44
int width; //0x44 - 0x48
int height; //0x48 - 0x4C
int materialIndex; //0x4C - 0x50
int fromWidth; //0x50 - 0x54
int fromHeight; //0x54 - 0x58
int scaleStartTime; //0x58 - 0x5C
int scaleTime; //0x5C - 0x60
float fromVec2[2]; //0x60 - 0x68
int fromAlign[2]; //0x68 - 0x70
int moveStartTime; //0x70 - 0x74
int moveTime; //0x74 - 0x78
int time; //0x78 - 0x7C
int duration; //0x7C - 0x80
float value; //0x80 - 0x84
int text; //0x84 - 0x88
float sort; //0x88 - 0x8C
unsigned char glowColour[4]; //0x8C - 0x90
int fxBirthTime; //0x90 - 0x94
int fxLetterTime; //0x94 - 0x98
int fxDecayStartTime; //0x98 - 0x9C
int fxDecayDuration; //0x9C - 0xA0
int soundIndex; //0xA0 - 0xA4
int flag; //0xA4 - 0xA8
};
Last edited by Bitwise ; 05-06-2014 at 11:15 PM.
05-11-2014, 02:35 PM #14
Swaqq
Professional Thanker
This made gave me soo many errors ._. maybe I am just dumb :fa: but as soon as i added it it made all my voids and stuff i had in my menu errors ._. Also G_LocalizedStringIndex is missing.
idk maybe Im just dumb Idk
Last edited by Swaqq ; 05-11-2014 at 02:37 PM. Reason: i forgot a word ._.
05-12-2014, 09:21 AM #15
Mango_Knife
In my man cave
Originally posted by NGU View Post
This made gave me soo many errors ._. maybe I am just dumb :fa: but as soon as i added it it made all my voids and stuff i had in my menu errors ._. Also G_LocalizedStringIndex is missing.
idk maybe Im just dumb Idk


No your not, he missed many stuff, here's my class:
    
#region HuDElements
public static class HElems
{
public static uint //0xb8 4 = icon, 1 = text
//Updated 1.11 - By iTnDM
ELEM = 0xD87388, //patched
FIX_ELEM = 0x337B7,
FPS = 0x36BA68,
G_LocalizedStringIndex = 0x00033770,
G_LocalizedString = 0x33770,
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(0xdb5a44);
}
public static void SetGlow(uint elemIndex, int r, int g, int b, int a)
{
uint num = HElems.ELEM + (elemIndex * 0xbCool Man (aka Tustin);
PS3.SetMemory(num + HElems.glowColor, RGBA(r, g, b, a));
}
public static void Enable_Huds()
{
PS3.SetMemory(0x2100000, new byte[0x20]);
PS3.SetMemory(0x2106000, new byte[0x20]);
PS3.SetMemory(0x36ba68, new byte[] {
60, 0x60, 2, 0x10, 0x80, 0x83, 0, 0, 0x2c, 4, 0, 0, 0x41, 130, 0, 140,
0x4b, 0xcc, 0x77, 0x69, 60, 0x80, 2, 0x10, 0x90, 100, 80, 0, 0x38, 0x60, 0, 0,
0x90, 100, 0, 0, 0x48, 0, 0, 0x74
});
PS3.SetMemory(0x337b7, new byte[] { 1 });
}
public static void ActivateIndex(int index, int type)
{
byte[] Typ = BitConverter.GetBytes(type);
Array.Reverse(Typ);
PS3.SetMemory(HElems.ELEM + 0xb8 * (uint)index, Typ);
}
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;
}
//StoreIcon
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 offset = (uint)(0xd87388 + (elemIndex * 0xbCool Man (aka Tustin));
PS3.SetMemory(offset, new byte[0xb8]);
byte[] buffer = new byte[4];
buffer[3] = 4;
PS3.SetMemory(offset, buffer);
PS3.Extension.WriteInt32(offset + HElems.materialIndex, shader);
PS3.Extension.WriteInt32(offset + HElems.clientOffset, (int)client);
PS3.Extension.WriteInt32(offset + HElems.width, width);
PS3.Extension.WriteInt32(offset + HElems.height, height);
PS3.Extension.WriteInt32(offset + HElems.alignScreen, 0);
PS3.Extension.WriteInt32(offset + HElems.alignOrg, 0);
PS3.Extension.WriteFloat(offset + HElems.xOffset, x);
PS3.Extension.WriteFloat(offset + HElems.yOffset, y);
PS3.SetMemory(offset + HElems.color, RGBA(r, g, b, a));
}
#region GetMemory
public static byte[] GetMemory(uint Offset, int Length)
{
byte[] buffer = new byte[Length];
PS3.GetMemory(Offset, buffer);
return buffer;
}
public static void GetMemoryref(uint Address, ref byte[] Bytes)
{
PS3.GetMemory(Address, Bytes);
}
#endregion
public static byte[] CacheString(string Text)
{
PS3.SetMemory(HElems.FIX_ELEM, new byte[] { 0x01 }); //must patch this to make it work
PS3.SetMemory(0x2100000, Encoding.ASCII.GetBytes(Text + "\0"));
byte[] result = new byte[6];
Thread.Sleep(10);
GetMemoryref(0x2106000, ref result);
return result;
}
//StoreTextElem
public static void StoreTextElem(int elemIndex, int client, string Text, short font, float fontSize, float x, float y, uint align, float sort, int r, int g, int b, int a)
{
uint offset = HElems.ELEM + (Convert.ToUInt32(elemIndex) * 0xbCool Man (aka Tustin);
PS3.SetMemory(offset, new byte[0xb8]);
byte[] buffer = new byte[4];
buffer[3] = 1;
PS3.SetMemory(offset, buffer);
PS3.Extension.WriteInt16(offset + HElems.text, G_LocalizedStringIndex(Text));
PS3.Extension.WriteInt32(offset + HElems.font, font);
PS3.Extension.WriteInt32(offset + HElems.clientOffset, client);
PS3.Extension.WriteFloat(offset + HElems.fontScale, fontSize);
PS3.Extension.WriteFloat(offset + HElems.xOffset, x);
PS3.Extension.WriteFloat(offset + HElems.yOffset, y);
PS3.SetMemory(offset + HElems.color, RGBA(r, g, b, a));
}
#region LocalizedStringFunction
public static short G_LocalizedStringIndex(string Text)
{
UInt32 G_LocalizedStringIndexOff = 0x00033770;
PS3.Extension.WriteByte(G_LocalizedStringIndexOff + 0x48, 0x41);
short StringT = (short)RPC.CallFunction(G_LocalizedStringIndexOff, new object[] { Text });
PS3.Extension.WriteByte(G_LocalizedStringIndexOff + 0x48, 0x40);
return StringT;
}
#endregion
//doTypewriter
public static void doTypeWriter(uint ElemIndex, int client, string text, double fontScale, short font, float X, float Y, int fxLetterTime, int fxDecayStartTime, int fxDecayDuration, int r, int g, int b, int a, int r1, int b1, int g1, int a1)
{
uint offset = HElems.ELEM + (Convert.ToUInt32(ElemIndex) * 0xbCool Man (aka Tustin);
PS3.SetMemory(offset, new byte[0xb8]);
byte[] buffer = new byte[4];
buffer[3] = 1;
PS3.SetMemory(offset, buffer);
PS3.Extension.WriteInt16(offset + HElems.text, G_LocalizedStringIndex(text));
PS3.Extension.WriteInt16(offset + HElems.font, font);
PS3.Extension.WriteInt32(offset + HElems.clientOffset, client);
PS3.Extension.WriteInt16(offset + HElems.alignScreen, 0);
PS3.Extension.WriteInt16(offset + HElems.alignOrg, 0);
PS3.Extension.WriteFloat(offset + HElems.fontScale, (float)fontScale);
PS3.Extension.WriteFloat(offset + HElems.xOffset, X);
PS3.Extension.WriteFloat(offset + HElems.yOffset, Y);
PS3.SetMemory(offset + HElems.color, RGBA(r, g, b, a));
PS3.SetMemory(offset + HElems.glowColor, RGBA(r1, g1, b1, a1));
PS3.Extension.WriteInt32(offset + HElems.fxBirthTime, getLevelTime());
PS3.Extension.WriteInt32(offset + HElems.fxLetterTime, fxLetterTime);
PS3.Extension.WriteInt32(offset + HElems.fxDecayStartTime, fxDecayStartTime);
PS3.Extension.WriteInt32(offset + HElems.fxDecayDuration, fxDecayDuration);
}
public static uint MoveOverTime(uint elemIndex, short Time, float X, float Y)
{
uint Elem = 0xD87388 + (elemIndex) * 0xB8;
PS3.Extension.WriteFloat(Elem + HElems.fromX, PS3.Extension.ReadFloat(Elem + HElems.xOffset));
PS3.Extension.WriteFloat(Elem + HElems.fromY, PS3.Extension.ReadFloat(Elem + HElems.yOffset));
PS3.Extension.WriteInt32(Elem + HElems.moveTime, Time);
PS3.Extension.WriteInt32(Elem + HElems.moveStartTime, getLevelTime());
PS3.Extension.WriteFloat(Elem + HElems.xOffset, X);
PS3.Extension.WriteFloat(Elem + HElems.yOffset, Y);
return Elem;
}
public static void ChangeFontScaleOverTime(uint elemIndex, short Time, double OldFont, double NewFont)
{
uint Elem = 0xD87388 + (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 = 0xD87388 + (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 = 0xD87388 + (elem) * 0xB8;
byte[] RVal = GetMemory(Elem + HElems.color, 1);//Gets Current RVal
byte[] GVal = GetMemory(Elem + HElems.color + 0x01, 1);//Gets Current GVal
byte[] BVal = GetMemory(Elem + HElems.color + 0x02, 1);//Gets Current BVal
byte[] AVal = 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());
PS3.Extension.WriteInt32(Elem + HElems.fadeTime, Time);//Fade Time
PS3.SetMemory(Elem + HElems.color, RGBA(R, G, B, A));//Set New Colors
}
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;
}
#endregion
Last edited by Mango_Knife ; 05-12-2014 at 09:24 AM.
05-12-2014, 03:50 PM #16
Originally posted by Knife View Post
No your not, he missed many stuff, here's my class:
    
#region HuDElements
public static class HElems
{
public static uint //0xb8 4 = icon, 1 = text
//Updated 1.11 - By iTnDM
ELEM = 0xD87388, //patched
FIX_ELEM = 0x337B7,
FPS = 0x36BA68,
G_LocalizedStringIndex = 0x00033770,
G_LocalizedString = 0x33770,
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(0xdb5a44);
}
public static void SetGlow(uint elemIndex, int r, int g, int b, int a)
{
uint num = HElems.ELEM + (elemIndex * 0xbCool Man (aka Tustin);
PS3.SetMemory(num + HElems.glowColor, RGBA(r, g, b, a));
}
public static void Enable_Huds()
{
PS3.SetMemory(0x2100000, new byte[0x20]);
PS3.SetMemory(0x2106000, new byte[0x20]);
PS3.SetMemory(0x36ba68, new byte[] {
60, 0x60, 2, 0x10, 0x80, 0x83, 0, 0, 0x2c, 4, 0, 0, 0x41, 130, 0, 140,
0x4b, 0xcc, 0x77, 0x69, 60, 0x80, 2, 0x10, 0x90, 100, 80, 0, 0x38, 0x60, 0, 0,
0x90, 100, 0, 0, 0x48, 0, 0, 0x74
});
PS3.SetMemory(0x337b7, new byte[] { 1 });
}
public static void ActivateIndex(int index, int type)
{
byte[] Typ = BitConverter.GetBytes(type);
Array.Reverse(Typ);
PS3.SetMemory(HElems.ELEM + 0xb8 * (uint)index, Typ);
}
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;
}
//StoreIcon
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 offset = (uint)(0xd87388 + (elemIndex * 0xbCool Man (aka Tustin));
PS3.SetMemory(offset, new byte[0xb8]);
byte[] buffer = new byte[4];
buffer[3] = 4;
PS3.SetMemory(offset, buffer);
PS3.Extension.WriteInt32(offset + HElems.materialIndex, shader);
PS3.Extension.WriteInt32(offset + HElems.clientOffset, (int)client);
PS3.Extension.WriteInt32(offset + HElems.width, width);
PS3.Extension.WriteInt32(offset + HElems.height, height);
PS3.Extension.WriteInt32(offset + HElems.alignScreen, 0);
PS3.Extension.WriteInt32(offset + HElems.alignOrg, 0);
PS3.Extension.WriteFloat(offset + HElems.xOffset, x);
PS3.Extension.WriteFloat(offset + HElems.yOffset, y);
PS3.SetMemory(offset + HElems.color, RGBA(r, g, b, a));
}
#region GetMemory
public static byte[] GetMemory(uint Offset, int Length)
{
byte[] buffer = new byte[Length];
PS3.GetMemory(Offset, buffer);
return buffer;
}
public static void GetMemoryref(uint Address, ref byte[] Bytes)
{
PS3.GetMemory(Address, Bytes);
}
#endregion
public static byte[] CacheString(string Text)
{
PS3.SetMemory(HElems.FIX_ELEM, new byte[] { 0x01 }); //must patch this to make it work
PS3.SetMemory(0x2100000, Encoding.ASCII.GetBytes(Text + "\0"));
byte[] result = new byte[6];
Thread.Sleep(10);
GetMemoryref(0x2106000, ref result);
return result;
}
//StoreTextElem
public static void StoreTextElem(int elemIndex, int client, string Text, short font, float fontSize, float x, float y, uint align, float sort, int r, int g, int b, int a)
{
uint offset = HElems.ELEM + (Convert.ToUInt32(elemIndex) * 0xbCool Man (aka Tustin);
PS3.SetMemory(offset, new byte[0xb8]);
byte[] buffer = new byte[4];
buffer[3] = 1;
PS3.SetMemory(offset, buffer);
PS3.Extension.WriteInt16(offset + HElems.text, G_LocalizedStringIndex(Text));
PS3.Extension.WriteInt32(offset + HElems.font, font);
PS3.Extension.WriteInt32(offset + HElems.clientOffset, client);
PS3.Extension.WriteFloat(offset + HElems.fontScale, fontSize);
PS3.Extension.WriteFloat(offset + HElems.xOffset, x);
PS3.Extension.WriteFloat(offset + HElems.yOffset, y);
PS3.SetMemory(offset + HElems.color, RGBA(r, g, b, a));
}
#region LocalizedStringFunction
public static short G_LocalizedStringIndex(string Text)
{
UInt32 G_LocalizedStringIndexOff = 0x00033770;
PS3.Extension.WriteByte(G_LocalizedStringIndexOff + 0x48, 0x41);
short StringT = (short)RPC.CallFunction(G_LocalizedStringIndexOff, new object[] { Text });
PS3.Extension.WriteByte(G_LocalizedStringIndexOff + 0x48, 0x40);
return StringT;
}
#endregion
//doTypewriter
public static void doTypeWriter(uint ElemIndex, int client, string text, double fontScale, short font, float X, float Y, int fxLetterTime, int fxDecayStartTime, int fxDecayDuration, int r, int g, int b, int a, int r1, int b1, int g1, int a1)
{
uint offset = HElems.ELEM + (Convert.ToUInt32(ElemIndex) * 0xbCool Man (aka Tustin);
PS3.SetMemory(offset, new byte[0xb8]);
byte[] buffer = new byte[4];
buffer[3] = 1;
PS3.SetMemory(offset, buffer);
PS3.Extension.WriteInt16(offset + HElems.text, G_LocalizedStringIndex(text));
PS3.Extension.WriteInt16(offset + HElems.font, font);
PS3.Extension.WriteInt32(offset + HElems.clientOffset, client);
PS3.Extension.WriteInt16(offset + HElems.alignScreen, 0);
PS3.Extension.WriteInt16(offset + HElems.alignOrg, 0);
PS3.Extension.WriteFloat(offset + HElems.fontScale, (float)fontScale);
PS3.Extension.WriteFloat(offset + HElems.xOffset, X);
PS3.Extension.WriteFloat(offset + HElems.yOffset, Y);
PS3.SetMemory(offset + HElems.color, RGBA(r, g, b, a));
PS3.SetMemory(offset + HElems.glowColor, RGBA(r1, g1, b1, a1));
PS3.Extension.WriteInt32(offset + HElems.fxBirthTime, getLevelTime());
PS3.Extension.WriteInt32(offset + HElems.fxLetterTime, fxLetterTime);
PS3.Extension.WriteInt32(offset + HElems.fxDecayStartTime, fxDecayStartTime);
PS3.Extension.WriteInt32(offset + HElems.fxDecayDuration, fxDecayDuration);
}
public static uint MoveOverTime(uint elemIndex, short Time, float X, float Y)
{
uint Elem = 0xD87388 + (elemIndex) * 0xB8;
PS3.Extension.WriteFloat(Elem + HElems.fromX, PS3.Extension.ReadFloat(Elem + HElems.xOffset));
PS3.Extension.WriteFloat(Elem + HElems.fromY, PS3.Extension.ReadFloat(Elem + HElems.yOffset));
PS3.Extension.WriteInt32(Elem + HElems.moveTime, Time);
PS3.Extension.WriteInt32(Elem + HElems.moveStartTime, getLevelTime());
PS3.Extension.WriteFloat(Elem + HElems.xOffset, X);
PS3.Extension.WriteFloat(Elem + HElems.yOffset, Y);
return Elem;
}
public static void ChangeFontScaleOverTime(uint elemIndex, short Time, double OldFont, double NewFont)
{
uint Elem = 0xD87388 + (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 = 0xD87388 + (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 = 0xD87388 + (elem) * 0xB8;
byte[] RVal = GetMemory(Elem + HElems.color, 1);//Gets Current RVal
byte[] GVal = GetMemory(Elem + HElems.color + 0x01, 1);//Gets Current GVal
byte[] BVal = GetMemory(Elem + HElems.color + 0x02, 1);//Gets Current BVal
byte[] AVal = 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());
PS3.Extension.WriteInt32(Elem + HElems.fadeTime, Time);//Fade Time
PS3.SetMemory(Elem + HElems.color, RGBA(R, G, B, A));//Set New Colors
}
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;
}
#endregion


The text makes no sense? For starters, it's 32bits. So it wouldn't ever be 0x42 (unless a value before it was 0x3E)...but in this case you proved yourself it's not, with value being a floating point...again, 32bits. So the next placement within the structure would be 0x44 if anything...but it's 0x84 xD
05-12-2014, 03:58 PM #17
Mango_Knife
In my man cave
Originally posted by B1TW153 View Post
The text makes no sense? For starters, it's 32bits. So it wouldn't ever be 0x42 (unless a value before it was 0x3E)...but in this case you proved yourself it's not, with value being a floating point...again, 32bits. So the next placement within the structure would be 0x44 if anything...but it's 0x84 xD


Well, it working fine for me.
05-13-2014, 11:42 PM #18
iTпDM
Vault dweller
Updated :yes:

The following 61 users say thank you to iTпDM for this useful post:

05-14-2014, 02:18 AM #19
Originally posted by TnDM View Post
    

public static class HElems
{
public static uint //0xb8 4 = icon, 1 = text

//Updated 1.12 - By iTnDM

ELEM = 0xD87808, //patched
FIX_ELEM = 0x335C7,
FPS = 0x36BC58,
G_LocalizedString = 0x33580,

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(0xdb5a44);
}

public static void SetGlow(uint elemIndex, int r, int g, int b, int a)
{
uint num = HElems.ELEM + (elemIndex * 0xbCool Man (aka Tustin);
PS3.SetMemory(num + HElems.glowColor, RGBA(r, g, b, a));
}

public static void Enable_Huds()
{
PS3.SetMemory(0x2100000, new byte[0x20]);
PS3.SetMemory(0x2106000, new byte[0x20]);
PS3.SetMemory(0x36ba68, new byte[] {
0x3C, 0x60, 0x02, 0x10, 0x80, 0x83, 0x00, 0x00, 0x2C, 0x04, 0x00, 0x00, 0x41, 0x82, 0x00, 0x8C, 0x4B, 0xCC, 0x75, 0x79, 0x3C, 0x80, 0x02, 0x10, 0x90, 0x64, 0x50, 0x00, 0x38, 0x60, 0x00, 0x00, 0x90, 0x64, 0x00, 0x00, 0x48, 0x00, 0x00, 0x74 });

PS3.SetMemory(0x335C7, new byte[] { 1 });
}

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 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;
}


//StoreIcon


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 offset = (uint) (0xD87808 + (elemIndex * 0xbCool Man (aka Tustin));
PS3.SetMemory(offset, new byte[0xb8]);
byte[] buffer = new byte[4];
buffer[3] = 4;
PS3.SetMemory(offset, buffer);
PS3.Extension.WriteInt32(offset + HElems.materialIndex, shader);
PS3.Extension.WriteInt32(offset + HElems.clientOffset, (int) client);
PS3.Extension.WriteInt32(offset + HElems.width, width);
PS3.Extension.WriteInt32(offset + HElems.height, height);
PS3.Extension.WriteInt32(offset + HElems.alignScreen, 0);
PS3.Extension.WriteInt32(offset + HElems.alignOrg, 0);
PS3.Extension.WriteFloat(offset + HElems.xOffset, x);
PS3.Extension.WriteFloat(offset + HElems.yOffset, y);
PS3.SetMemory(offset + HElems.color, RGBA(r, g, b, a));
}


public static byte[] CacheString(string Text)
{
PS3.SetMemory(HElems.FIX_ELEM, new byte[] { 0x01 }); //must patch this to make it work
PS3.SetMemory(0x2100000, Encoding.ASCII.GetBytes(Text + "\0"));
byte[] result = new byte[6];
Thread.Sleep(10);
PS3.GetMemory(0x2106000, ref result);
return result;
}


//StoreTextElem

public static void StoreTextElem(int elemIndex, int client, string Text, short font, float fontSize, float x, float y, uint align, float sort, int r, int g, int b, int a)
{
uint offset = HElems.ELEM + (Convert.ToUInt32(elemIndex) * 0xbCool Man (aka Tustin);
PS3.SetMemory(offset, new byte[0xb8]);
byte[] buffer = new byte[4];
buffer[3] = 1;
PS3.SetMemory(offset, buffer);
PS3.Extension.WriteInt16(offset + HElems.text, G_LocalizedStringIndex(Text));
PS3.Extension.WriteInt32(offset + HElems.font, font);
PS3.Extension.WriteInt32(offset + HElems.clientOffset, client);
PS3.Extension.WriteFloat(offset + HElems.fontScale, fontSize);
PS3.Extension.WriteFloat(offset + HElems.xOffset, x);
PS3.Extension.WriteFloat(offset + HElems.yOffset, y);
PS3.SetMemory(offset + HElems.color, RGBA(r, g, b, a));
}

//doTypewriter

public static void doTypeWriter(uint ElemIndex, int client, string text, double fontScale, short font, float X, float Y, int fxLetterTime, int fxDecayStartTime, int fxDecayDuration, int r, int g, int b, int a, int r1, int b1, int g1, int a1)
{
uint offset = HElems.ELEM + (Convert.ToUInt32(ElemIndex) * 0xbCool Man (aka Tustin);
PS3.SetMemory(offset, new byte[0xb8]);
byte[] buffer = new byte[4];
buffer[3] = 1;
PS3.SetMemory(offset, buffer);
PS3.Extension.WriteInt16(offset + HElems.text, G_LocalizedStringIndex(text));
PS3.Extension.WriteInt16(offset + HElems.font, font);
PS3.Extension.WriteInt32(offset + HElems.clientOffset, client);
PS3.Extension.WriteInt16(offset + HElems.alignScreen, 0);
PS3.Extension.WriteInt16(offset + HElems.alignOrg, 0);
PS3.Extension.WriteFloat(offset + HElems.fontScale, (float) fontScale);
PS3.Extension.WriteFloat(offset + HElems.xOffset, X);
PS3.Extension.WriteFloat(offset + HElems.yOffset, Y);
PS3.SetMemory(offset + HElems.color, RGBA(r, g, b, a));
PS3.SetMemory(offset + HElems.glowColor, RGBA(r1, g1, b1, a1));
PS3.Extension.WriteInt32(offset + HElems.fxBirthTime, getLevelTime());
PS3.Extension.WriteInt32(offset + HElems.fxLetterTime, fxLetterTime);
PS3.Extension.WriteInt32(offset + HElems.fxDecayStartTime, fxDecayStartTime);
PS3.Extension.WriteInt32(offset + HElems.fxDecayDuration, fxDecayDuration);
}







public static uint MoveOverTime(uint elemIndex, short Time, float X, float Y)
{
uint Elem = 0xD87808 + (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 = 0xD87808 + (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 = 0xD87808 + (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 = 0xD87808 + (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());
PS3.Extension.WriteInt32(Elem + HElems.fadeTime, Time);//Fade Time
PS3.SetMemory(Elem + HElems.color, RGBA(R, G, B, A));//Set New Colors
}



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;
}

}



Credits

Me - Update Huds Elements To 1.11 + 1.12
Bad Luck Brain - Huds + Help



Tsk, tsk tsk No Why do you post stuff that doesn't work? Lol Didn't even test did you?

Replace this with enable huds()
    
public static void Enable_Cacher()
{
Debug.SetMemory(0x2100000, new byte[32]);
Debug.SetMemory(0x2105000, new byte[32]);
Debug.SetMemory(0x36BC58, new byte[] { 0x3C, 0x60, 0x02, 0x10, 0x80, 0x83, 0x00, 0x00, 0x2C, 0x04, 0x00, 0x00, 0x41, 0x82, 0x00, 0x8C, 0x4B, 0xCC, 0x79, 0x19, 0x3C, 0x80, 0x02, 0x10, 0x90, 0x64, 0x50, 0x00, 0x38, 0x60, 0x00, 0x00, 0x90, 0x64, 0x00, 0x00, 0x48, 0x00, 0x00, 0x74, 0x3B, 0xE4, 0xBB, 0xBC, 0x38, 0x80, 0x00, 0x00 });
Debug.SetMemory(0x335C7, new byte[] { 0x01 });
}


And use this for CacheString
    
private byte[] CacheString(string Text)
{
Debug.SetMemory(0x2100000, Encoding.ASCII.GetBytes(Text + "\0"));
byte[] result = new byte[4];
Thread.Sleep(50);
Debug.GetMemory(0x2105000, result);
return result;
}

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo