You are viewing our Forum Archives. To view or take place in current topics click here.
#11. Posted:
Status: Offline
Joined: Apr 29, 201113Year Member
Posts: 1,044
Reputation Power: 42
Status: Offline
Joined: Apr 29, 201113Year Member
Posts: 1,044
Reputation Power: 42
Hey thanks for this im gunu try now
- 0useful
- 0not useful
#12. 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
hacksorce wrote I'm going to be starting up a video series on how to make an all client menu on mw2. The first video in this series is just about setting up everything, enjoy. I will also update this thread with all new videos that I make.
The second video:
nice tutorial whens next part out ?
- 0useful
- 0not useful
#13. Posted:
Status: Offline
Joined: Aug 17, 201212Year Member
Posts: 132
Reputation Power: 8
Status: Offline
Joined: Aug 17, 201212Year Member
Posts: 132
Reputation Power: 8
[quote="RGHJTAGZ"]
The new video is out now
also note on the third video I forgot to add the scrolling text on the newsbar. If you want to add scrolling text you can look at the source that I posted and update it from there.http: //pasteb in.com/XQP9UM3s
hacksorce wrote -snip-
The new video is out now
also note on the third video I forgot to add the scrolling text on the newsbar. If you want to add scrolling text you can look at the source that I posted and update it from there.http: //pasteb in.com/XQP9UM3s
- 0useful
- 0not useful
#14. Posted:
Status: Offline
Joined: Jul 23, 201113Year Member
Posts: 3,869
Reputation Power: 174
Status: Offline
Joined: Jul 23, 201113Year Member
Posts: 3,869
Reputation Power: 174
[quote="hacksorce"]
RGHJTAGZ wroteI have a problem. when i make the class for "HUD" and i copy and paste the codes in. Everything that starts with "Jtag" has an error. I have XRPC as reference and everything in my main project that starts with Jtag works.hacksorce wrote -snip-
The new video is out now
also note on the third video I forgot to add the scrolling text on the newsbar. If you want to add scrolling text you can look at the source that I posted and update it from there.http: //pasteb in.com/XQP9UM3s
- 0useful
- 0not useful
#15. Posted:
Status: Offline
Joined: Feb 05, 201212Year Member
Posts: 682
Reputation Power: 36
[quote="Dvar"]
hacksorce wroteDid you put this in the hud class new XRPC Jtag = new XRPC()RGHJTAGZ wroteI have a problem. when i make the class for "HUD" and i copy and paste the codes in. Everything that starts with "Jtag" has an error. I have XRPC as reference and everything in my main project that starts with Jtag works.hacksorce wrote -snip-
The new video is out now
also note on the third video I forgot to add the scrolling text on the newsbar. If you want to add scrolling text you can look at the source that I posted and update it from there.http: //pasteb in.com/XQP9UM3s
- 0useful
- 0not useful
#16. Posted:
Status: Offline
Joined: Jul 23, 201113Year Member
Posts: 3,869
Reputation Power: 174
Status: Offline
Joined: Jul 23, 201113Year Member
Posts: 3,869
Reputation Power: 174
[quote="rghmodz"]
Dvar wroteYea here is what i get when i hover over one of the errors. "An object reference is required for the non-static field, method, or property XRPC_Mod_Menu.HUD.Jtag" it sounds like i need the reference but i already do. I follow the tut exactly. Maybe it is the version i am using i am using 2012 what one are you using?hacksorce wroteDid you put this in the hud class new XRPC Jtag = new XRPC()RGHJTAGZ wroteI have a problem. when i make the class for "HUD" and i copy and paste the codes in. Everything that starts with "Jtag" has an error. I have XRPC as reference and everything in my main project that starts with Jtag works.hacksorce wrote -snip-
The new video is out now
also note on the third video I forgot to add the scrolling text on the newsbar. If you want to add scrolling text you can look at the source that I posted and update it from there.http: //pasteb in.com/XQP9UM3s
- 0useful
- 0not useful
#17. Posted:
Status: Offline
Joined: Aug 17, 201212Year Member
Posts: 132
Reputation Power: 8
Status: Offline
Joined: Aug 17, 201212Year Member
Posts: 132
Reputation Power: 8
[quote="Dvar"][quote="rghmodz"][quote="Dvar"][quote="hacksorce"]
you need to make the fields not static like the error said, or just copy this.
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 uint createElem(int client)
{
return Jtag.Call(HElems.elem, client, 0);
}
public uint spawnElem(int client, uint elemAddress)
{
Jtag.SetMemory(elemAddress + 0xA8, ReverseBytes(BitConverter.GetBytes(client)));
return elemAddress;
}
public uint createText(string text)
{
return Jtag.Call(HElems.locString, text);
}
public uint getMaterialIndex(string material)
{
return Jtag.Call(HElems.material, material);
}
public byte[] uintBytes(uint input)
{
byte[] data = BitConverter.GetBytes(input);
Array.Reverse(data);
return data;
}
public 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 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 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] });
}
RGHJTAGZ wrotehacksorce wrote -snip-
blah blah blah
you need to make the fields not static like the error said, or just copy this.
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 uint createElem(int client)
{
return Jtag.Call(HElems.elem, client, 0);
}
public uint spawnElem(int client, uint elemAddress)
{
Jtag.SetMemory(elemAddress + 0xA8, ReverseBytes(BitConverter.GetBytes(client)));
return elemAddress;
}
public uint createText(string text)
{
return Jtag.Call(HElems.locString, text);
}
public uint getMaterialIndex(string material)
{
return Jtag.Call(HElems.material, material);
}
public byte[] uintBytes(uint input)
{
byte[] data = BitConverter.GetBytes(input);
Array.Reverse(data);
return data;
}
public 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 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 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] });
}
- 0useful
- 0not useful
#18. Posted:
Status: Offline
Joined: Jan 13, 201311Year Member
Posts: 555
Reputation Power: 24
Status: Offline
Joined: Jan 13, 201311Year Member
Posts: 555
Reputation Power: 24
Biiiiiiiig Tutorial! + Rep!! D
- 0useful
- 0not useful
#19. Posted:
Status: Offline
Joined: Aug 17, 201212Year Member
Posts: 132
Reputation Power: 8
Status: Offline
Joined: Aug 17, 201212Year Member
Posts: 132
Reputation Power: 8
Sh0Xz wrote Biiiiiiiig Tutorial! + Rep!! D
Thanks, and I'm adding more soon.
- 0useful
- 0not useful
#20. Posted:
Status: Offline
Joined: Jan 13, 201311Year Member
Posts: 555
Reputation Power: 24
Status: Offline
Joined: Jan 13, 201311Year Member
Posts: 555
Reputation Power: 24
hacksorce wroteSh0Xz wrote Biiiiiiiig Tutorial! + Rep!! D
Thanks, and I'm adding more soon.
That would be amazing. Great content!
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.