You are viewing our Forum Archives. To view or take place in current topics click here.
#11. Posted:
Status: Offline
Joined: Jan 27, 201311Year Member
Posts: 562
Reputation Power: 24
Status: Offline
Joined: Jan 27, 201311Year Member
Posts: 562
Reputation Power: 24
yea i moved it lol then i tryed it agin then its doing this lol
- 0useful
- 0not useful
#12. Posted:
Status: Offline
Joined: Apr 07, 201311Year Member
Posts: 6
Reputation Power: 0
Status: Offline
Joined: Apr 07, 201311Year Member
Posts: 6
Reputation Power: 0
#13. Posted:
Status: Offline
Joined: Feb 28, 201212Year Member
Posts: 1,193
Reputation Power: 2140
Status: Offline
Joined: Feb 28, 201212Year Member
Posts: 1,193
Reputation Power: 2140
#14. Posted:
Status: Offline
Joined: Sep 20, 201212Year Member
Posts: 2,136
Reputation Power: 312
Status: Offline
Joined: Sep 20, 201212Year Member
Posts: 2,136
Reputation Power: 312
Rgh-Xp-Lobby wrote Hi guys im trying to make a hud menu and for some reason ill getting these error's?
Why i did every thing right i think!!
[ Register or Signin to view external links. ]
[ Register or Signin to view external links. ]
who ever helps will get rep
if the errors are with hud emblems use this code
public static class HElems
{
public static uint
locString = 0x8220C838,
material = 0x8220C9F8,
elem = 0x821DF9C0,
xOffset = 0x08,
yOffset = 0x04,
textOffset = 0x84,
fontOffset = 0x28,
fontSizeOffset = 0x14,
colorOffset = 0x34,
relativeOffset = 0x2c,
widthOffset = 0x48,
heightOffset = 0x44,
shaderOffset = 0x4C,
alignOffset = 0x30;
}
public static uint createElem(int client)
{
return Jtag.Call(HElems.elem, client, 0);
}
public static uint spawnElem(int client, uint elemAddress)
{
Jtag.SetMemory(elemAddress + 0xA8, ReverseBytes(BitConverter.GetBytes(client)));
return elemAddress;
}
public static uint createText(string text)
{
return Jtag.Call(HElems.locString, text);
}
public static uint getMaterialIndex(string material)
{
return Jtag.Call(HElems.material, material);
}
public static byte[] uintBytes(uint input)
{
byte[] data = BitConverter.GetBytes(input);
Array.Reverse(data);
return data;
}
public static byte[] ReverseBytes(byte[] inArray)
{
byte temp;
int highCtr = inArray.Length - 1;
for (int ctr = 0; ctr < inArray.Length / 2; ctr++)
{
temp = inArray[ctr];
inArray[ctr] = inArray[highCtr];
inArray[highCtr] = temp;
highCtr -= 1;
}
return inArray;
}
public static void setIcon(uint elem, uint shader, int width, int height, float x, float y, uint align, float sort = 0, int r = 255, int g = 255, int b = 255, int a = 255)
{
Jtag.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x04 });
Jtag.SetMemory(elem + HElems.relativeOffset, uintBytes(0x05));
Jtag.SetMemory(elem + HElems.relativeOffset - 4, uintBytes(0x06));
Jtag.SetMemory(elem + HElems.shaderOffset, uintBytes(shader));
Jtag.SetMemory(elem + HElems.heightOffset, ReverseBytes(BitConverter.GetBytes(height)));
Jtag.SetMemory(elem + HElems.widthOffset, ReverseBytes(BitConverter.GetBytes(width)));
Jtag.SetMemory(elem + HElems.alignOffset, uintBytes(align));
Jtag.SetMemory(elem + HElems.colorOffset, new byte[] { BitConverter.GetBytes(r)[0], BitConverter.GetBytes(g)[0], BitConverter.GetBytes(b)[0], BitConverter.GetBytes(a)[0] });
Jtag.SetMemory(elem + HElems.textOffset + 4, ReverseBytes(BitConverter.GetBytes(sort)));
Jtag.SetMemory(elem + HElems.xOffset, ReverseBytes(BitConverter.GetBytes(x)));
Jtag.SetMemory(elem + HElems.yOffset, ReverseBytes(BitConverter.GetBytes(y)));
}
public static void setText(uint elem, byte[] text, uint font, float fontScale, float x, float y, uint align, int r = 255, int g = 255, int b = 255, int a = 255)
{
Jtag.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x01 });
Jtag.SetMemory(elem + HElems.textOffset, text);
Jtag.SetMemory(elem + HElems.relativeOffset, uintBytes(0x05));
Jtag.SetMemory(elem + HElems.relativeOffset - 4, uintBytes(0x06));
Jtag.SetMemory(elem + HElems.fontOffset, uintBytes(font));
Jtag.SetMemory(elem + HElems.alignOffset, uintBytes(align));
Jtag.SetMemory(elem + HElems.textOffset + 4, new byte[] { 0x40, 0x00 });
Jtag.SetMemory(elem + HElems.fontSizeOffset, ReverseBytes(BitConverter.GetBytes(fontScale)));
Jtag.SetMemory(elem + HElems.xOffset, ReverseBytes(BitConverter.GetBytes(x)));
Jtag.SetMemory(elem + HElems.yOffset, ReverseBytes(BitConverter.GetBytes(y)));
Jtag.SetMemory(elem + HElems.colorOffset, new byte[] { BitConverter.GetBytes(r)[0], BitConverter.GetBytes(g)[0], BitConverter.GetBytes(b)[0], BitConverter.GetBytes(a)[0] });
}
public static void DestroyElems()
{
Jtag.Call(0x821DFAF0);
}
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.