Post: [RELEASE] Button Monitoring for local clients
03-30-2013, 03:59 AM #1
Choco
Respect my authoritah!!
(adsbygoogle = window.adsbygoogle || []).push({}); Hey everyone,

This is a little something I wrote up a while back, and since not a whole lot has been happening with this game I figured I'd release it. It only works for local clients, which means that it will only work for you any split screen players attached to you. This is for version 1.08; if future updates come out I will update it.

This is the function in C#, you can add it to your RTE program or whatever, but remember for this code to work, you must have the ps3tmapi_net.dll included as a reference in your program (read about it You must login or register to view this content.).

    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)(0xEF37EC + (buttonIndex << 4) + (client * 0x112Cool Man (aka Tustin)), ref key);
Array.Reverse(key);
return BitConverter.ToInt32(key, 0) == 1;
}



Here's a little example of how it can be used:

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



Here's a list of all the button indexes that can be used:

    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



Credits: Treyarch for their Key_Down function :p


Have fun guys, hopefully this will lead to some new stuff.
(adsbygoogle = window.adsbygoogle || []).push({});

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

Anera, BadChoicesZ, BuC-ShoTz, Capo837, Chxii, FM|T Enstone, FM|T xDevOpS, GaMeRGiRL_2310, Guzman, Iventory || RGFR, KCxFTW, Mango_Knife, riggstq, Master Ro, ICS Vortex, SC58, Slice, Taylor, TheJaRniBoi, Zack.
03-30-2013, 04:06 AM #2
Guzman
Versace Versace
Thanks Happy
03-30-2013, 04:31 AM #3
primetime43
Knowledge is power Tiphat
Fake and gay. Oh god Choco. haha Happy Nice release man.
03-30-2013, 04:42 AM #4
delete
03-30-2013, 04:52 AM #5
O-H
Bounty hunter
Very nice. I will see what I can do to add this into my tool.
03-30-2013, 05:22 AM #6
ResistArrest
Little One
Very nice.
03-30-2013, 06:43 AM #7
sniper-4Eye
Gym leader
nice release , well done choco Winky Winky
03-30-2013, 08:09 AM #8
BadChoicesZ
I defeated!
RTM just got better :P
03-30-2013, 09:06 AM #9
Iventory || RGFR
Pokemon Trainer
Thank's ! Crédits for 3arc Cool Man (aka Tustin)
03-30-2013, 09:32 AM #10
Zack.
Climbing up the ladder
Originally posted by Choco View Post
Hey everyone,

This is a little something I wrote up a while back, and since not a whole lot has been happening with this game I figured I'd release it. It only works for local clients, which means that it will only work for you any split screen players attached to you. This is for version 1.08; if future updates come out I will update it.

This is the function in C#, you can add it to your RTE program or whatever, but remember for this code to work, you must have the ps3tmapi_net.dll included as a reference in your program (read about it You must login or register to view this content.).

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

private bool inGame()
{
byte[] isInGame = new byte[4];
PS3TMAPI.ProcessGetMemory(target, PS3TMAPI.UnitType.PPU, processID, 0xFFFFFFFF, 0x1CB45E8, ref isInGame);
return BitConverter.ToInt32(isInGame, 0) == 1;
}



Here's a little example of how it can be used:

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



Here's a list of all the button indexes that can be used:

    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



Credits: Treyarch for their Key_Down function :p


Have fun guys, hopefully this will lead to some new stuff.


Nice release man. But I don't know why people call it Real Time Editing.... No point of renaming "Middle Man Attacking".

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo