Post: All Clients Button Monitoring (C++)
05-13-2014, 08:22 AM #1
seb5594
Proud Former Admin
(adsbygoogle = window.adsbygoogle || []).push({}); Hey NGU,

I didn't seen anyone releasing any C++ scripts here so i try to bring some more activity in it Smile
For all Connect stuff and Get/Set Memory you can use my Multi RPC Library
Find it here: You must login or register to view this content.
Script has been tested, works without any problems Winky Winky

    
enum Buttons
{
X = 1024,
Square = 32,
L1 = 2048,
L2 = 32768,
L3 = 8194,
R1 = 1,
R2 = 16384,
R3 = 4,
Crouch = 512
};

bool ButtonPressed(INT32 clientIndex, Buttons Btn)
{
BYTE* temp = GetMemory(0x0110D88A + (0x3980 * clientIndex), 2);
std::reverse(temp, temp + 2);
return temp == Btn;
}


Edit: (Added DPADS) //thanks to SC58 for the client_s pointer
    
std::string ReadString(UINT32 Address, INT32 Length)
{
return (reinterpret_cast<const char*>(GetMemory(Address, Length)));
}
enum DPADBtn
{
Up = 15,
Down = 17,
Left = 19,
Right = 21
};
bool DPADPressed(INT32 clientIndex, DPADBtn btn)
{
return atoi(ReadString(0x39a01022 + (clientIndex * 0x68B80)).c_str(), 2) == btn;
}


How to use:
Make a Thread/Timer and put inside as example
    if(ButtonPressed(0, X))
{
MessageBoxA(NULL, "Client 0 Pressed X", "", 0);
}


Enjoy, if you want something in c++ just ask me Smile
(adsbygoogle = window.adsbygoogle || []).push({});

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

FusionIsDaName, ItsLollo1000, MegaMister, Notorious, SnaY, Swaqq, Tustin, Fatality
05-13-2014, 10:35 AM #2
Thanks man. I'm gonna convert all my scripts and stuff for c++ use later today!
05-13-2014, 11:12 AM #3
seb5594
Proud Former Admin
Originally posted by Chief
Thanks man. I'm gonna convert all my scripts and stuff for c++ use later today!


No problem Smile
It won't be hard to convert everything ^^
05-13-2014, 11:14 AM #4
Originally posted by seb5594 View Post
No problem Smile
It won't be hard to convert everything ^^


I know lol. I was having a little trouble with get memory but this helps manSmile

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo