[RELEASE] Black Ops 2 - Buttons Monitoring All Clients

FM|T iMCSx

French Modding | Team
Premium
Inscription
10 Avril 2013
Messages
69
Réactions
172
Points
2 586
Hello !

MADE BY iMCSx

Aujourd'hui je décide de publié mon travail a propos du buttons monitoring pour all clients.

Ceci va vous permettre de crée vos propres méthodes C# personaliser et les envoyés au clients en jeu (Autres joueurs , bien entendu)

Je partage donc ce petit source code , j'ai écrit un code différent ici parce que il est plus extendu et permet une meilleur compréhension de son comportement.

Donc j'ai utilisé le g_entity pour obtenir les pointeurs du g_client et pour tout les clients par Index (0x31C).

Vous pouvez utiliez directement le g_client avec sa taille de (0x5808) mais ce moyen est bien meilleur pour vous faire comprendre.

je publie aujourd'hui donc ce code pour Black Ops 2 en 1.08 & Modern Warfare 3 en 1.23 car il est aussi déjà release sur xbox (Mw2)

J'utilise ceci depuis un long moment sur Xbox , mais également depuis bien 2 mois sur PS3 ( )
J'espère ceci va aidé des gens a nous crée des nouveaux mods assez épics :D

Facile a mettre a jour , il suffit de trouver l'address du g_entity lors d'une prochaine mise à jour.

Code:
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.French Modding Team.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 Black Ops II
			public static uint
			X = 8192,
			O = 16384,
			Square = 4,
			L3 = 1088,
			R3 = 32,
			L2 = 256,
			R2 = 512,
			L1 = 2147487744,
			R1 = 128,
			Crouch = 16384,
			Prone = 32768;
		}
 
		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, 0x01692dbc + ((uint)clientIndex * 0x31C) + 0x154, ref iMCSxDest);
			Array.Reverse(iMCSxDest);
			uint Next = BitConverter.ToUInt32(iMCSxDest, 0);
			return Next;
		}
 
		private uint UseButtonMonitoring(int client)
		{
			// Get buttons value.
			return (getPlayerState(client) + 0x569C);
		}
 
		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); // Example 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 !");
		}
	}
}

Credit à : Im A Hooker (Se7ensins) pour son release xbox mw2.

Vous pouvez voir quelqu'un " // " dans le code , j'écrit ici pourquoi et comment ça fonctionne sur différente partie , comme j'ai dit j'aime pas utilisé les timers , j'utilise un bon vieux while() avec du code assez complexe , voilà d'ou vient le fait que j'met un timer pour pas vous piqué les yeux.

j'utilise ici les commands PS3TMAPI_NET.dll , mais vous pouvez toujours intégrer ce code a votre code perso , j'ai pas voulu release MAINTENANT mon PS3Lib.dll v2 qui a beaucoup évolué.

A bientôt , et amusez-vous bien dans Visual Studio (Et en jeu :p)
 

Surpass57

VIP
Inscription
18 Décembre 2012
Messages
5 556
Réactions
3 342
Points
18 470
Hello !

MADE BY iMCSx

Aujourd'hui je décide de publié mon travail a propos du buttons monitoring pour all clients.

Ceci va vous permettre de crée vos propres méthodes C# personaliser et les envoyés au clients en jeu (Autres joueurs , bien entendu)

Je partage donc ce petit source code , j'ai écrit un code différent ici parce que il est plus extendu et permet une meilleur compréhension de son comportement.

Donc j'ai utilisé le g_entity pour obtenir les pointeurs du g_client et pour tout les clients par Index (0x31C).

Vous pouvez utiliez directement le g_client avec sa taille de (0x5808) mais ce moyen est bien meilleur pour vous faire comprendre.

je publie aujourd'hui donc ce code pour Black Ops 2 en 1.08 & Modern Warfare 3 en 1.23 car il est aussi déjà release sur xbox (Mw2)

J'utilise ceci depuis un long moment sur Xbox , mais également depuis bien 2 mois sur PS3 ( )
J'espère ceci va aidé des gens a nous crée des nouveaux mods assez épics :D

Facile a mettre a jour , il suffit de trouver l'address du g_entity lors d'une prochaine mise à jour.

Code:
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.French Modding Team.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 Black Ops II
			public static uint
			X = 8192,
			O = 16384,
			Square = 4,
			L3 = 1088,
			R3 = 32,
			L2 = 256,
			R2 = 512,
			L1 = 2147487744,
			R1 = 128,
			Crouch = 16384,
			Prone = 32768;
		}
 
		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, 0x01692dbc + ((uint)clientIndex * 0x31C) + 0x154, ref iMCSxDest);
			Array.Reverse(iMCSxDest);
			uint Next = BitConverter.ToUInt32(iMCSxDest, 0);
			return Next;
		}
 
		private uint UseButtonMonitoring(int client)
		{
			// Get buttons value.
			return (getPlayerState(client) + 0x569C);
		}
 
		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); // Example 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 !");
		}
	}
}

Credit à : Im A Hooker (Se7ensins) pour son release xbox mw2.

Vous pouvez voir quelqu'un " // " dans le code , j'écrit ici pourquoi et comment ça fonctionne sur différente partie , comme j'ai dit j'aime pas utilisé les timers , j'utilise un bon vieux while() avec du code assez complexe , voilà d'ou vient le fait que j'met un timer pour pas vous piqué les yeux.

j'utilise ici les commands PS3TMAPI_NET.dll , mais vous pouvez toujours intégrer ce code a votre code perso , j'ai pas voulu release MAINTENANT mon PS3Lib.dll v2 qui a beaucoup évolué.

A bientôt , et amusez-vous bien dans Visual Studio (Et en jeu :p)
Bravo , merci du partage
 
Haut