A Place For Gamers By Gamers


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

#1
 NaViNMoDz

avatar
Premium Member
Premium Member
Here are the HUD elements for the new update! Have fun happy and happy creating!

Credit - PrimeNotorius, BadLuckBrian, Seb5594
SPOILER:
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]);
}
If you've got any questions PM ME grin

View user profile https://sellfy.com/NaViNMoDz

View previous topic View next topic Back to top  Message [Page 1 of 1]


Permissions in this forum:
You cannot reply to topics in this forum

Share URL

URL Direct
BBcode
HTML