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, 12:44 AM #2
xD3VHΛX
Do a barrel roll!
Awsome Smile
07-24-2013, 12:54 AM #3
sniper-4Eye
Gym leader
Great release Choco , like always Winky Winky
07-24-2013, 12:56 AM #4
KeyIsDown is a bit useless for PS3 modding situation, but nice to find this 1 year after xbox lol.

nice job Winky Winky
07-24-2013, 01:09 AM #5
Originally posted by iMaesh4x View Post
KeyIsDown is a bit useless for PS3 modding situation, but nice to find this 1 year after xbox lol.

nice job Winky Winky


KeyIsDown isn't useless, its used to make mod menus. KeyIsDOwn + Hud elems = mod menu :P

The following user thanked Bad Luck Brian for this useful post:

O-H
07-24-2013, 01:15 AM #6
Originally posted by Bad
KeyIsDown isn't useless, its used to make mod menus. KeyIsDOwn + Hud elems = mod menu :P


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

The following 6 users say thank you to iMaesh4x for this useful post:

ResistTheMoon, Choco, FM|T Enstone, iMCSx, therifboy, TheUnexpected
07-24-2013, 01:22 AM #7
Originally posted by Bad
KeyIsDown isn't useless, its used to make mod menus. KeyIsDOwn + Hud elems = mod menu :P



waiting for your mod menu :vince:
good luck
07-24-2013, 01:34 AM #8
MoTmrD
Banned
Nice Job Choco
07-24-2013, 01:39 AM #9
Where do I get the pkg download for 1.13? I cant find it anywhere. and eboots ....
07-24-2013, 03:53 AM #10
Choco
Respect my authoritah!!
Originally posted by GoHarD
Where do I get the pkg download for 1.13? I cant find it anywhere. and eboots ....


You must login or register to view this content.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo