Jump to content

Cheat Development


edisoncarter
  • Replies 1.6k
  • Created
  • Last Reply

Top Posters In This Topic

  • Vicecitystories

    188

  • creeepers

    160

  • vettefan88

    156

Top Posters In This Topic

Recommended Posts

 

also I've been meaning to ask someone.. what does the "?:" opperator do? I tried googeling it but didn't get any results confused.gif

It's nasty ass shorthand syntax... It's like an if statement really, here's a definition...

 

?:

Format - expression?true result:false result;

If the expression is true the statement after the question mark and before the colon are executed, otherwise the statement after the colon and before the semicolon are executed

 

e.g.

// assign to min the smallest of a and b

min = (a < b) ? a : b;

 

I personally hate seeing it but some people like it...

ADe

Edited by ADePSP
Link to comment
Share on other sites

Exactly, you should use static for state variables like that instead of using memory.

 

@Waterbottle - it's way easy to make Aim of Death out of your remote control ped, and major fun:

 

user posted image

 

 

#cheat Aim of Death// Target a ped and they die!pped = getint(0x08BA1D70);if (pped != 0)  setfloat(pped + 0x4e4, 0);

 

 

 

There's tons of stuff you can do now that the target ped pointer is found:

 

user posted image

 

 

#cheat Force Push// Target a ped and they go flying!static pdone;pped = getint(0x08BA1D70);if (pped != 0 && pped != pdone){   dx = getfloat(pped + 0x0030) - getfloat(pplayer + 0x0030);   dy = getfloat(pped + 0x0034) - getfloat(pplayer + 0x0034);   setshort(pped + 0x01c8, 0x1020);   setfloat(pped + 0x0140, dx * 0.2);   setfloat(pped + 0x0144, dy * 0.2);   setfloat(pped + 0x0148, (fabs(dx) + fabs(dy)) * 0.05);   pdone = pped;}if (pped == 0){   pdone = 0;}

 

 

 

user posted image

 

 

#cheat Tractor Beam// Target a ped to pull them towards youpped = getint(0x08BA1D70);if (pped != 0){   dx = getfloat(pped + 0x0030) - getfloat(pplayer + 0x0030);   dy = getfloat(pped + 0x0034) - getfloat(pplayer + 0x0034);   dz = getfloat(pped + 0x0038) - getfloat(pplayer + 0x0038);   setshort(pped + 0x01c8, 0x1020);   setfloat(pped + 0x0140, -dx * 0.05);   setfloat(pped + 0x0144, -dy * 0.05);   setfloat(pped + 0x0148, -dz * 0.05);}

 

Edited by edisoncarter
Link to comment
Share on other sites

That force punch is pretty sweet.

 

mde the first thing with peds that I could think off...

 

//aim at a ped and it start bouncing#cheat bounce pedBounceHeight = 0.4;static add;pped = getint(0x08BA1D70);if(pped) add = pped;if(add) {pedfly = getshort(add+0x1c8);if(pedfly!=0x1020) {setshort(add+0x1c8, 0x1020);setfloat(add+0x148, BounceHeight);}}

 

 

user posted image

Link to comment
Share on other sites

does anybody know how to reverse the result of the tan() function?

 

like how tan(90)=-1.99520041

what would I do to -1.99520041 to get 90 again?

Link to comment
Share on other sites

does anybody know how to reverse the result of the tan() function?

 

like how tan(90)=-1.99520041

what would I do to -1.99520041 to get 90 again?

atan, not supported, yet..

 

I asked edison for it a while back, was a lot of work to implent because it wasn't in the sdk or something...

 

I say we keep pestering him about it till he gives in and makes it tounge.gif

Link to comment
Share on other sites

Wouldn't an all weapons cheat be possible but more like a weapon select you would just have to make sure the player was at the correct weapon slot and then when they pressed up or down it would cycle through the weapons for that slot.

 

Example.

 

if(buttons & CTRL_UP) {

if(getint(address+0xFake)==Fake) setint(address+0xFake,0xFake);

 

I'm pretty sure the weapon addresses have been found there is a cheat that gives you weapons or if you already have weapons it replaces them but I don't know how you would be able to know if the player was on the correct weapon slot I would take a shot at it but I can't play vcs my usbhostfs thing won't work I can't even get normal usb mode to work every time I plug in the usb cable and select usb it just says windows found new hardware hardware installed and ready to use(stupid windows)so I'm stuck for now.

Edited by TSF442
Link to comment
Share on other sites

Wouldn't an all weapons cheat be possible but more like a weapon select you would just have to make sure the player was at the correct weapon slot and then when they pressed up or down it would cycle through the weapons for that slot.

 

Example.

 

if(buttons & CTRL_UP) {

if(getint(address+0xFake)==Fake) setint(address+0xFake,0xFake);

 

I'm pretty sure the weapon addresses have been found there is a cheat that gives you weapons or if you already have weapons it replaces them but I don't know how you would be able to know if the player was on the correct weapon slot I would take a shot at it but I can't play vcs my usbhostfs thing won't work I can't even get normal usb mode to work every time I plug in the usb cable and select usb it just says windows found new hardware hardware installed and ready to use(stupid windows)so I'm stuck for now.

I was just thinking of something like this.

except you would just press left and right to cycle through every weapon in the game.

pressing left and right would cycle through the weapons in a specific slot, then when the end of that weapons slot is reached it'll jump to the next slot., and continue from there.

 

the only problem is, that the weapons won't have any model, or icon until they're fired a couple times. it would be too much of a hassle to have to fire a weapon just to see what it was.

 

it would also have ot be pretty big, to skip all of the unused id's within the weapon range, and to properly match up the correct weaon with the correct slot.

Link to comment
Share on other sites

 

I was just thinking of something like this.

except you would just press left and right to cycle through every weapon in the game.

pressing left and right would cycle through the weapons in a specific slot, then when the end of that weapons slot is reached it'll jump to the next slot., and continue from there.

Well I was thinking you would use left and right to scroll through your weapons till you get to the one you want to change like the handgun then press up or down to cycle through the handguns.

 

oh and about the not being able to know what weapon you have you could just check the current weapon number and then use waterbottles custom message cheat to display the name of the current weapon for a couple seconds.

Edited by TSF442
Link to comment
Share on other sites

Edison, remember your last version for LCS, you had cheats on auto matically??

 

maybe you could impliment a code that automatically turns on the code when the text file is selected? Like we put "#cheat-on" and its on... "#cheat-off", yeah

 

BTW: Nice codes you guys!! youve been pumping them out like MAD!

Edited by xFinch713x
Link to comment
Share on other sites

Invisible Jetpack. Works similar to San Andreas.

 

user posted image

 

user posted image

 

 

// By Edison Carter// jump to get off the ground to start with// same controls as San Andreas#cheat Invisible Jetpack{   dx = 0; dy = 0; dz = 0;   // forward thrust   thrust = -ystick * 0.005;   if (ystick < -0.1 && (buttons & CTRL_CROSS))       thrust = -ystick * 0.024;   dx += getfloat(pplayer + 0x0010) * thrust;   dy += getfloat(pplayer + 0x0014) * thrust;   dz += getfloat(pplayer + 0x0018) * thrust;   // strafe left   if (buttons & CTRL_LTRIGGER)   {       dx += getfloat(pplayer + 0x0000) * -0.00333;       dy += getfloat(pplayer + 0x0004) * -0.00333;       dz += getfloat(pplayer + 0x0008) * -0.00333;   }   // strafe right   if (buttons & CTRL_RTRIGGER)   {       dx += getfloat(pplayer + 0x0000) * 0.00333;       dy += getfloat(pplayer + 0x0004) * 0.00333;       dz += getfloat(pplayer + 0x0008) * 0.00333;   }   // lift   lift = 0.0068;   if (buttons & CTRL_SQUARE)       lift -= 0.007;   if (buttons & CTRL_CROSS)       if (ystick < 0)           lift += (1.0 + ystick) * 0.006;       else           lift += 0.006;   dx += getfloat(pplayer + 0x0020) * lift;   dy += getfloat(pplayer + 0x0024) * lift;   dz += getfloat(pplayer + 0x0028) * lift;   // add vector to velocity   gameplayspeed = getfloat(0x08bb3b58);   setfloat(pplayer + 0x0140, getfloat(pplayer + 0x0140) * (1.0 - 0.02 * gameplayspeed) + dx * gameplayspeed);   setfloat(pplayer + 0x0144, getfloat(pplayer + 0x0144) * (1.0 - 0.02 * gameplayspeed) + dy * gameplayspeed);   setfloat(pplayer + 0x0148, getfloat(pplayer + 0x0148) * (1.0 - 0.05 * gameplayspeed) + dz * gameplayspeed);   // rotational control   setfloat(pplayer + 0x0078, -0.03 * xstick);   // never roll when falling, thanks to theY4Kman   setfloat(pplayer + 0x1C4,  0.0);}

 

Now all you need to do is trick the game into thinking your on the ground so you can shoot.

Link to comment
Share on other sites

I was just thinking of something like this.

except you would just press left and right to cycle through every weapon in the game.

pressing left and right would cycle through the weapons in a specific slot, then when the end of that weapons slot is reached it'll jump to the next slot., and continue from there.

Well I was thinking you would use left and right to scroll through your weapons till you get to the one you want to change like the handgun then press up or down to cycle through the handguns.

 

oh and about the not being able to know what weapon you have you could just check the current weapon number and then use waterbottles custom message cheat to display the name of the current weapon for a couple seconds.

that would still be a huge cheat, and need a lot of programming.

it's not as simple as just telling the game to use the weapon, you have to manually insert those values. and manually switch weapons through code.

Link to comment
Share on other sites

Now all you need to do is trick the game into thinking your on the ground so you can shoot.

nice idea....

 

also, how would i add the tractor beam, force push, and kill ped into one cheat, but by pressing buttons?

 

like hold R and press O to make them die, /\ to make the fly away, and [ ] to make them come closer, thanks for help

Link to comment
Share on other sites

 

I was just thinking of something like this.

except you would just press left and right to cycle through every weapon in the game.

pressing left and right would cycle through the weapons in a specific slot, then when the end of that weapons slot is reached it'll jump to the next slot., and continue from there.

Well I was thinking you would use left and right to scroll through your weapons till you get to the one you want to change like the handgun then press up or down to cycle through the handguns.

 

oh and about the not being able to know what weapon you have you could just check the current weapon number and then use waterbottles custom message cheat to display the name of the current weapon for a couple seconds.

that would still be a huge cheat, and need a lot of programming.

it's not as simple as just telling the game to use the weapon, you have to manually insert those values. and manually switch weapons through code.

I know its not simple but its still not impossible as soon as I can play the game again I will try to take a shot at it although mine will probly only be something like press up or down at any time and it changes all your weapons and displays something like "Weapon Set 1" then "Weapon Set 2" but it would still be handy.

Edited by TSF442
Link to comment
Share on other sites

Now all you need to do is trick the game into thinking your on the ground so you can shoot.

nice idea....

 

also, how would i add the tractor beam, force push, and kill ped into one cheat, but by pressing buttons?

 

like hold R and press O to make them die, /\ to make the fly away, and [ ] to make them come closer, thanks for help

good idea,, then it would be like that telekinines cheat that weve been telling edisoncarter to make since forever, wink.gif

 

 

i really have to get off my bum and make some codes,

but these cheats are so good, its hard to stop playing biggrin.gif

 

 

Link to comment
Share on other sites

Heres another Custom police car. This one took me awile, but I could not finish it. I ran out of pieces before I could put the grill of the car on. So you can kinda see through the front end. But anyway enjoy! biggrin.gif

 

user posted image

 

[/code]

#cheat Custom Police Car

setchar(0x09ab98f4, 4);

setchar(0x09ab8ce4, 22);

setchar(0x09ab8d06, 192);

setchar(0x09ab8d07, 65);

setchar(0x09ab8d0a, 48);

setchar(0x09ab8d0b, 64);

setchar(0x09ab8d16, 4);

setchar(0x09ab8d17, 190);

setchar(0x09ab8d1a, 195);

setchar(0x09ab8d1b, 62);

setchar(0x09ab8d33, 69);

setchar(0x09ab85d6, 192);

setchar(0x09ab85d7, 64);

setchar(0x09abd57e, 1);

setchar(0x09abe82e, 2);

setchar(0x09abe85e, 1);

setchar(0x09abe776, 208);

setchar(0x09abf746, 208);

setchar(0x09abf7fe, 2);

setchar(0x09abf82e, 2);

setchar(0x09abf837, 62);

setchar(0x09abf83b, 62);

setchar(0x09abe867, 62);

setchar(0x09abe86b, 62);

setchar(0x09ac2b9e, 1);

setchar(0x09ac4126, 180);

setchar(0x09ac4127, 62);

setchar(0x09ac412a, 147);

setchar(0x09ac412b, 60);

setchar(0x09ac4c3a, 32);

setchar(0x09ac4c3b, 64);

setchar(0x09ac4c4a, 96);

setchar(0x09ac4c4b, 190);

setchar(0x09ab8d07, 66);

setchar(0x09ab8d1a, 149);

setchar(0x09ab9322, 32);

setchar(0x09ab9357, 0);

setchar(0x09ab935b, 0);

setchar(0x09ab9717, 0);

setchar(0x09ab971b, 0);

setchar(0x09ab96f6, 237);

setchar(0x09ab96f7, 63);

setchar(0x09ab96fa, 236);

setchar(0x09ab96fb, 62);

setchar(0x09ab96e2, 198);

setchar(0x09ab96e3, 63);

setchar(0x09ab96e6, 28);

setchar(0x09ab96e7, 65);

setchar(0x09ab96ea, 0);

setchar(0x09ab96eb, 63);

setchar(0x09ac1a37, 0);

setchar(0x09ac1a3b, 0);

setchar(0x09ac1a07, 0);

setchar(0x09ac1a0b, 0);

setchar(0x09ac19d2, 0);

setchar(0x09ac19d3, 64);

setchar(0x09ac19d6, 128);

setchar(0x09ac19d7, 65);

setchar(0x09ac19da, 16);

setchar(0x09ac19db, 64);

setchar(0x09ac19e6, 152);

setchar(0x09ac19e7, 192);

setchar(0x09ac19ea, 195);

setchar(0x09ac19eb, 62);

Link to comment
Share on other sites

Matt... are you gonna post a way to do this soon? like you did for LCS?

 

but nice, i remember when you did it for LCS, the truck was so kool!

Link to comment
Share on other sites

Now that we've established that they are flyable planes (and a biplane to boot...) in VCS, do you think we can look into options in remaking TheGFCC's 747 code? I mean, it would bring back memories to me.

 

BTW, good work on the ped target cheats. It's amusing as sh*t.

Link to comment
Share on other sites

Hey, I'm pretty new to the cheat maker side of the cheat device. And I'm 17 so I don't exactly have vast knowledge of how things work.

But I started out with things like money and stats which I found easy, then I looked into the radio side of things.

I found things like-

which radio station you are listening to

whether it is radio or custom tracks being played

which custom track you are listening to

and what seems like whether there is fuzz being played (when changing radio stations)

 

I made a cheat where by when you enter a car the radio is auto off, and it cannot be changed by pressing left/right. Although you still hear the fuzz it stays on 'radio off'. (Now that I think I found the fuzz I can put that in too). I know some people dont like the radio and turn it off so it may be ok for them but it isn't a cheat I would use lol.

 

I was thinking from this, is there any way to make a constant radio playing (when not in a vehicle) cheat. Maybe someone has aready done it before, I am not sure.

If it is possible would I need to start comparing captures of being in/out of a car?

Or is there a lot more to it? I thought as you couldn't really use left and right to change radio stations you could change it with a cheat through the hex for the station.

 

By the way, I am having fun with the aiming cheats, thanks for them smile.gif

 

EDIT:

Ok, so I think I jumped in too deep.

I've found

1-radio station you are listening to

2-if custom tracks on/off (radio playing)

3-which custom track is playing

4-radio spool time (i don't know what else to call it. if you set it to 0 it resets the radio station to the begining.)

5-a few station specific values

6-values which change when: in a car with the radio on/in a car with the radio off (this also goes to the same value when out of a car (obviously there is no radio on)). These values are in two places close to eachother, one cannot be changed though. Is there a reason for this?

 

Well, like I said.. I've jumped in too deep.

I'm sure if it was possible it would have been done by now.

Edited by Winchy
Link to comment
Share on other sites

Now all you need to do is trick the game into thinking your on the ground so you can shoot.

nice idea....

 

also, how would i add the tractor beam, force push, and kill ped into one cheat, but by pressing buttons?

 

like hold R and press O to make them die, /\ to make the fly away, and [ ] to make them come closer, thanks for help

good idea.

 

 

/\ punch

X pull

O kill

 

#cheat telekininespped = getint(0x08BA1D70);if(buttons & CTRL_TRIANGLE) {//Force Punch, by edisonstatic pdone;if (pped != 0 && pped != pdone){   dx = getfloat(pped + 0x0030) - getfloat(pplayer + 0x0030);   dy = getfloat(pped + 0x0034) - getfloat(pplayer + 0x0034);   setshort(pped + 0x01c8,  0x1020);   setfloat(pped + 0x0140,  dx * 0.2);   setfloat(pped + 0x0144,  dy * 0.2);   setfloat(pped + 0x0148,  (fabs(dx) + fabs(dy)) * 0.05);   pdone = pped;}if (pped == 0){   pdone = 0;}}if(buttons & CTRL_CROSS) {//Tractor Beam, by edisonif (pped != 0){   dx = getfloat(pped + 0x0030) - getfloat(pplayer + 0x0030);   dy = getfloat(pped + 0x0034) - getfloat(pplayer + 0x0034);   dz = getfloat(pped + 0x0038) - getfloat(pplayer + 0x0038);   setshort(pped + 0x01c8,  0x1020);   setfloat(pped + 0x0140,  -dx * 0.05);   setfloat(pped + 0x0144,  -dy * 0.05);   setfloat(pped + 0x0148,  -dz * 0.05);}}if(buttons & CTRL_CIRCLE) {if (pped != 0)  setfloat(pped + 0x4e4,  0);}

 

Link to comment
Share on other sites

Version 2.1a:

http://www.cheatdevice.com/gta/cheatdevice21a.zip

 

This version is just bugfixes and script language features and fixes. I went ahead and implemented tangent for you guys.

 

tan(degrees);

min(value, ...);

max(value, ...);

sgn(value); // sign function like in BASIC, equals -1 for negative, 1 for positive, 0 for zero

int(value); // converts to integer, example: int(getfloat(...)) % 10

 

I made the time feature lock just the hour, otherwise the sun's brightness flickers. Also a few more teleports, like Sunshine Autos.

Link to comment
Share on other sites

Ok I give up.

I was looking at other things and here are a few locations (I know they are not amazing, but I thought I would share):

 

09A64408-custom tracks/ radio (0A-custom 0B-radio)

098F5950-radio station (00-09)

09A64430-custom track being played

08e8e6B4-radio spool time (00 resets to begining I believe)

 

098FA82A-15 makes your car (and vic inside) invisible, 18 changes it back to visible

(I cannot find the cheat to make vic invisible when not in a vehicle)

user posted image

 

098B52F4-appears to have a few actions,

44=wasted (drown)

43=crashes game

41=busted

40=arms raised

39/3a=wasted (blood/no blood i think)

32=control camera (vic still moves too)

3c=getting thrown out of car animation/hit off bike animation.

2d and 2e=fall/get up

2c=fall to leaf links?

24=cellphone held to ear

18=enter vehicle (as a passenger (someone said this CD works in multiplayer? maybe this lets you jump on a vehicle instead of hitting enemy off))

16=aim

11=fight position/aim?

10= when shooting

 

3d (while in vehicle) then 01= drive without vic in it (camera stays with vic)

user posted image

3d again makes you stand next to vehicle, 3c to stop

user posted image

(it isnt anything good just kinda weird/fun smile.gif)

would there be any way to make the camera go behind the vehicle? Then it would be like having a remote control car smile.gif

 

1e= able to move again when editing it make you stationary

37= when on a vehicle

3d (on bike)= you are in vehicle position, but does not think you are on one. no radio.

 

If there is a way to make yourself busted/wasted/drowned could there be a way to get a mission passed? Like a 'mission skip' cheat.

 

Like I said, there's nothing amazing, but I am learning.

 

 

// by winch

//used chrislawrances cheat for where to look

#cheat Lock Camera

setchar(pplayer + 0x550, 1);

#off

setchar(pplayer + 0x550, 0);

Edited by Winchy
Link to comment
Share on other sites

Ok... i tried to update my money cheat, by making extra button presses, and being able to chage the value you add to your money, but, it didnt work...

 

 

#cheat Change Money v220000 >= val >= 1000val == 1000money = getint(0x08bde55c);{if ((pressslow & CTRL_LTRIGGER)&&(pressslow & CTRL_RIGHT));val + 1000}{if ((pressslow & CTRL_LTRIGGER)&&(pressslow & CTRL_LEFT));val - 1000}{if ((pressslow & CTRL_LTRIGGER)&&(pressslow & CTRL_CROSS));val*2}{if ((pressslow & CTRL_LTRIGGER)&&(pressslow & CTRL_UP));(money + val);}{if ((pressslow & CTRL_LTRIGGER)&&(pressslow & CTRL_DOWN));(money - val);}

 

 

when i tested this, it said there was a problem with the v here>> 20000 >= val >= 1000

 

i dont know what to do, as this is my first try at this complex of a code... complex for me, probably not vette, edison, or waterbottle, but...

 

EDIT:

 

i also added waterbottles control ped to the code you compiled waterbottle, the one with push, pull, and kill, thought it be kool to have the best in one cheat

 

 

#cheat Telekininespped = getint(0x08BA1D70);if(buttons & CTRL_SQUARE) {//Force Punch, by edisonstatic pdone;if (pped != 0 && pped != pdone){  dx = getfloat(pped + 0x0030) - getfloat(pplayer + 0x0030);  dy = getfloat(pped + 0x0034) - getfloat(pplayer + 0x0034);  setshort(pped + 0x01c8,  0x1020);  setfloat(pped + 0x0140,  dx * 0.2);  setfloat(pped + 0x0144,  dy * 0.2);  setfloat(pped + 0x0148,  (fabs(dx) + fabs(dy)) * 0.05);  pdone = pped;}if (pped == 0){  pdone = 0;}}if(buttons & CTRL_CROSS) {//Tractor Beam, by edisonif (pped != 0){  dx = getfloat(pped + 0x0030) - getfloat(pplayer + 0x0030);  dy = getfloat(pped + 0x0034) - getfloat(pplayer + 0x0034);  dz = getfloat(pped + 0x0038) - getfloat(pplayer + 0x0038);  setshort(pped + 0x01c8,  0x1020);  setfloat(pped + 0x0140,  -dx * 0.05);  setfloat(pped + 0x0144,  -dy * 0.05);  setfloat(pped + 0x0148,  -dz * 0.05);}}if(buttons & CTRL_CIRCLE) {if (pped != 0) setfloat(pped + 0x4e4,  0);}//from here down is waterbottleaddress = getint(0x09fc73f8);//read the address of the ped you controllif(address!=0) {//if you have controll of a ped//variables for pedrot = getfloat(0x09fc73c8);pedx = getfloat(0x09fc73e0);pedy = getfloat(0x09fc73e4);//set peds position and rotationsetfloat(address+0x30, pedx);setfloat(address+0x34, pedy);setfloat(address, cos(rot)); setfloat(address+0x4, sin(rot));setfloat(address+0x10, -sin(rot)); setfloat(address+0x14, cos(rot));//movementif(xstick < -0.5) rot += 4;if(xstick > 0.5) rot -= 4;if(ystick < -0.5) {  setfloat(0x09fc73e0, getfloat(address+0x30)-sin(rot)*0.1);  setfloat(0x09fc73e4, getfloat(address+0x34)+cos(rot)*0.1);  }//leave or eneter vehicle, only works for leave vehiceleif(buttons & CTRL_TRIANGLE) {if(getchar(address+0x8c4)==2) setchar(address+0x894,0x10);else setchar(address+0x894,0x12);}setfloat(0x09fc73c8, rot);//if you don't have controll of a ped then check if you want to take controll of one.} else if(getint(0x08BA1D70) && buttons & CTRL_TRIANGLE) {setint(0x09fc73f8, getint(0x08BA1D70));address = getint(0x08BA1D70);setfloat(0x09fc73e0, getfloat(address+0x30));setfloat(0x09fc73e4, getfloat(address+0x34));setfloat(0x09fc73c8, 0);}

 

 

also, what are these codes "coded" in? C/C++? and which ever one, can i have a link to a tutorial to learn it?

Edited by xFinch713x
Link to comment
Share on other sites

Fun with cheats:

Freaky player.

user posted image

You can never fall off you bike well being a passenger.

user posted image

 

Click on pictures to see them as videos.

Edited by TSF442
Link to comment
Share on other sites

how would I run something once at the beginning of a code?

edison posted this:

 

static fInit;

if (!fInit)

{

fInit = true;

// do something just once

}

 

 

but I'm not sure if that's what I'd use, or how to even use it.

I need to take an address and store it to a variable at the beginning of a code, but I only need it to happen once for the cheat to work properly because the variable has to change as the code goes, and if it's constantly resetting the variable it won't work.

Link to comment
Share on other sites

I made a more stable version of the cheat on the first page...

 

#cheat Car goes flipping everytime you press /\

if(press & CTRL_UP)

{

setfloat(pcar + 0x0000010B, +1B);

}

Edited by YGTBK
Link to comment
Share on other sites

The language is a simplified version of C.

 

BTW, watch out for this bug. Don't put a ; after your if statement:

 

if (whatever) <-- don't put a semicolon here

{

stuff;

}

 

 

 

how would I run something once at the beginning of a code?

edison posted this:

 

  static fInit;

  if (!fInit)

  {

    fInit = true;

    // do something just once

  }

 

 

but I'm not sure if that's what I'd use, or how to even use it.

I need to take an address and store it to a variable at the beginning of a code, but I only need it to happen once for the cheat to work properly because the variable has to change as the code goes, and if it's constantly resetting the variable it won't work.

You could use the above code and replace "// do something just once" with whatever it is you want to do once at the beginning like this:

 

static fInit;

if (!fInit)

{

fInit = true;

address = [initial address];

}

 

 

You could also do it like this:

 

static address; // this will start out as zero

if (address == 0)

{

address = [whatever the initial address is];

}

 

Link to comment
Share on other sites

I made a different telekinines, this one works like this, aim at a ped with auto aim to select it, then press down on the d-pad to go into manual aiming, the ped will "fly" after what you're aiming at..

 

also if you hold in X then the ped will spin faster and faster...

 

 

#cheat Telekininespped = getint(0x08BA1D70);static address;static rotsp;if(pped && pped<0x9900000) address=pped;if(address && pped>0x9900000) {x = getfloat(0x08ba1d50) - getfloat(address + 0x30);y = getfloat(0x08ba1d54) - getfloat(address + 0x34);z = getfloat(0x08ba1d58) - getfloat(address + 0x38);setshort(address+0x1c8, 0x1020);setfloat(address + 0x140, x*0.1);setfloat(address + 0x144, y*0.1);setfloat(address + 0x148, z*0.1);if(buttons & CTRL_CROSS)        rotsp+=0.005;  else       rotsp = 0;setfloat(address+0x78, rotsp);}

 

Link to comment
Share on other sites

 

so yeah can someone help me out with my code?

 

ok edison, il get to the books colgate.gif

Your code is a bit insane (in that i'm not completely sure why you have included some lines)... Maybe something like this,

 

 

#cheat Change Money v2val = 1000;money = getint(0x08bde55c);//Check to increase money adjustment valueif ((pressslow & CTRL_LTRIGGER)&&(pressslow & CTRL_RIGHT)){  val = val + 1000;}//Check to decrease money adjustment valueif ((pressslow & CTRL_LTRIGGER)&&(pressslow & CTRL_LEFT)){  val = val - 1000;  if (val < 0) val = 0;}//Check to multiply money adjustment valueif ((pressslow & CTRL_LTRIGGER)&&(pressslow & CTRL_CROSS)){  val = val * 2;}//Add money adjustment value to existing moneyif ((pressslow & CTRL_LTRIGGER)&&(pressslow & CTRL_UP)){  setint(0x08bde55c,money + val);}//Subtract money adjustment value from existing moneyif ((pressslow & CTRL_LTRIGGER)&&(pressslow & CTRL_DOWN)){  setint(0x08bde55c,money - val);}

 

Edited by ADePSP
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.