• Hello Guest! Welcome to ConsoleCrunch, to help support our site check out the premium upgrades HERE! to get exclusive access to our hidden content.
  • Unable to load portions of the website...
    If you use an ad blocker addon, you should disable it because it interferes with several elements of the site and blocks more than just adverts.
  • Read Rules Before Posting Post Virus Scans with every program.

PS3 Ghost 1.12 HUD Elements

Chris

ROKETO PAAAAAAAAAAAAAANCH!
Retired Staff
Determined Poster
Active Member
Here are the HUD elements for the new update! Have fun :) and happy creating!

Credit - PrimeNotorius, BadLuckBrian, Seb5594

public class Addresses
{
public static UInt32
G_HudElems = 0xD87808,
G_LocalizedStringIndex = 0x33580;
}
public class HElems
{
public static UInt32
type = 0x0,
X = 0x4,
Y = 0x8,
Z = 0xC,
clientIndex = 0x10,
FontSize = 0x14,
fromFontScale = 0x18,
fontscaletime = 0x1C,
Font = 0x24,
allign = 0x28,
allignOrg = 0x2C,
color = 0x30,
fromColor = 0x34,
fadeStartTime = 0x38,
fadeTime = 0x3C,
text = 0x42,
Width = 0x46,
Heigth = 0x4A,
MaterialIndex = 0x4E,
fromWidth = 0x50,
fromHeigth = 0x54,
scaleStartTime = 0x58,
scaleTime = 0x5C,
fromY = 0x60,
fromX = 0x64,
fromAlignOrg = 0x68,
fromAlignScreen = 0x6C,
moveStartTime = 0x70,
moveTime = 0x74,
time = 0x78,
duration = 0x7C,
sort = 0x88,
glowColor = 0x8C,
fxBirthTime = 0x90,
fxLetterTime = 0x94,
fxDecayStartTime = 0x98,
fxDecayDuration = 0x9C,
soundID = 0xA0,
flags = 0xA4,
clientOffset = 0xA8,
HudsLength = 0xB8;
}
private static UInt32 HudElem_Alloc()
{
for (Int32 i = 0; i < 1024; i++)
{
UInt32 address = (Addresses.G_HudElems + ((UInt32)i * 0xB8));
if (PS3.GetMemory(address, 4)[3] == 0)
{
PS3.SetMemory(address + HElems.type, new Byte[0xB8]);
return address;
}
}
return 0;
}
public static UInt32 SetShader(Int32 clientIndex, Object Material, Int16 width, Int16 height, Single x, Single y, Int32 r = 255, Int32 g = 255, Int32 b = 255, Int32 a = 255)
{
UInt32 Element = HudElem_Alloc();
Byte[] HudElement = new Byte[HElems.HudsLength];
ArrayBuilder BuildElem = new ArrayBuilder(HudElement);
BuildElem.Write.SetInt32((Int32)HElems.type, 4);
if (Material is String)
BuildElem.Write.SetInt16((Int32)HElems.MaterialIndex, GetMaterialIndex((String)Material));
else
BuildElem.Write.SetInt32((Int32)HElems.MaterialIndex - 2, Convert.ToInt32(Material));
BuildElem.Write.SetFloat((Int32)HElems.X, x);
BuildElem.Write.SetFloat((Int32)HElems.Y, y);
BuildElem.Write.SetInt16((Int32)HElems.Width, width);
BuildElem.Write.SetInt16((Int32)HElems.Heigth, height);
BuildElem.Write.SetInt32((Int32)HElems.clientOffset, clientIndex);
BuildElem.Write.SetBytes((Int32)HElems.color, new Byte[] { (Byte)r, (Byte)g, (Byte)b, (Byte)a });
PS3Lib.Extention.WriteBytes(Element, HudElement);
return Element;
}
public static UInt32 SetText(Int32 clientIndex, String Text, Byte Font, Double FontSize, Single x, Single y, Int32 r = 255, Int32 g = 255, Int32 b = 255, Int32 a = 255, Int32 glowr = 255, Int32 glowg = 255, Int32 glowb = 255, Int32 glowa = 0)
{
UInt32 Element = HudElem_Alloc();
Byte[] HudElement = new Byte[HElems.HudsLength];
ArrayBuilder BuildElem = new ArrayBuilder(HudElement);
BuildElem.Write.SetInt32((Int32)HElems.type, 1);
BuildElem.Write.SetInt16((Int32)HElems.text, G_LocalizedStringIndex(Text));
BuildElem.Write.SetInt32((Int32)HElems.Font, Font);
BuildElem.Write.SetFloat((Int32)HElems.FontSize, (Single)FontSize);
BuildElem.Write.SetFloat((Int32)HElems.X, x);
BuildElem.Write.SetFloat((Int32)HElems.Y, y);
BuildElem.Write.SetInt32((Int32)HElems.clientOffset, clientIndex);
BuildElem.Write.SetBytes((Int32)HElems.color, new Byte[] { (Byte)r, (Byte)g, (Byte)b, (Byte)a });
BuildElem.Write.SetBytes((Int32)HElems.glowColor, new Byte[] { (Byte)glowr, (Byte)glowg, (Byte)glowb, (Byte)glowa });
PS3Lib.Extention.WriteBytes(Element, HudElement);
return Element;
}
public static Int16 G_LocalizedStringIndex(String Text)
{
PS3Lib.Extention.WriteByte(Addresses.G_LocalizedStringIndex + 0x48, 0x41);
Int16 StringIndex = (Int16)RPC.Call(Functions.Offsets.G_LocalizedStringIndex, Text);
PS3Lib.Extention.WriteByte(Addresses.G_LocalizedStringIndex + 0x48, 0x40);
return StringIndex;
}
public static void ChangeText(UInt32 Element, String Text)
{
PS3Lib.Extention.WriteInt16(Element + HElems.text, G_LocalizedStringIndex(Text));
}
public static void ChangeAlpha(UInt32 Element, Byte Alpha)
{
PS3Lib.Extention.WriteByte(Element + HElems.color + 3, Alpha);
}
public static void DestroyElement(UInt32 Element)
{
PS3Lib.Extention.WriteBytes(Element, new Byte[HElems.HudsLength]);
}
public static void DestroyAll()
{
for (UInt32 i = 0; i < 1024; i++)
PS3Lib.Extention.WriteBytes(Addresses.G_HudElems + (i * HElems.HudsLength), new Byte[HElems.HudsLength]);
}
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    killa2! is our newest member. Welcome!
  • Chat Bot:
    Christo has joined the room.
  • Chat Bot:
    xperttechy is our newest member. Welcome!
  • Chat Bot:
    burhanpc is our newest member. Welcome!
  • Chat Bot:
    jerpator is our newest member. Welcome!
  • Chat Bot:
    kazuma18 is our newest member. Welcome!
  • Chat Bot:
    kazuma18 has posted a new reply in the thread "Console ID #8660".
  • Chat Bot:
    Blazed420999 is our newest member. Welcome!
  • Chat Bot:
    charlles is our newest member. Welcome!
  • Chat Bot:
    charlles has posted a new reply in the thread "Console ID #8660".
  • Chat Bot:
    CFWMODDINGCEX is our newest member. Welcome!
  • Chat Bot:
    Yote1234 is our newest member. Welcome!
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    Christo has joined the room.
  • Chat Bot:
    Mariglen is our newest member. Welcome!
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    WxRRioR_ is our newest member. Welcome!
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    Pinauz is our newest member. Welcome!
  • Chat Bot:
    派森寒树 is our newest member. Welcome!
  • Chat Bot:
    派森寒树 has left the room.
  • Chat Bot:
    ahagai is our newest member. Welcome!
  • Chat Bot:
    QM|T_JinX has joined the room.
      Chat Bot: QM|T_JinX has joined the room.
      Back
      Top