Quantcast

Jump to content

» «
Photo

Cheat Development

1,555 replies to this topic
edisoncarter
  • edisoncarter

    Goon

  • Members
  • Joined: 16 Dec 2004

#1

Posted 02 November 2006 - 05:04 AM

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.

vettefan88
  • vettefan88

    just call me vette

  • Members
  • Joined: 11 Dec 2005

#2

Posted 02 November 2006 - 05:20 AM

re-post of cheats from other thread:
CODE
#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);
#off
setfloat(pplayer + 0xD0, 70, 100);

#cheat indestructable cars
//by vettefan
//cars will not attain any physical damage, or engine damage
setfloat(pcar + 0x0000027C, 1000000000);
setfloat(pcar + 0x0000010C, 0);


also this cheat:
CODE
#cheat Heavy Cars
if (getfloat(pcar+0xD0) <= 50000);
{
setfloat(pcar+0xD0, getfloat(pcar+0xD0)*1000);
setfloat(pcar+0xD4, getfloat(pcar+0xD4)*1000);
}
#off
setfloat(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:
CODE
#cheat turquoise exhaust
//by vettefan
//not as bright and vibrant of a change as in LCS but it's still noticable
setchar(0x9569b94, 0x00, 0xff, 0xff);

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

makaveli 7
  • makaveli 7

    rebel

  • Members
  • Joined: 13 Dec 2005

#3

Posted 02 November 2006 - 06:02 AM

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

DXT
  • DXT

    Player Hater

  • Members
  • Joined: 11 Oct 2006

#4

Posted 02 November 2006 - 07:41 AM

@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?

Waterbottle
  • Waterbottle

    second daughter of my father's sister anne marit

  • Members
  • Joined: 29 Jun 2004

#5

Posted 02 November 2006 - 10:23 PM Edited by Waterbottle, 02 November 2006 - 11:08 PM.

CODE
#cheat Lamborghini Doors
//By Waterbottle
//Ported from vettefan88's version for LCS
setfloat(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);


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



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


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

vettefan88
  • vettefan88

    just call me vette

  • Members
  • Joined: 11 Dec 2005

#6

Posted 02 November 2006 - 11:14 PM

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.

TSF442
  • TSF442

    Player Hater

  • Members
  • Joined: 13 Oct 2006

#7

Posted 02 November 2006 - 11:50 PM Edited by TSF442, 03 November 2006 - 04:48 AM.

I found garage codes for first garage.

CODE
#cheat Bobcat in garage
//By TSF442
//Leave on until garage door opens
//all cars are red unless there is a car with another color first
setint(0x08C739B0, 180);
#off
setint(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 first
setint(0x08C739B0, 186);
#off
setint(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 first
setint(0x08C739B0, 233);
#off
setint(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.images...6/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.

Waterbottle
  • Waterbottle

    second daughter of my father's sister anne marit

  • Members
  • Joined: 29 Jun 2004

#8

Posted 03 November 2006 - 06:36 PM Edited by Waterbottle, 03 November 2006 - 09:12 PM.

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

Waterbottle
  • Waterbottle

    second daughter of my father's sister anne marit

  • Members
  • Joined: 29 Jun 2004

#9

Posted 04 November 2006 - 01:29 PM Edited by Waterbottle, 04 November 2006 - 01:52 PM.

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

Jérémie Blanc
  • Jérémie Blanc

    Mack Pimp

  • Members
  • Joined: 22 Jan 2005

#10

Posted 04 November 2006 - 01:46 PM

QUOTE (Waterbottle @ Nov 4 2006, 09:29)
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

Waterbottle
  • Waterbottle

    second daughter of my father's sister anne marit

  • Members
  • Joined: 29 Jun 2004

#11

Posted 04 November 2006 - 02:24 PM Edited by Waterbottle, 04 November 2006 - 03:44 PM.

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

ADePSP
  • ADePSP

    A wonderful drug dealin' theathin' murderer...

  • Members
  • Joined: 25 Nov 2005

#12

Posted 04 November 2006 - 06:07 PM

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

edisoncarter
  • edisoncarter

    Goon

  • Members
  • Joined: 16 Dec 2004

#13

Posted 04 November 2006 - 07:46 PM Edited by edisoncarter, 04 November 2006 - 07:51 PM.

Ha, that bouncy is fun!

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

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

matt420bad
  • matt420bad

    Mark Chump

  • Members
  • Joined: 16 Jan 2006

#14

Posted 04 November 2006 - 08:17 PM

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

TSF442
  • TSF442

    Player Hater

  • Members
  • Joined: 13 Oct 2006

#15

Posted 05 November 2006 - 03:05 AM

#cheat Spin Car
setchar(pcar + 0x5C3, 0xFF);

Makes you car spin really fast and go high in the air.

DXT
  • DXT

    Player Hater

  • Members
  • Joined: 11 Oct 2006

#16

Posted 05 November 2006 - 07:46 AM

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

Waterbottle
  • Waterbottle

    second daughter of my father's sister anne marit

  • Members
  • Joined: 29 Jun 2004

#17

Posted 05 November 2006 - 11:51 AM Edited by Waterbottle, 05 November 2006 - 11:55 AM.

QUOTE (DXT @ Nov 5 2006, 07:46)
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...

KermitTheMan
  • KermitTheMan

    Player Hater

  • Members
  • Joined: 04 Nov 2006

#18

Posted 05 November 2006 - 06:45 PM

I found always bleeding

#cheat always bleeding
setchar(pplayer+0x1cb, 0x3f);
#off
setchar(pplayer+0x1cb, 0x0);


edisoncarter
  • edisoncarter

    Goon

  • Members
  • Joined: 16 Dec 2004

#19

Posted 06 November 2006 - 12:26 AM Edited by edisoncarter, 06 November 2006 - 01:22 AM.

Invisible Jetpack. Works similar to San Andreas.

user posted image

user posted image

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

sum1isweird
  • sum1isweird

    Abnormal Cheater

  • Members
  • Joined: 28 Jan 2005

#20

Posted 06 November 2006 - 02:49 AM

QUOTE (edisoncarter @ Nov 5 2006, 16:26)
Invisible Jetpack.  Works similar to San Andreas.


Awesome, but is that not similar to super jump?

EDIT: nvm I see you can strafe.

vettefan88
  • vettefan88

    just call me vette

  • Members
  • Joined: 11 Dec 2005

#21

Posted 06 November 2006 - 03:31 AM

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.

edisoncarter
  • edisoncarter

    Goon

  • Members
  • Joined: 16 Dec 2004

#22

Posted 06 November 2006 - 05:28 AM Edited by edisoncarter, 06 November 2006 - 05:39 AM.

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

CODE
// Thanks to vettefan for car color addresses
#cheat Car Color Shows Car Health
health = 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:

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


Wesyeed
  • Wesyeed

    Internet brat

  • Members
  • Joined: 03 Dec 2005

#23

Posted 06 November 2006 - 06:57 AM Edited by Wesyeed, 06 November 2006 - 07:20 AM.

cookie.gif cookie.gif cookie.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.

makaveli 7
  • makaveli 7

    rebel

  • Members
  • Joined: 13 Dec 2005

#24

Posted 06 November 2006 - 07:07 AM

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

mcshortcut
  • mcshortcut

    Player Hater

  • Members
  • Joined: 17 Jan 2006

#25

Posted 06 November 2006 - 12:39 PM

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

lordmetal
  • lordmetal

    Player Hater

  • Members
  • Joined: 26 Jan 2006

#26

Posted 06 November 2006 - 03:21 PM

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


edisoncarter
  • edisoncarter

    Goon

  • Members
  • Joined: 16 Dec 2004

#27

Posted 06 November 2006 - 04:25 PM

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

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

Waterbottle
  • Waterbottle

    second daughter of my father's sister anne marit

  • Members
  • Joined: 29 Jun 2004

#28

Posted 06 November 2006 - 04:43 PM Edited by Waterbottle, 06 November 2006 - 04:45 PM.

I made a slight update to my NOS cheat
CODE

//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.2
if(buttons & CTRL_CIRCLE && !(buttons & CTRL_LTRIGGER)) {
//calculate speed
speed = 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 accelerate
if(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 ground
if(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
CODE

//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 ped
address = getint(0x09fc73f8);//read the address of the ped you controll
if(address!=0) {//if you have controll of a ped
//variables for ped
rot = getfloat(0x09fc73c8);
pedx = getfloat(0x09fc73e0);
pedy = getfloat(0x09fc73e4);

//set peds position and rotation
setfloat(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));

//movement
if(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 ped
if(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 vehicele
if(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
CODE
// 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);
}

edisoncarter
  • edisoncarter

    Goon

  • Members
  • Joined: 16 Dec 2004

#29

Posted 06 November 2006 - 05:59 PM Edited by edisoncarter, 06 November 2006 - 06:21 PM.

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:

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

Waterbottle
  • Waterbottle

    second daughter of my father's sister anne marit

  • Members
  • Joined: 29 Jun 2004

#30

Posted 06 November 2006 - 06:33 PM

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




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users