Post: 1.13 HUD elem offsets (plus some extras)
07-24-2013, 12:37 AM #1
Choco
Respect my authoritah!!
(adsbygoogle = window.adsbygoogle || []).push({}); Just a few offsets for Black Ops II. With these, you should be able to get HUD elements working.


    0x15D5300 - game_hudelem_s * g_hudelems (Length of each elem: 0x8Cool Man (aka Tustin)
0x27562C - int G_LocalizedStringIndex(const char *string) //this is the func that caches strings for use in HUD elems

//and here's some other random stuff

0x16B4D2C - struct gentity_s * g_entities (Length of each entity: 0x31C)
0x177BD30 - gclient_s g_clients (Length of each client: 0x5808. This is commonly referred to as "playerState" or "clientState")
0x34954C - SV_GameSendServerCommand(int clientNum, svscmd_type type, const char *text)
0x276F4C - G_SetModel(gentity_s *ent, const char *modelName)
0x3133E8 - Cbuf_AddText(int localClientNum, const char *text) //this is what I used for my command tool, it's the command execution function
0x1181BC - int Key_IsDown(int localClientNum, int keynum) //for button monitoring



Also, here's a little extra something for you guys. This is my C# button monitoring function (for local clients) updated for 1.13. It's untested, but should work:

    private bool Key_Down(int client, int buttonIndex)
{
if(buttonIndex < 0) return false;
byte[] key = new byte[4];
PS3TMAPI.ProcessGetMemory(target, PS3TMAPI.UnitType.PPU, processID, 0xFFFFFFFF, (ulong)(0xF076BC + (buttonIndex << 4) + (client * 0x112Cool Man (aka Tustin)), ref key);
Array.Reverse(key);
return BitConverter.ToInt32(key, 0) == 1;
}

//example of how to use

private void ExampleFunction()
{
if(Key_Down(0, 0x11))
{
MessageBox.Show("Host is pressing R3!");
}
else
{
MessageBox.Show("Host is not pressing R3!");
}
}


Also, here's all the button indexes for use with Key_Down:

    0x01 - X
0x02 - Circle
0x03 - Square
0x04 - Triangle
0x05 - L1
0x06 - R1
0x0E - Start
0x0F - Select
0x10 - L3
0x11 - R3
0x12 - L2
0x13 - R2
0x14 - Dpad Up
0x15 - Dpad Down
0x16 - Dpad Left
0x17 - Dpad Right




Enjoy everyone Choco
(adsbygoogle = window.adsbygoogle || []).push({});

The following 17 users say thank you to Choco for this useful post:

ResistTheMoon, BadChoicesZ, Bucko, Chxii, ErasedDev, lollo1000, Mango_Knife, NGU-xNiicKzHD, O-H, Raz0rMind, SC58, sniper-4Eye, therifboy, xD3VHΛX, Zwiik, zZHackzZ
07-24-2013, 03:57 AM #11
Originally posted by iMaesh4x View Post
"Learning PPC and C++" If you really learning PPC and C++ you will know that KeyIsDown is LOCAL client only. So yes it would be cool for a engine text menu.

The buttons offset in playerstate is the best to use & it's really easy to find it.

Yes im learning Smile and i just learned something else i guess ^^
07-24-2013, 06:56 AM #12
Originally posted by iMaesh4x View Post
"Learning PPC and C++" If you really learning PPC and C++ you will know that KeyIsDown is LOCAL client only. So yes it would be cool for a engine text menu.

The buttons offset in playerstate is the best to use & it's really easy to find it.


Also , i released the buttons monitoring all clients for 1.08, peoples should just update it...
07-24-2013, 12:46 PM #13
can someone release full hud elements and button monitoring please #d
07-24-2013, 12:53 PM #14
Chxii
Do a barrel roll!
Thanks Choco Like always Smile
07-25-2013, 10:34 PM #15
spoiler alert: if you mod black ops 2 you will get permanently account banned for bo2 :P

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo