Post: All Clients Buttons Monitoring (C# / 1.11)
11-02-2013, 04:29 AM #1
seb5594
Proud Former Admin
(adsbygoogle = window.adsbygoogle || []).push({}); Hey NGU Community,

Just a little Release i have seen someone made a Ghetto Function for Buttons Monitoring on 1.00 i will release here a better solution.
Its easy to use and you can use multiple Buttons without doing a Ghetto way for it.

Put this somewhere in your Project

    
public class Buttons
{
public static UInt32
X = 262144,
Square = 805306368,
L1 = 526336,
L2 = 8388608,
L3 = 35651584,
R1 = 16777216,
R2 = 4194304,
R3 = 67108868,
Crouch = 131072,
Prone = 65536,
StartButton = 32768;
}
public Boolean ButtonPressed(UInt32 clientIndex, UInt32 Button)
{
if (BitConverter.ToUInt32(GetBytes(0x00F477B0 + (clientIndex * 0x3700), 4), 0) == Button)
return true;
else return false;
}


    
public byte[] GetBytes(uint address, int length)
{
byte[] buffer = new byte[length];
PS3TMAPI.ProcessGetMemory(0, PS3TMAPI.UnitType.PPU, processID, 0L, (ulong)address, ref buffer);
return buffer;
}


If you are using iMCSx's PS3Lib then you don't need the GetBytes Functions cause it is in the Lib Smile

How you can use it (Use a Timer!)
            private void TestButtons()
{
if (ButtonPressed(0, Buttons.X))
MessageBox.Show("Client 0 Pressed X");
if (ButtonPressed(0,( Buttons.L1 + Buttons.R1)))
MessageBox.Show("Client 0 Pressed L1 + R1");
}


Credits:
seb5594 - Creating this Function
Therifboy - Converting some Button Values
Last edited by seb5594 ; 06-03-2014 at 11:33 AM. Reason: Updated for 1.13

The following 30 users say thank you to seb5594 for this useful post:

-SuperMan, ϟ c0rruption ϟ, AlexNGU, Ansity., Asian, BaSs_HaXoR, EcLiPz_MoDD3Rz, EdiTzZ, EG6, FAKA_ELITE, FusionIsDaName, Gendjisan, iMoDz-Baptiste, iNCSx, iNDMx, ItsLollo1000, lollo1000, M-alShammary, Mx444, Notorious, smashedya, Smexeh, SWAT CLAN, TheFuziioN-, Whos Your Host, Winter, worrorfight, xBeaTzMoDz, xPreeks, ZeiiKeN
11-06-2013, 01:13 AM #11
O-H
Bounty hunter
I have a problem. So here's what I try to do...
You must login or register to view this content.
Once I press the buttons it flashes my background over and over again. Is there a more efficient way of doing this?
11-06-2013, 01:56 AM #12
Originally posted by H View Post
I have a problem. So here's what I try to do...
You must login or register to view this content.
Once I press the buttons it flashes my background over and over again. Is there a more efficient way of doing this?


Its not his fault its mine, i will fix my cache string to a better one so it wont freeze/flash anymore Smile

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

O-H
11-06-2013, 02:25 AM #13
O-H
Bounty hunter
Originally posted by Bad
Its not his fault its mine, i will fix my cache string to a better one so it wont freeze/flash anymore Smile


And bring back the activateindex from your MW3 huds? It was worked very efficiently for me.
11-06-2013, 02:34 AM #14
Originally posted by H View Post
And bring back the activateindex from your MW3 huds? It was worked very efficiently for me.


I will release them as soon as im home Smile

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

O-H
11-06-2013, 06:09 AM #15
Originally posted by seb5594 View Post
Hey NGU Community,

Just a little Release i have seen someone made a Ghetto Function for Buttons Monitoring on 1.00 i will release here a better solution.
Its easy to use and you can use multiple Buttons without doing a Ghetto way for it.

Put this somewhere in your Project

    
public class Buttons
{
public static UInt32
X = 262144,
Square = 805306368,
L1 = 526336,
L2 = 8388608,
L3 = 35651584,
R1 = 16777216,
R2 = 4194304,
R3 = 67108868,
Crouch = 131072,
Prone = 65536,
StartButton = 32768;
}
public Boolean ButtonPressed(UInt32 clientIndex, UInt32 Button)
{
if (BitConverter.ToUInt32(PS3.GetMemory(0xF15E60+ (clientIndex * 0x3580),4),0) == Button)
return true;
else return false;
}


If you don`t have Chocos GetMemory Function then here is it
    
public byte[] GetMemory(uint address, int length)
{
byte[] buffer = new byte[length];
PS3TMAPI.ProcessGetMemory(0, PS3TMAPI.UnitType.PPU, processID, 0L, (ulong)address, ref buffer);
return buffer;
}


How you can use it (Use a Timer!)
            private void TestButtons()
{
if (ButtonPressed(0, Buttons.X))
MessageBox.Show("Client 0 Pressed X");
if (ButtonPressed(0,( Buttons.L1 + Buttons.R1)))
MessageBox.Show("Client 0 Pressed L1 + R1);
}


Credits:
seb5594 - Creating this Function
Therifboy - G_Client Offset and converting some Button Values
Choco - GetMemory Function


Dont think that will work. you have missed something out Seb

{
if (ButtonPressed(0, Buttons.X))
MessageBox.Show("Client 0 Pressed X");
if (ButtonPressed(0,( Buttons.L1 + Buttons.R1)))
MessageBox.Show("Client 0 Pressed L1 + R1); Look on this line
}


{
if (ButtonPressed(0, Buttons.X))
MessageBox.Show("Client 0 Pressed X");
if (ButtonPressed(0,( Buttons.L1 + Buttons.R1)))
MessageBox.Show("Client 0 Pressed L1 + R1"); Fixed :p
}
11-06-2013, 06:17 AM #16
seb5594
Proud Former Admin
Originally posted by Stroudy View Post
Dont think that will work. you have missed something out Seb

{
if (ButtonPressed(0, Buttons.X))
MessageBox.Show("Client 0 Pressed X");
if (ButtonPressed(0,( Buttons.L1 + Buttons.R1)))
MessageBox.Show("Client 0 Pressed L1 + R1); Look on this line
}


{
if (ButtonPressed(0, Buttons.X))
MessageBox.Show("Client 0 Pressed X");
if (ButtonPressed(0,( Buttons.L1 + Buttons.R1)))
MessageBox.Show("Client 0 Pressed L1 + R1"); Fixed :p
}


Thank you I've overlooked it :p
i looked your red marked line 5x to notice it ^^
11-06-2013, 02:41 PM #17
Originally posted by seb5594 View Post
Thank you I've overlooked it :p
i looked your red marked line 5x to notice it ^^

RED? It's pink haha.
I forgot to say nice Thread Seb. And I also need a bit of Help if you don't mind, please can you add my Skype "stroudy.1337" will be much appreciated.
11-09-2013, 04:56 AM #18
seb5594
Proud Former Admin
just updated for 1.03. Enjoy guys :p
11-12-2013, 02:07 PM #19
The client interval is 0x3600 this didnt work till i changed the client interval to 3600 Smile

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo