PS3 Updated Ghosts 1.13 HUD elements

  • 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.

Nostafaru

Moderating the Crunch Bunch.
Retired Staff
Community Elite
Community Veteran
Determined Poster
Active Member
Console ID Poster
Apr 6, 2014
2,020
1,783
443
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 * 0xb8); 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 * 0xb8)); 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) * 0xb8); 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) * 0xb8); 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;
}

}

Happy Coding! :p

Credits: iTnDM

Bad Luck Brian
 

ShutTheCrunchUp

Guess who's back, back again
Retired Staff
Community Veteran
Determined Poster
Active Member
Console ID Poster
Apr 11, 2014
1,068
1,089
398
General chit-chat
Help Users
  • @ QM|T_JinX:
    the best thing to do is message younis for things like that we super mod cant do that
  • @ danielpadilla1999:
    Alright. Could you let him know to do it, please?
  • @ danielpadilla1999:
    You do not have permission to view this page or perform this action.
  • @ QM|T_JinX:
    ok i will send younis message in your name not sure if he will do things like that just letting you know
  • @ danielpadilla1999:
    Thank you very much mate
  • @ QM|T_JinX:
    np
  • @ QM|T_JinX:
    can i ask you why you want the account deleted or rest ? you can just not log in anymore and be done with it right ?
  • Chat Bot:
    Lindows has joined the room.
  • Chat Bot:
    HalfDeafGuy is our newest member. Welcome!
  • Chat Bot:
    XKuro_Buuny589 is our newest member. Welcome!
  • Chat Bot:
    webvedha is our newest member. Welcome!
  • @ lurch6661:
    zap zap ill smoke to that
  • @ QM|T_JinX:
    1+ hour the new reveal trailer assassins creed shadows
  • @ lurch6661:
    cool
  • Chat Bot:
    Lindows has joined the room.
  • Chat Bot:
    lechon201 is our newest member. Welcome!
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    Lindows has joined the room.
  • Chat Bot:
    KTLOG is our newest member. Welcome!
  • @ KTLOG:
    yo ***** @Memo
  • @ KTLOG:
    remember me
  • Chat Bot:
    Christo has joined the room.
    Chat Bot: Christo has joined the room.