using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Buttons_Monitoring_All_Clients
{
// Made by iMCSx for Playstation 3.
// Credit to : Im A Hooker (Se7enSins) , for his Xbox Mw2 Release.
// Youtube.com/iMCSx - Nextgenupdate.com - www.FrenchModdingTeam.com
public partial class Form1 : Form
{
// Define Custom Timer (I don't like use this, i use a custom hard way)
// It is ok for test and use for fun
private Timer StartiMCSxButtons = new Timer();
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
public class Buttons
{
//Define Buttons For Modern Warfare 3
public static uint
X = 1024,
O = 512,
Square = 2097152,
L3 = 139264,
R3 = 262144,
L2 = 32768,
R2 = 16384,
Start = 128,
L1 = 2056,
R1 = 65536,
Crouch = 512,
Prone = 256;
}
public class PS3Types
{
// Create Connect Types
public static int StartButton;
public static byte[] BIND = new byte[4];
public static uint[] processIDs;
public static uint ProcessID;
}
public void ConnectAttach()
{
try
{
PS3TMAPI.InitTargetComms();
PS3TMAPI.Connect(0, null);
PS3TMAPI.GetProcessList(0, out PS3Types.processIDs);
ulong uProcess = PS3Types.processIDs[0];
PS3Types.ProcessID = Convert.ToUInt32(uProcess);
PS3TMAPI.ProcessAttach(0, PS3TMAPI.UnitType.PPU, PS3Types.ProcessID);
PS3TMAPI.ProcessContinue(0, PS3Types.ProcessID);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private uint getPlayerState(int clientIndex)
{
// Get the playerState from entities.
byte[] iMCSxDest = new byte[4];
PS3TMAPI.ProcessGetMemory(0, PS3TMAPI.UnitType.PPU, PS3Types.ProcessID, 0, 0x000FCA280 + ((uint)clientIndex * 0x280) + 0x158, ref iMCSxDest);
Array.Reverse(iMCSxDest);
uint Next = BitConverter.ToUInt32(iMCSxDest, 0);
return Next;
}
private uint UseButtonMonitoring(int client)
{
// Get buttons value.
return (getPlayerState(client) + 0x3609);
}
private uint DetectButton(int clientID)
{
// Reverse Byte[] to UInt32 and detect them.
PS3TMAPI.ProcessGetMemory(0, PS3TMAPI.UnitType.PPU, PS3Types.ProcessID, 0, UseButtonMonitoring(clientID), ref PS3Types.BIND);
return System.BitConverter.ToUInt32(PS3Types.BIND, 0);
}
private void button1_Click(object sender, EventArgs e)
{
ConnectAttach(); // Connect First your debug.
StartiMCSxButtons.Interval = 300;
StartiMCSxButtons.Enabled = true;
StartiMCSxButtons.Tick += StartiMCSxButtons_Tick;
StartiMCSxButtons.Start(); // Start Event.
}
private void button2_Click(object sender, EventArgs e)
{
StartiMCSxButtons.Enabled = false;
StartiMCSxButtons.Stop(); // Stop Event.
}
void StartiMCSxButtons_Tick(object sender, EventArgs e)
{
uint client0 = DetectButton(0); // Must be in a loop.
uint client1 = DetectButton(1); // Exemple Other Client
if (client0 == Buttons.X)
MessageBox.Show("Client 0 Press the buttons X !");
if (client0 == Buttons.R1 + Buttons.L1) // Example 2 Buttons Pressed in the same moment.
MessageBox.Show("Client 0 Press the buttons R1 + L1 !");
if (client1 == Buttons.X)
MessageBox.Show("Client 1 Press the buttons X !");
}
}
}
uint client0 = DetectButton(0);
if (client0 != 00000000)
MessageBox.Show("Value: " + client0.ToString());
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Buttons_Monitoring_All_Clients
{
// Made by iMCSx for Playstation 3.
// Credit to : Im A Hooker (Se7enSins) , for his Xbox Mw2 Release.
// Youtube.com/iMCSx - Nextgenupdate.com - www.FrenchModdingTeam.com
public partial class Form1 : Form
{
// Define Custom Timer (I don't like use this, i use a custom hard way)
// It is ok for test and use for fun
private Timer StartiMCSxButtons = new Timer();
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
public class Buttons
{
//Define Buttons For Modern Warfare 3
public static uint
X = 1024,
O = 512,
Square = 2097152,
L3 = 139264,
R3 = 262144,
L2 = 32768,
R2 = 16384,
Start = 128,
L1 = 2056,
R1 = 65536,
Crouch = 512,
Prone = 256;
}
public class PS3Types
{
// Create Connect Types
public static int StartButton;
public static byte[] BIND = new byte[4];
public static uint[] processIDs;
public static uint ProcessID;
}
public void ConnectAttach()
{
try
{
PS3TMAPI.InitTargetComms();
PS3TMAPI.Connect(0, null);
PS3TMAPI.GetProcessList(0, out PS3Types.processIDs);
ulong uProcess = PS3Types.processIDs[0];
PS3Types.ProcessID = Convert.ToUInt32(uProcess);
PS3TMAPI.ProcessAttach(0, PS3TMAPI.UnitType.PPU, PS3Types.ProcessID);
PS3TMAPI.ProcessContinue(0, PS3Types.ProcessID);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private uint getPlayerState(int clientIndex)
{
// Get the playerState from entities.
byte[] iMCSxDest = new byte[4];
PS3TMAPI.ProcessGetMemory(0, PS3TMAPI.UnitType.PPU, PS3Types.ProcessID, 0, 0x000FCA280 + ((uint)clientIndex * 0x280) + 0x158, ref iMCSxDest);
Array.Reverse(iMCSxDest);
uint Next = BitConverter.ToUInt32(iMCSxDest, 0);
return Next;
}
private uint UseButtonMonitoring(int client)
{
// Get buttons value.
return (getPlayerState(client) + 0x3609);
}
private uint DetectButton(int clientID)
{
// Reverse Byte[] to UInt32 and detect them.
PS3TMAPI.ProcessGetMemory(0, PS3TMAPI.UnitType.PPU, PS3Types.ProcessID, 0, UseButtonMonitoring(clientID), ref PS3Types.BIND);
return System.BitConverter.ToUInt32(PS3Types.BIND, 0);
}
private void button1_Click(object sender, EventArgs e)
{
ConnectAttach(); // Connect First your debug.
StartiMCSxButtons.Interval = 300;
StartiMCSxButtons.Enabled = true;
StartiMCSxButtons.Tick += StartiMCSxButtons_Tick;
StartiMCSxButtons.Start(); // Start Event.
}
private void button2_Click(object sender, EventArgs e)
{
StartiMCSxButtons.Enabled = false;
StartiMCSxButtons.Stop(); // Stop Event.
}
void StartiMCSxButtons_Tick(object sender, EventArgs e)
{
uint client0 = DetectButton(0); // Must be in a loop.
uint client1 = DetectButton(1); // Exemple Other Client
if (client0 == Buttons.X)
MessageBox.Show("Client 0 Press the buttons X !");
if (client0 == Buttons.R1 + Buttons.L1) // Example 2 Buttons Pressed in the same moment.
MessageBox.Show("Client 0 Press the buttons R1 + L1 !");
if (client1 == Buttons.X)
MessageBox.Show("Client 1 Press the buttons X !");
}
}
}
uint client0 = DetectButton(0);
if (client0 != 00000000)
MessageBox.Show("Value: " + client0.ToString());
[COLOR=#000000]private uint getPlayerState(int clientIndex)
{
// Get the playerState from entities.
byte[] iMCSxDest = new byte[4];
PS3TMAPI.ProcessGetMemory(0, PS3TMAPI.UnitType.PPU, PS3Types.ProcessID, 0, 0x000FCA280 + ((uint)clientIndex * 0x280) + 0x158, ref iMCSxDest);
Array.Reverse(iMCSxDest);
uint Next = BitConverter.ToUInt32(iMCSxDest, 0); return Next;
}[/COLOR][COLOR=#000000]
[/COLOR]
Copyright © 2024, NextGenUpdate.
All Rights Reserved.