Post: SPRX BO2 1.18 button monitoring pls help!
07-31-2014, 11:46 AM #1
xballox
Pokemon Trainer
(adsbygoogle = window.adsbygoogle || []).push({}); Hi guys, can someone fix my code because my button monitoring code won't work :/

    
namespace Buttons
{
int

DPADUp = 0x34,
DPADDown = 0x38,
DPADLeft = 0x3C,
DPADRight = 0x40;
};

bool ButtonPressed(int Client, int Button)
{
if (*(int*)ReadInt(0xF0A7CC + (Client * 0x580Cool Man (aka Tustin), 1) == Button)
return true;
else return false;
}

void thread_entry(uint64_t arg)
{
for(;Winky Winky
{
if (ButtonPressed(0, Buttons:HappyPADUp) && InGame() == true)
{
G_Client(0, 0x1Cool Man (aka Tustin);
G_Client(0, 0x43C);
}
}
}
(adsbygoogle = window.adsbygoogle || []).push({});
07-31-2014, 12:00 PM #2
1. dpads are like this
    
bool DetectButtonDPAD(int clientIndex, int ActionSlot)
{
int ButtonIndex = *(int*)(0x94641C + ActionSlot);
int B1 = *(int*)Functions::G_Client(clientIndex, 0x56BCool Man (aka Tustin);
int B2 = *(int*)Functions::G_Client(clientIndex, 0x56A0);
if ((B1 == ButtonIndex) || (B2 == ButtonIndex))
return true;
return false;
}

2. use enum :P
    
enum ButtonsDPAD
{
Up = 0x34,
Down = 0x38,
Left = 0x3C,
Right = 0x40
};
07-31-2014, 02:37 PM #3
xballox
Pokemon Trainer
I will try bro really thanks for answer Smile
07-31-2014, 02:49 PM #4
xballox
Pokemon Trainer
visual studio give me the error: identifier g_Clients is undefined
    
enum ButtonsDPAD
{
Up = 0x34,
Down = 0x38,
Left = 0x3C,
Right = 0x40
};

bool DetectButtonDPAD(int clientIndex, int ActionSlot)
{
int ButtonIndex = *(int*)(0x94641C + ActionSlot);
int B1 = *(int*)G_Client(clientIndex, 0x56BCool Man (aka Tustin);
int B2 = *(int*)G_Client(clientIndex, 0x56A0);
if ((B1 == ButtonIndex) || (B2 == ButtonIndex))
return true;
return false;
}





int G_Client(int client, int Mod = 0x00)
{
return 0x1780F28 + (0x5808 * client) + Mod;
}
08-01-2014, 12:12 PM #5
Akaipwn
Do a barrel roll!
    
enum ButtonsDPAD
{
Up = 0x34,
Down = 0x38,
Left = 0x3C,
Right = 0x40
};

int G_Client(int client, int Mod = 0x00)
{
return 0x1780F28 + (0x5808 * client) + Mod;
}

bool DetectButtonDPAD(int clientIndex, int ActionSlot)
{
int ButtonIndex = *(int*)(0x94641C + ActionSlot);
int B1 = *(int*)G_Client(clientIndex, 0x56BCool Man (aka Tustin);
int B2 = *(int*)G_Client(clientIndex, 0x56A0);
if ((B1 == ButtonIndex) || (B2 == ButtonIndex))
return true;
return false;
}


You can't access functions that are below the function that calls for them, so you have to put G_Client function on top of the button monitoring.
08-02-2014, 11:52 PM #6
xballox
Pokemon Trainer
thanks but don't work anymore :Upside Down Happy(
08-03-2014, 02:58 AM #7
c++ works from top to bottom
08-03-2014, 08:35 AM #8
xballox
Pokemon Trainer
yeah, i put my function on top, VS2010 compile it without error but when I try it on my ps3 the dpad monitoring not work :/

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo