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

Welcome to the discussion thread for developing cheats for VCS. This thread is for technical discussion by cheat developers only. We want to keep this thread clean so it's mostly posts of new cheats and you don't have to wade through pages of non-cheat posts to find them.

 

No cheat requests in this thread! Please respect the rules.

 

Last time I started off with some programming tips, like how floats are formatted, a float conversion utility, a little about hexidecimal and things. Those are at the beginning of the LCS Cheat Dev thread here.

 

The VCS CheatDevice has an extended cheat script interpreter that is compatible with the old cheat language and expands it to include much of the C language. This includes "if" statements, getchar/short/int/float, and sin and cos functions for doing physics calculations. See programming.txt for reference. Many more kinds of cheats are now possible that weren't possible before. You don't have to get into the new C stuff if you don't want to; there's nothing wrong with continuing to make cheats using just the basic commands like before.

 

There are a couple little errors you should watch for. When giving addresses, make sure to include the 0x:

setint(0901234, 0); // WRONG

setint(0x0901234, 0); // correct

 

Second, don't forget the ; semicolon at the end of your statements.

Link to comment
Share on other sites

re-post of cheats from other thread:

 

#cheat Heavy Vic//by vettefan//makes vic really heavy, and capable of smashing through traffic.setfloat(pplayer + 0xD0, 7000000, 10000000);setfloat(pplayer + 0x128, 0, 0);#offsetfloat(pplayer + 0xD0, 70, 100);#cheat indestructable cars//by vettefan//cars will not attain any physical damage, or engine damagesetfloat(pcar + 0x0000027C, 1000000000);setfloat(pcar + 0x0000010C, 0);

 

 

also this cheat:

 

#cheat Heavy Carsif (getfloat(pcar+0xD0) <= 50000);{setfloat(pcar+0xD0, getfloat(pcar+0xD0)*1000);setfloat(pcar+0xD4, getfloat(pcar+0xD4)*1000);}#offsetfloat(pcar+0xD0, getfloat(pcar+0xD0)/1000);setfloat(pcar+0xD4, getfloat(pcar+0xD4)/1000);

 

was working a few minutes ago, but now it crashes my game. does it work for anyone else? I don't see why it would crash the game...

 

also can someone test this cheat for me:

 

#cheat turquoise exhaust//by vettefan//not as bright and vibrant of a change as in LCS but it's still noticablesetchar(0x9569b94, 0x00, 0xff, 0xff);

 

I'm not sure if it will work with all versions of the game.

Link to comment
Share on other sites

thats good theres a cheat develop again but ill try the special charater thing again as soon as i get vcs with cheatdevice right now i just got 1.5 and devhook with 2.71 i think all i need 2 do is the switch thing but yeah ill have another game so i can do the switch thing on friday but if any of u know how then let me know so i will b sure thankz and um vette and edison do u guys think there will be a new number for the speacial character cheat

Link to comment
Share on other sites

@vettefan88 your heavy Vic cheat dosent turn off. and when i get in a car the car just drop through the ground. Is there anyway to fix this?

Link to comment
Share on other sites

 

#cheat Lamborghini Doors//By Waterbottle//Ported from vettefan88's version for LCSsetfloat(pcar+0x450, 0, -1.2566371, 0);setfloat(pcar+0x480, 0, -1.2566371, 0);setfloat(pcar+0x4b0, 0, -1.2566371, 0);setfloat(pcar+0x4e0, 0, -1.2566371, 0);

 

 

 

#cheat 999,999,999$setint(0x08bde55c, 999999999, 999999999);

 

 

 

 

#cheat 0$setint(0x08bde55c, 0, 0);

 

 

 

#cheat Locked Car Doors//Ported from theY4Kman's version for LCS.setshort(pcar+0x232, 0x0101);#offsetshort(pcar+0x232, 0);

 

Edited by Waterbottle
Link to comment
Share on other sites

I found the handling.cfg location.

the first thing I'm going to try and do is turn a sandking into a monster truck.

I just need to find the default.ide file for the tire size.

Link to comment
Share on other sites

I found garage codes for first garage.

 

 

#cheat Bobcat in garage//By TSF442//Leave on until garage door opens//all cars are red unless there is a car with another color firstsetint(0x08C739B0, 180);#offsetint(0x08C739B0, 0);#cheat Polaris V8 in garage//By TSF442//Leave on until garage door opens//all cars are red unless there is a car with another color firstsetint(0x08C739B0, 186);#offsetint(0x08C739B0, 0);#cheat Jetski in garage//By TSF442//Leave on until garage door opens//all cars are red unless there is a car with another color firstsetint(0x08C739B0, 233);#offsetint(0x08C739B0, 0);

 

Replace the 180, 186, 233, with vehicle of choice sorry if this has been found already.

 

Tested garage codes only on EU version of the game.

 

link to vehicles list by vettefan88 edited by TSF442

http://www.sendspace.com/file/q2nof9

 

EDIT:Fixed garage codes so it wouldn't lock the garage after using.

 

EDIT2:Got a video

http://img433.imageshack.us/img433/1246/video1vk6.gif

 

EDIT3:Removed link to vehicle list replaced with text file and removed crashing vehicles.

 

EDIT4:Vettefan88 I tested turquoise exhaust and it works on my version of the game(EU)and I would also like to thank you for the vehicle list it came from your post on the cheatsync forums.

Edited by TSF442
Link to comment
Share on other sites

#cheat All Red Baloons Burst. w/ Rewards

address = 0x09f6a200;

for(i=0;i<99;i++) {

setint(address+4*i, 1);

}

setshort(0x08bb3d3c, 99);

off();

 

#cheat NOS

//Hold O while driving to use NOS

if(buttons & CTRL_CIRCLE) {

speed = 0.0;

if(getfloat(pcar+0x140)>0) { speed+=getfloat(pcar+0x140); }

else { speed-=getfloat(pcar+0x140); }

if(getfloat(pcar+0x144)>0) { speed+=getfloat(pcar+0x144); }

else { speed-=getfloat(pcar+0x144); }

if(speed<175/75) {

setfloat(pcar+0x140, getfloat(pcar+0x140)-getfloat(pcar+0x4)*0.005);

setfloat(pcar+0x144, getfloat(pcar+0x144)+getfloat(pcar)*0.005);

}

}

Edited by Waterbottle
Link to comment
Share on other sites

I guess everyone else is enjoying the game instead of making cheats...?

 

Anyways, I've ported Bouncy, edit the 0.8 in the first line to make bouncing higher/lower.

 

#cheat Bouncy!

BounceAmount = 0.8;

rot = getfloat(0x09fc73f0);

setfloat(pplayer + 0x4E4, 150.0);//health

if(getshort(pplayer+0x1C8)!=0x1020) { setfloat(pplayer+0x148,BounceAmount); setshort(pplayer+0x1c8, 0x1020);

if(ystick < -0.5) {

setfloat(pplayer+0x140,getfloat(pplayer+0x10));

setfloat(pplayer+0x144,getfloat(pplayer+0x14));

}

}

if(xstick < -0.5) rot += 2;

if(xstick > 0.5) rot -= 2;

setfloat(pplayer, cos(rot)); setfloat(pplayer+0x4, sin(rot));

setfloat(pplayer+0x10, -sin(rot)); setfloat(pplayer+0x14, cos(rot));

setfloat(0x09fc73f0, rot);

Edited by Waterbottle
Link to comment
Share on other sites

I guess everyone else is enjoying the game instead of making cheats...?

 

Anyways, I've ported Bouncy, edit the 0.8 in the first line to make bouncing higher/lower.

 

#cheat bounce

BounceAmount = 0.8;

rot = getfloat(0x09fc73f0);

setfloat(pplayer + 0x4E4, 150.0);//health

if(getshort(pplayer+0x1C8)!=0x1020) { setfloat(pplayer+0x148,BounceAmount); setshort(pplayer+0x1c8, 0x1020);

[...]

rampage_ani.gif

 

Yeah I just wanna beat the game first...and get 100%

 

And I gotta learn how to make cheats like that O.O

Link to comment
Share on other sites

Ported Superman too...

 

Controlls, for people that havn't tried it before, X accend, [] decend, Analog Stick rotate and fly forwards, R Move fast.

 

In LCS there were a float in pplayer that stored the players rotation in radians, wern't able to find that in VCS.. So it's a bit messed up when you take off.. But it's the best I'm able to get it with out that value or acos/asin

 

#cheat Superman

//By Waterbottle

rot = getfloat(0x09fc73f0);

pstartfly = getshort(pplayer+0x1C8);

setfloat(pplayer + 0x4E4, 150.0);//health

if(buttons & CTRL_RTRIGGER) speedmult = 1.5; else speedmult = 0.3;

if(buttons & CTRL_CROSS) {

setshort(pplayer+0x1C8, 0x1020);

setfloat(pplayer+0x148, speedmult/2);

}

else if(buttons & CTRL_SQUARE && pstartfly==0x1020) setfloat(pplayer+0x148, -speedmult/2);

else if(pstartfly==0x1020) setfloat(pplayer+0x148, 0);

if(xstick < -0.5 && pstartfly==0x1020) rot += 2;

if(xstick > 0.5 && pstartfly==0x1020) rot -= 2;

if(pstartfly==0x1020) {

setfloat(pplayer, cos(rot)); setfloat(pplayer+0x4, sin(rot));

setfloat(pplayer+0x10, -sin(rot)); setfloat(pplayer+0x14, cos(rot));

}

if(ystick < -0.5 && pstartfly==0x1020) {

setfloat(pplayer+0x140, -sin(rot)*speedmult);

setfloat(pplayer+0x144, cos(rot)*speedmult);

} else if(pstartfly==0x1020) setfloat(pplayer+0x140, 0, 0);

setfloat(0x09fc73f0, rot);

 

 

also

#cheat message

setshort(0x08e90bd8, 1, 'C', 'u', 's', 't','o','m',' ','m','e','s','s','s','a','g','e','!',0);

Edited by Waterbottle
Link to comment
Share on other sites

Please submit these cheats onto CheatSync guys... I've made it so admins and moderators can post the new cheat formats...

Link to comment
Share on other sites

Ha, that bouncy is fun!

 

Here's Rocket Boost from the built in LCS cheat converted to cheat script:

 

 

#cheat Rocket Boost 4if (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 on motorcycles  //if (getshort(pcar + 0x0058) >= 202 && getshort(pcar + 0x0058) <= 210)      setfloat(pcar + 0x0078,  -0.03 * xstick);}

 

Edited by edisoncarter
Link to comment
Share on other sites

Yey.....Thank you so much for bring cheat device back edison. I was starting to get bored with psp untill this came out! Anyways here my first cheat and the first car mod for VCS

 

user posted image

 

#cheat Police Wagon

setchar(0x09ab96e2, 208);

setchar(0x09ab96e3, 63);

setchar(0x09ab96e6, 255);

setchar(0x09ab96e7, 64);

setchar(0x09ab96ea, 128);

setchar(0x09ab96eb, 63);

setchar(0x09ab96f6, 4);

setchar(0x09ab96f7, 63);

setchar(0x09ab96fa, 254);

setchar(0x09ab96fb, 62);

setchar(0x09ab99fe, 5);

setchar(0x09ab9a2e, 4);

setchar(0x09abe776, 64);

setchar(0x09abe777, 65);

setchar(0x09abe88e, 3);

setchar(0x09abe8be, 3);

setchar(0x09abf746, 64);

setchar(0x09abf747, 65);

setchar(0x09abf85e, 3);

setchar(0x09ac2bce, 4);

setchar(0x09ac2bfe, 4);

setchar(0x09abd5ae, 4);

Link to comment
Share on other sites

 

ok now if i wanted to make cheats what would i have to do/learn or read. (a tutorial anywhere)

Read ade's faq for lcs in the LCS section. I recommend starting with stat cheats (amount of mission atempts etc, those are the easiest cheats to find)

 

@matt, I'm impressed...

Edited by Waterbottle
Link to comment
Share on other sites

I found always bleeding

 

#cheat always bleeding

setchar(pplayer+0x1cb, 0x3f);

#off

setchar(pplayer+0x1cb, 0x0);

 

 

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);}

 

Edited by edisoncarter
Link to comment
Share on other sites

 

Invisible Jetpack.  Works similar to San Andreas.

 

 

Awesome, but is that not similar to super jump?

 

EDIT: nvm I see you can strafe.

Link to comment
Share on other sites

that invisible jet-pack cheat it awesome, I need to think of somethign like that to make.

 

I tried making a simple script that would increase, and decrease the RGB values of a car so that it looked like it was pulsating, but it would go through the loop once, and then change quickly to a red color, then go through the loop again.

 

I'm not sure what wasn't workign with it, since it should of worked. I thinjk it had something to do with the red variable, but I couldn't find it, since the way the red worked was identical to the way the Green, and Blue worked.

Link to comment
Share on other sites

After seeing vette's cool disco car cheat, I got this idea to use the car color as an indicator and had to try it:

 

user posted image

 

 

// Thanks to vettefan for car color addresses#cheat Car Color Shows Car Healthhealth = getfloat(pcar+0x027c);if (health >= 990)   setchar(pcar+0x224, 0, 180, 0);else if (health >= 650)   setchar(pcar+0x224, 255 * (1000 - health) / 350, 255, 0);else if (health >= 300)   setchar(pcar+0x224, 255, 255 * (health - 300) / 350, 0);else if (health >= 280)   setchar(pcar+0x224, 128, 0, 0);else   setchar(pcar+0x224, 0, 0, 0);

 

 

Wonder what else we could use car color to indicate? How close you are to something?

 

Edit:

Turns black just before it's ready to explode:

 

 

// Thanks to vettefan for car color addresses#cheat Your Car Turns Black Before Explodinghealth = getfloat(pcar+0x027c);if (health < 300)   setchar(pcar+0x224, 0, 0, 0);

 

 

Edited by edisoncarter
Link to comment
Share on other sites

cookie.gifcookie.gifcookie.gif OMG you have to do one for speed. Then when we reach 88 mph...

 

holy sh*t I just had an epiphany... All those time travel cheats I had to synchronize with the right button imput can be done automatically now with these scripts... darn. If only I knew how to make them...I'll figure it out.

 

Oh yeah and the turqoise exaust works perfectly, vette. I'm using the EU version.

Edited by Wesyeed
Link to comment
Share on other sites

yep and i got a quick question im kinda behind becuse my psp got kinda messed up but i just need 2 know how 2 put cheats on the cheatdevice cuz i cant find it and i dont know how 2 get it either my fault about this but i kinda need 2 know this thankz 4 the help

Link to comment
Share on other sites

Questions to Edison Carter

 

Can you create 3 Codes for the 3 Weapon Button Codes, that i dont have to enter them always manually? Or is it possible to make a "Equip all Weapons-Code" (All (every single) Weapons at the same Time)???

 

Can you create the Wanted modify-Code like in LCSCD.. (Manual adjust Wanted Level)??

Can you create a Weather modify-Cheat (Manual adjusting)??

Can you create a Time Loop Code (When it turns Dark, the Time skips a few Hours, that it turns Dawn)???

Can you create a Brightness adjust (Manually) Code to turn the game brighter than Full Brightness (For Outdoor use)???

Can you create a code for more Blood coming out of Enemys when shooting them?

What about a Crazy Limbs Code like in GTA III??

 

Greetings

Link to comment
Share on other sites

Here's edisoncarters Rocket Boost from the built in LCS cheat. i made boost 1.2 and 3,the boost 4 was to fast.boost 1 is fun with the moped cool.gif

 

 

by edisoncarter edited by lordmetal

#cheat Rocket Boost 3

if (buttons & CTRL_CROSS)

{

boost = 3.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 on motorcycles

//if (getshort(pcar + 0x0058) >= 202 && getshort(pcar + 0x0058) <= 210)

setfloat(pcar + 0x0078, -0.03 * xstick);

}

 

by edisoncarter edited by lordmetal

#cheat Rocket Boost 2

if (buttons & CTRL_CROSS)

{

boost = 2.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 on motorcycles

//if (getshort(pcar + 0x0058) >= 202 && getshort(pcar + 0x0058) <= 210)

setfloat(pcar + 0x0078, -0.03 * xstick);

}

 

by edisoncarter edited by lordmetal

#cheat Rocket Boost 1

if (buttons & CTRL_CROSS)

{

boost = 1.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 on motorcycles

//if (getshort(pcar + 0x0058) >= 202 && getshort(pcar + 0x0058) <= 210)

setfloat(pcar + 0x0078, -0.03 * xstick);

}

 

 

Link to comment
Share on other sites

I've been doing this manually because I don't like to play in the dark. This is better.

 

 

#cheat Skip Nighttimeif (getchar(0x08bb3b40) >= 18 || getchar(0x08bb3b40) <= 5)   setchar(0x08bb3b40, 6, 0);

 

Link to comment
Share on other sites

I made a slight update to my NOS cheat

 

//By Waterbottle//press O to use NOS//press R to use power break (stops you immediatly)//Also did so if you press L then NOS won't work, so it dosn't affect drive by's.#cheat Nitrous Oxide v.2if(buttons & CTRL_CIRCLE && !(buttons & CTRL_LTRIGGER)) {//calculate speedspeed = sqrt(getfloat(pcar + 0x140) * getfloat(pcar + 0x140) + getfloat(pcar + 0x144) * getfloat(pcar + 0x144));//thanks to edison.//if speed is lower than max speed for NOS accelerateif(speed<1.8) {setfloat(pcar+0x140,  getfloat(pcar+0x140)-getfloat(pcar+0x4)*0.005);setfloat(pcar+0x144,  getfloat(pcar+0x144)+getfloat(pcar)*0.005);}}//Power Brake if vehicle is on groundif(buttons & CTRL_RTRIGGER && getshort(pcar+0x1c8)==0) {setfloat(pcar+0x140,  0,  0);}

 

 

Tried to make a remote controll ped cheat,

wasn't my most succesfull cheat ever, but it works, kindof

 

//By Waterbottle//aim at a ped and press /\ to take controll of it//when you are in controll of a ped you can rotate it with the analog stick (if a ped wants to go somewhere elsethan you want then it will look a bit weird, but you can still controll it)//use analog upwards to move it forward//Trianlge were supposed to make the ped leave or enter a vehivle, but it only works for leaving vehicles//press and hold L+R alittle while to kill the ped you are in controll of#cheat remote controll pedaddress = 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);   }//kill pedif(press & CTRL_LTRIGGER && press & CTRL_RTRIGGER) rot = 0;if(buttons & CTRL_LTRIGGER && buttons & CTRL_RTRIGGER) {rot+=25;if(rot>2000) { setfloat(address+0x4e4, 0); setint(0x09fc73f8, 0); }}//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);}

 

 

finally I made a very small update to edisons jetpack cheat, with this you don't have to jump before using the jetpack

 

// By Edison Carter// 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) {  setshort(pplayer+0x1c8, 0x1020);      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);}

 

Edited by Waterbottle
Link to comment
Share on other sites

Nice one Waterbottle, that's a major advancement to be able to locate a ped in memory and do things to it. That opens up a lot of possibilities!

 

You should add a comment that it requires CD version 2.1 or higher for the EU version of the game. After another version or two you won't need to do that anymore.

 

 

I added min and max functions in (edit: correction) the next version after version 2.1. They can take any number of parameters and the parameters can be floats or ints, it doesn't matter. Some examples:

 

min(1, 2);

min(1.0, 2.0);

min(1, 2.0); // it's OK to mix float and int

max(1, 2, 3, 4, 5); // any number of parameters

 

 

There's a feature that's been in since 2.0 that I forgot about that's kind of obscure. There is one case where you can declare a variable. If you need a static variable, that is a variable you declare without assigning to it, you can declare it like this:

 

static varname;

 

Its initial value will be zero. One use for this would be a flag for something you want to do only once:

 

 

static fInit;if (!fInit){  fInit = true;  // do something just once}

 

Edited by edisoncarter
Link to comment
Share on other sites

so I guess those static variables can be used for the storing of position and what not, instead of having to store them in an empty part of memory...?

 

Also the side missions poping up when I were scrolling through the cheat list were annoying me.. alot, so:

 

#cheat disable side missions

setchar(0x09f69054, 1);

#off

setchar(0x09f69054, 0);

 

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

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.