Nostafaru
Moderating the Crunch Bunch.
Retired Staff
Community Elite
Community Veteran
Determined Poster
Active Member
Console ID Poster
- Apr 6, 2014
- 2,020
- 1,783
- 443
This is the Local Button Monitoring for call of duyt black ops 1. Happy Coding!
C++
namespace ButtonMonitoring
{
int LocalButtons = 0xd19800;
enum Buttons
{
DpadUp = 0x1FF,
DpadDown = 0x20F,
DpadRight = 0x21F,
DpadLeft = -0xC47E5F,
R3 = 0x1CF,
Square = 0xEF,
Cross = 0xCF,
LeftCursorUp = 0x27F,
LeftCursorLeft = 0x29F,
LeftCursorRight = 0x2AF,
LeftCursorDown = 0x28F,
R2 = 0x1EF,
L2 = 0x1DF,
Select = 0x1AF,
Start = 0x19F
};
bool ButtonPressed(Buttons Button)
{
return (*(int*)(LocalButtons + Button) != 0);
}
}
You can use it like this:
Code:
if (ButtonMonitoring::ButtonPressed(ButtonMonitoring::R3))
{
console_write("R3 has been pressed");
}
C#
private static UInt32 LocalButtons = 0xd19800;
public enum Buttons
{
DpadUp = 0x1FF,
DpadDown = 0x20F,
DpadRight = 0x21F,
DpadLeft = -0xC47E5F,
R3 = 0x1CF,
Square = 0xEF,
Cross = 0xCF,
LeftCursorUp = 0x27F,
LeftCursorLeft = 0x29F,
LeftCursorRight = 0x2AF,
LeftCursorDown = 0x28F,
R2 = 0x1EF,
L2 = 0x1DF,
Select = 0x1AF,
Start = 0x19F
}
public static Boolean ButtonPressed(Buttons Button)
{
return Convert.ToBoolean(PS3.Extension.ReadByte(LocalButtons + (UInt32)Button) == 1);
}
You can use it like this (Use a timer!)
Code:
if (ButtonPressed(Buttons.Cross))
{
MessageBox.Show("Cross Have Pressed!","Success");
}
Vb.Net
Private Shared LocalButtons As UInt32 = &HD19800
Public Enum Buttons
DpadUp = &H1FF
DpadDown = &H20F
DpadRight = &H21F
DpadLeft = -&HC47E5F
R3 = &H1CF
Square = &HEF
Cross = &HCF
LeftCursorUp = &H27F
LeftCursorLeft = &H29F
LeftCursorRight = &H2AF
LeftCursorDown = &H28F
R2 = &H1EF
L2 = &H1DF
Select = &H1AF
Start = &H19F
End Enum
Public Shared Function ButtonPressed(Button As Buttons) As Boolean
Return Convert.ToBoolean(PS3.Extension.ReadByte(LocalButtons + Button) = 1)
End Function
You can use it like this: (Use a timer!)
Code:
If ButtonPressed(Buttons.Cross) Then
MessageBox.Show("Cross Have Pressed!", "Success")
End If
Credits: SC58 For the addresses
C++
namespace ButtonMonitoring
{
int LocalButtons = 0xd19800;
enum Buttons
{
DpadUp = 0x1FF,
DpadDown = 0x20F,
DpadRight = 0x21F,
DpadLeft = -0xC47E5F,
R3 = 0x1CF,
Square = 0xEF,
Cross = 0xCF,
LeftCursorUp = 0x27F,
LeftCursorLeft = 0x29F,
LeftCursorRight = 0x2AF,
LeftCursorDown = 0x28F,
R2 = 0x1EF,
L2 = 0x1DF,
Select = 0x1AF,
Start = 0x19F
};
bool ButtonPressed(Buttons Button)
{
return (*(int*)(LocalButtons + Button) != 0);
}
}
You can use it like this:
Code:
if (ButtonMonitoring::ButtonPressed(ButtonMonitoring::R3))
{
console_write("R3 has been pressed");
}
C#
private static UInt32 LocalButtons = 0xd19800;
public enum Buttons
{
DpadUp = 0x1FF,
DpadDown = 0x20F,
DpadRight = 0x21F,
DpadLeft = -0xC47E5F,
R3 = 0x1CF,
Square = 0xEF,
Cross = 0xCF,
LeftCursorUp = 0x27F,
LeftCursorLeft = 0x29F,
LeftCursorRight = 0x2AF,
LeftCursorDown = 0x28F,
R2 = 0x1EF,
L2 = 0x1DF,
Select = 0x1AF,
Start = 0x19F
}
public static Boolean ButtonPressed(Buttons Button)
{
return Convert.ToBoolean(PS3.Extension.ReadByte(LocalButtons + (UInt32)Button) == 1);
}
You can use it like this (Use a timer!)
Code:
if (ButtonPressed(Buttons.Cross))
{
MessageBox.Show("Cross Have Pressed!","Success");
}
Vb.Net
Private Shared LocalButtons As UInt32 = &HD19800
Public Enum Buttons
DpadUp = &H1FF
DpadDown = &H20F
DpadRight = &H21F
DpadLeft = -&HC47E5F
R3 = &H1CF
Square = &HEF
Cross = &HCF
LeftCursorUp = &H27F
LeftCursorLeft = &H29F
LeftCursorRight = &H2AF
LeftCursorDown = &H28F
R2 = &H1EF
L2 = &H1DF
Select = &H1AF
Start = &H19F
End Enum
Public Shared Function ButtonPressed(Button As Buttons) As Boolean
Return Convert.ToBoolean(PS3.Extension.ReadByte(LocalButtons + Button) = 1)
End Function
You can use it like this: (Use a timer!)
Code:
If ButtonPressed(Buttons.Cross) Then
MessageBox.Show("Cross Have Pressed!", "Success")
End If
Credits: SC58 For the addresses