Modern Warfare 3 - Buttons Monitoring All Clients

Statut
N'est pas ouverte pour d'autres réponses.

FM|T iMCSx

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

MADE BY iMCSx

Comme j'ai déjà expliqué la plupart des choses a propos de ce code pour Black Ops 2 ICI je ne vais pas m'attardé encore ici , mais juste je tiens a dire que Black Ops 2 et MW3 sont assez différent , j'ai changer le g_entity & également les uints des bouttons (valeur Uint32 Brute).

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 - www.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 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 !");
		}
	}
}


Cette méthode fonctionne pour tout les Call of duty , vous devez juste changer le g_entity entièrement (si différent) et les valeurs des buttons (si différent aussi) et donc voici en cadeau un code pour contrôlé les bouttons d'autres call of duty :

Code:
uint client0 = DetectButton(0);
if (client0 != 00000000)
MessageBox.Show("Value: " + client0.ToString());

Credit : Im A Hooker , pour son code de base release sur xbox mw2 (Se7ensins).

N'oubliez pas d'aller voir celui pour Black Ops 2 assez détaillé ICI ,

Amusez vous bien :D
 
Merci du partage :)
 
Merci pour ce partage ;)
 
CS est la ! :D
 
:modo: :neo:
 
Merci du partage! :ok:
 
Merci Bah Bravo Morray ;D
 
Statut
N'est pas ouverte pour d'autres réponses.
Retour
Haut