Post: [Updated/1.10] Hud Elements
03-05-2014, 03:55 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); I updated hud elements today aswell. It's everything you need for a mod menu now. Goodluck!

These scripts were originally Bad Luck Brians for 1.05, I don't use my hud elements like this so yeah... here you go.

Thanks to Shark the ppc is fixed :p


Hud Elements 1.10

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

ELEM = 0xD87888, //patched
FIX_ELEM = 0x335c7,
FPS = 0x36B260,

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 void Enable_Cacher()
{
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 });
}


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


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 = HElems.ELEM + ((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.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(0)));
PS3.SetMemory(elem + HElems.relativeOffset, ReverseBytes(BitConverter.GetBytes(0)));
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);


}

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



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 = HElems.ELEM + ((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(0))));
PS3.SetMemory(elem + HElems.relativeOffset, ReverseBytes(BitConverter.GetBytes(0)));
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;
}

}


And before you people flame and say I got this from someone else, I didn't, Bad Luck Brian Taught me how to update them from 1.06. I did this on my own, except the offsets for the hud struct :p

Credits:
    
Bad Luck Brian - Teaching PPC, and how to cache strings
Shark - Fixing PPC Bug :p
SC58
Me - Updating from 1.07 to 1.10


Here is everything for you to make a mod menu

You must login or register to view this content.
You must login or register to view this content.
Last edited by Black Panther ; 04-04-2014 at 11:27 AM. Reason: Updated to 1.10

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

Dannie Fresh, ResistTheJamsha, M-alShammary, Mango_Knife, Notorious, xProvXKiller, RatchetBooty, SnaY, Taylors Bish, Winter, x_action_x, xHostModer
03-05-2014, 03:58 AM #2
Nice Release !

The following user thanked Restart for this useful post:

03-05-2014, 04:24 AM #3
Winter
Purple God
Thanks Happy
03-05-2014, 12:42 PM #4
Originally posted by Winter View Post
Thanks Happy


Np :p
03-05-2014, 12:46 PM #5
ZeiiKeN
Group 935
Level_locals_t = 0xD92F84,
LevelTime = Level_locals_t + 0x540,

Credits:

Seb and therifboy for offset 1.07
me for update
03-05-2014, 12:47 PM #6
Originally posted by ZeiiKeN View Post
Level_locals_t = 0xD92F84,
LevelTime = Level_locals_t + 0x540,

Credits:

Seb and therifboy for offset 1.07
me for update


I already had it but thanks lol
03-05-2014, 02:04 PM #7
xHostModer
Little One
Hey U Got Skype? I Need Some Help. If u can help me add (imhacking---)
03-05-2014, 02:06 PM #8
Originally posted by xHostModer View Post
Hey U Got Skype? I Need Some Help. If u can help me add (imhacking---)

Cant help you atm at school
03-05-2014, 03:43 PM #9
Originally posted by AlmightySo View Post
I updated hud elements today aswell. It's everything you need for a mod menu now. Goodluck!

These scripts were originally Bad Luck Brians for 1.05, I don't use my hud elements like this so yeah... here you go.

Hud Elements 1.09

    
public static class Hud
{
public static class HElems
{
public static uint

ELEM = 0xD86E08,
FIX_ELEM = 0x00033227,
FPS = 0x369070,
G_LocalizedStringIndex = 0x331E0,
xOffset = 0x04,
yOffset = 0x08,
textOffset = 0x40,
fontOffset = 0x24,
fontSizeOffset = 0x14,
colorOffset = 0x30,
relativeOffset = 0x28,
widthOffset = 0x44,
heightOffset = 0x48,
shaderOffset = 0x4C,
GlowColor = 0x8C,
clientOffset = 0x10,
alignOffset = 0x2C;
}
public static void Enable_Cacher()
{
PS3.SetMemory(0x2100000, new byte[32]);
PS3.SetMemory(0x2105000, new byte[32]);
PS3.SetMemory(Hud.HElems.FPS, new byte[] { 0x3C, 0x60, 0x02, 0x10, 0x80, 0x83, 0x00, 0x00, 0x2C, 0x04, 0x00, 0x00, 0x41, 0x82, 0x00, 0x8C, 0x4B, 0xCC, 0xA1, 0x61, 0x3C, 0x80, 0x02, 0x10, 0x90, 0x64, 0x50, 0x00, 0x38, 0x60, 0x00, 0x00, 0x90, 0x64, 0x00, 0x00, 0x48, 0x00, 0x00, 0x74, 0x3B, 0xE4, 0x8F, 0xD4, 0x38, 0x80, 0x00, 0x00 });
PS3.SetMemory(HElems.FIX_ELEM, new byte[] { 0x01 }); //1.09
}
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;
}
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 = HElems.ELEM + ((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.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(0)));
PS3.SetMemory(elem + HElems.relativeOffset, ReverseBytes(BitConverter.GetBytes(0)));
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);
}
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[4];
Thread.Sleep(10);
PS3.GetMemory(0x2105000, ref result);
return result;
}
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 = HElems.ELEM + ((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(0))));
PS3.SetMemory(elem + HElems.relativeOffset, ReverseBytes(BitConverter.GetBytes(0)));
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;
}
}


And before you people flame and say I got this from someone else, I didn't, Bad Luck Brian Taught me how to update them from 1.06. I did this on my own, except the offsets for the hud struct :p

Credits:
    
Bad Luck Brian - Teaching PPC, and how to cache strings
SC58
Me - Updating from 1.07 to 1.09


Here is everything for you to make a mod menu

You must login or register to view this content.
You must login or register to view this content.
You must login or register to view this content.
You must login or register to view this content.

Not hating or anything, but instead of doing Enable_Cacher()
you can do this
public static byte[] CacheString(string Text)
{
byte[] Index = uintBytes(CreateText(Text + "\0"));
return Index;
}
public static byte[] uintBytes(uint input)
{
byte[] data = BitConverter.GetBytes(input);
Array.Reverse(data);
return data;
}
public static uint CreateText(string text)
{
return RPC.Call(G_LocalizedString, text);
}
03-05-2014, 09:19 PM #10
Notorious
Caprisuns Is Back
Originally posted by AlmightySo View Post
I updated hud elements today aswell. It's everything you need for a mod menu now. Goodluck!

These scripts were originally Bad Luck Brians for 1.05, I don't use my hud elements like this so yeah... here you go.

Hud Elements 1.09

    
public static class Hud
{
public static class HElems
{
public static uint

ELEM = 0xD86E08,
FIX_ELEM = 0x00033227,
FPS = 0x369070,
G_LocalizedStringIndex = 0x331E0,
xOffset = 0x04,
yOffset = 0x08,
textOffset = 0x40,
fontOffset = 0x24,
fontSizeOffset = 0x14,
colorOffset = 0x30,
relativeOffset = 0x28,
widthOffset = 0x44,
heightOffset = 0x48,
shaderOffset = 0x4C,
GlowColor = 0x8C,
clientOffset = 0x10,
alignOffset = 0x2C;
}
public static void Enable_Cacher()
{
PS3.SetMemory(0x2100000, new byte[32]);
PS3.SetMemory(0x2105000, new byte[32]);
PS3.SetMemory(Hud.HElems.FPS, new byte[] { 0x3C, 0x60, 0x02, 0x10, 0x80, 0x83, 0x00, 0x00, 0x2C, 0x04, 0x00, 0x00, 0x41, 0x82, 0x00, 0x8C, 0x4B, 0xCC, 0xA1, 0x61, 0x3C, 0x80, 0x02, 0x10, 0x90, 0x64, 0x50, 0x00, 0x38, 0x60, 0x00, 0x00, 0x90, 0x64, 0x00, 0x00, 0x48, 0x00, 0x00, 0x74, 0x3B, 0xE4, 0x8F, 0xD4, 0x38, 0x80, 0x00, 0x00 });
PS3.SetMemory(HElems.FIX_ELEM, new byte[] { 0x01 }); //1.09
}
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;
}
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 = HElems.ELEM + ((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.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(0)));
PS3.SetMemory(elem + HElems.relativeOffset, ReverseBytes(BitConverter.GetBytes(0)));
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);
}
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[4];
Thread.Sleep(10);
PS3.GetMemory(0x2105000, ref result);
return result;
}
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 = HElems.ELEM + ((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(0))));
PS3.SetMemory(elem + HElems.relativeOffset, ReverseBytes(BitConverter.GetBytes(0)));
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;
}
}


And before you people flame and say I got this from someone else, I didn't, Bad Luck Brian Taught me how to update them from 1.06. I did this on my own, except the offsets for the hud struct :p

Credits:
    
Bad Luck Brian - Teaching PPC, and how to cache strings
SC58
Me - Updating from 1.07 to 1.09


Here is everything for you to make a mod menu

You must login or register to view this content.
You must login or register to view this content.
You must login or register to view this content.
You must login or register to view this content.


hey how do i fix this? You must login or register to view this content.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo