View Full Version: Button Commands

CheatSync.net Forums > Cheat Device Development > Button Commands


Title: Button Commands
Description: how to make button cheats


Freestyle - October 13, 2007 07:40 PM (GMT)
These are the simple button commands to work with the Cheatdevice.

Button commands:

CTRL_SELECT

CTRL_LTRIGGER

CTRL_HOME

CTRL_START

CTRL_RTRIGGER

CTRL_VOLUP

CTRL_UP

CTRL_TRIANGLE

CTRL_VOLDOWN

CTRL_RIGHT

CTRL_CIRCLE

CTRL_SCREEN

CTRL_DOWN

CTRL_CROSS

CTRL_NOTE

CTRL_LEFT

CTRL_SQUARE

Button variables:

buttons - the current button state
press - the button state once when first pressed, otherwise 0
pressslow - button press with slow auto-repeat
pressmed - button press with medium auto-repeat
pressfast - button press with fast auto-repeat
xstick - the position of the analog stick from -1.0 to 1.0
ystick - the position of the analog stick from -1.0 to 1.0

To Make a cheat like this work you must put:

Here's a example of a working button cheat ( Making the money go up to 99999 by simply activating up )

Shown here is the buttons curent state: Witch means one pressed the money will calculate up to 99999.

#cheat make money go up to 99999
if(buttons & CTRL_UP)
{
setint(0x08bde55c, 99999);
}

and you could put other button variables in such as :

Again, pressfast = button press with fast auto-repeat.

#cheat make money go up to 99999
if(pressfast & CTRL_UP)
{
setint(0x08bde55c, 99999);
}

You could also use :

press - the button state once when first pressed, otherwise 0
pressslow - button press with slow auto-repeat
pressmed - button press with medium auto-repeat

Shown like this :

#cheat make money go up to 99999
if(press & CTRL_UP)
{
setint(0x08bde55c, 99999);
}

#cheat make money go up to 99999
if(presslow & CTRL_UP)
{
setint(0x08bde55c, 99999);
}

#cheat make money go up to 99999
if(pressmed & CTRL_UP)
{
setint(0x08bde55c, 99999);
}

Here is Edison Carters Rocket Boost Cheat Show with the CROSS button command:

#cheat Rocket Boost 4
if (buttons & CTRL_CROSS)
{
boost = 4.0;
thrust = boost * 0.00333;

// velocity = velocity + forward vector * thrust
setfloat(pcar + 0x0140, getfloat(pcar + 0x0140) + getfloat(pcar + 0x0010) * thrust);
setfloat(pcar + 0x0144, getfloat(pcar + 0x0144) + getfloat(pcar + 0x0014) * thrust);
setfloat(pcar + 0x0148, getfloat(pcar + 0x0148) + getfloat(pcar + 0x0018) * thrust);

// rotational control
setfloat(pcar + 0x0078, -0.03 * xstick);
}

Thank you guys and happy cheat making!




Hosted for free by InvisionFree