VCS Player and Pedestrians

=Player and Pedestrians= Because of the fact that Vic is a pedestrian, pedestrians and Vic have everything in common around the pplayer area, only his data there is edited through the controls. There are a few things (such as what pedestrian Vic is aiming at and more) that are discussed on this page that dwell outside of the pplayer area.

pplayer
-pplayer is a variable declared by the Cheat Device that holds the address to Vic's representing pedestrian object in memory. Likewise, each pedestrian has its own object in memory that represents them - their weapons, health, location, decisions, speed, etc. - everything that makes the pedestrian, well, a pedestrian.

pped
-pped is a general term that was made to represent pedestrians in memory. pped is defined by the cheat writer, and if you look at pretty much any cheat that involves a pedestrian being manipulated, pped is used. pped usually holds the memory address of a pedestrian, and can then be used just like pplayer would.

For example, if you wanted to get the pedestrian that Vic is aiming at you would do... Which could then be used to manipulate the pedestrian.

These two terms will be used to represent Vic (the player) and any pedestrian that might be being manipulated.

=The Breakdown= {| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 17px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Rotation
pplayer or pped + 0x0 float First off, right at pplayer or pped are 3 floats. These represent the right hand vectors of the X, Y, and Z rotations of our pedestrian.
 * }

pplayer or pped + 0x10 float Next are another 3 floats that represent the three forward vectors of X, Y, and Z rotation.

pplayer or pped + 0x20 float And last but not least are another 3 floats that represent up vectors of X, Y, and Z rotation.

More will be added here later on...

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 17px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Location
pplayer or pped + 0x30 float
 * }

+0x30 is by far one of the most commonly used addresses in all cheats. The reason being because it represents the X, Y, and Z location of your pedestrian.

Example: This would set the player's coordinates in game to 0, 0, 0 (X, Y, Z), moving Vic somewhere under Leaf Links. This would not work if the player was in a car.

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Touched
pplayer or pped + 0x4C char/boolean
 * }

Changes to 0x2 when ped is touching something, 0x0 otherwise.

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Object ID
pplayer or pped + 0x56 short
 * }

Most objects in VCS have an ID which is a short at 0x56. This tells the game which model and collision model will be used as well as what voices to use and more. We can use this to identify if the given object is a pedestrian. It is highly reccomended that you do not mess with this, otherwise the game might crash! You can check it, but do not modify it!

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Rotational Speed
pplayer or pped + 0x70 float
 * }

Rotational speed is basically a measure of how fast the pedestrian or other object is spinning. Just like the rotation and location addresses, these go in the order of X, Y, and Z. To rotate a pedestrian in the cardinal directions, you would edit +0x78, the Z axis, because the Z axis manipulates the X and Y axi.

Example: This would, as the cheat's name says, slowly make Vic turn around in place.

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Touch Location
pplayer or pped + 0x80 float
 * }

Seems to display where ped is being touched relative to his position. Has X, Y, and Z but you rarely will see the Z have a non-zero value.

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Object Under
pplayer or pped + 0xF0 int pointer
 * }

This pointer points to the object being stood on by the pedestrian. This could be a car, a road, a building, or anything.

Example: This would instantly remove the object that Vic is standing on by:

getint(pplayer + 0xF0)

getting the address of what the player is standing on...

+ 0x38

adding 0x38 to it to access its Z location...

, -10000.0

and setting this value to -10,000.0, leaving the object 10,000 meters below Vice City!

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Last Object Touched
pplayer or pped + 0xF4 int pointer
 * }

Points to the last object that ped touched.

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Terrain Under
pplayer or pped + 0x137 char
 * }

Changes depending on what terrain you are standing on. Example:

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Directional Speed
pplayer or pped + 0x140 float
 * }

Directional speed is how fast the pedestrian or other object is going on the X, Y, and Z axi. As with the others, this goes in X, Y, Z order. Note that negative and positive values effect which direction you will be going in.

Example: Would cause Vic to fly straight up into the air until his Z speed caught back up with him, causing him to fall back to earth!

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Object Touched
pplayer or pped + 0x150 int pointer
 * }

This pointer points to the object that the pedestrian is touching, whether it be a car, another pedestrian, or an object.

Example: Would cause the first object that Vic touches to be placed 10,000 meters below Vice City.

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Pedestrian on Ground or Not
pplayer or pped + 0x190 char/boolean
 * }

Non-zero if the ped is on land, 0 otherwise.

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Dropping Rate
pplayer or pped + 0x1C4 float
 * }

Represents the acceleration of a ped falling down to earth. Begins at 0 until it slowly reaches 11.0, which it then stays constant until the ped lands.

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Mounted to Ground
pplayer or pped + 0x1C8 short
 * }

If set to 0x1020 the ped is unmounted from the ground, meaning you can use directional speed to move it away from the ground. If you attempt to use directional speed to move it without this short being set correctly it will not leave the ground.

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Ped on Ground/In Air/Landing
pplayer or pped + 0x1C9 char
 * }

Divide by 0x10 and the value below will show if the ped is on the ground, in the air, or landing/rolling after falling.

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Ped Falling in Water
pplayer or pped + 0x1D8 char
 * }

Divide by 0x10 and the value below will show whether or not the ped is falling into water.

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Ped in Water or Not
pplayer or pped + 0x1DB char
 * }

Divide by 0x10 and value below will show whether or not the ped is in water.

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Distance from Car Being Entered
pplayer or pped + 0x420 float
 * }

Gives the distance between the ped and the car it is entering in X, Y, Z order.

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Location of Car Being Entered
pplayer or pped + 0x440 float
 * }

Gives the X, Y, Z coordinates of the car being entered.

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Focus
pplayer or pped + 0x450 int pointer
 * }

This is a pointer to what I like to call the ped's current "focus." This can be the car the ped is getting into, another ped the ped is aiming at, and many other things.

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Occupied Vehicle
pplayer or pped + 0x480 int pointer
 * }

This is a pointer the the vehicle the ped is in, and can be used just like pcar.

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Vehicle Being Entered
pplayer or pped + 0x484 int pointer
 * }

This pointer shows the vehicle that the ped is entering. This must be used in order to make the pedestrian get into a vehicle using the AI commands later in this section.

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Health and Armor
pplayer or pped + 0x4E4 float
 * }

These two floats represent the amount of health and armor the pedestrian has, in that order. If the pedestrian's health reaches 0, regardless of the amount of armor it has, it will die.

Examples:

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Weapon Slots and IDs
pplayer or pped + slot char
 * }

Refer to table below for slot offsets and weapon IDs. This is the char that represents which weapon is in that slot.

pplayer or pped + slot + 0x04 char

Set to the following values depending on what the weapon is doing.

pplayer or pped + slot + 0x08 int

This is the amount of ammo in the ped's current clip.

pplayer or pped + slot + 0x0C int

This is the amount of ammo the ped has for the given weapon.

Each slot is 0x1C bytes in length.

Example:

{| align="center" cellpadding="1" cellspacing="1" class="pbSortable" style="margin: 0px auto;" width="227" Slot/Weapon Offset /Value
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|
 * bgcolor="#dddddd" style="background-color: rgb(221, 221, 221);"|
 * bgcolor="#dddddd" style="background-color: rgb(221, 221, 221);"|

Slot 1 - Fist

 * bgcolor="#dddddd" style="background-color: rgb(221, 221, 221);"|

+ 0x578
0x00 Brass Knuckles
 * Fist
 * Fist
 * 0x01
 * bgcolor="#dddddd" style="background-color: rgb(221, 221, 221);"|
 * bgcolor="#dddddd" style="background-color: rgb(221, 221, 221);"|

Slot 2 - Melee

 * bgcolor="#dddddd" style="background-color: rgb(221, 221, 221);"|

+ 0x594
Butterfly Knife Golf Club Police Batton
 * 0x02
 * 0x03
 * 0x04
 * Knife
 * 0x05
 * Baseball Bat
 * 0x06
 * Hand Axe
 * 0x07
 * Cane
 * 0x08
 * Machete
 * 0x09
 * Katana
 * 0x0A
 * Chainsaw
 * 0x0B
 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|
 * Katana
 * 0x0A
 * Chainsaw
 * 0x0B
 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|
 * 0x0B
 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|
 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|

Slot 3 - Thrown

 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|

+ 0x5B0

 * Grenades
 * 0x0C
 * Remote Grenades
 * 0x0D
 * Landmines
 * 0x0E
 * Empty Slot
 * 0x0F
 * Teargas
 * 0x10
 * Molotov Cocktails
 * 0x11
 * Rocket
 * 0x12
 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|
 * Molotov Cocktails
 * 0x11
 * Rocket
 * 0x12
 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|
 * 0x12
 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|
 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|

Slot 4 - Pistol

 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|

+ 0x5CC

 * Pistol
 * 0x13
 * Equalizer
 * 0x14
 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|
 * 0x14
 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|
 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|

Slot 5 - Shotgun

 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|

+ 0x5E8

 * Shotgun
 * 0x15
 * Spaz 12
 * 0x16
 * Stubby Shotgun
 * 0x17
 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|
 * Stubby Shotgun
 * 0x17
 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|
 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|

Slot 6 - SMG

 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|

+ 0x604

 * Scorpion
 * 0x18
 * Micro SMG
 * 0x19
 * Silent Micro SMG
 * 0x1A
 * SMG
 * 0x1B
 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|
 * SMG
 * 0x1B
 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|
 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|
 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|

Slot 7 - Assault

 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|

+ 0x620

 * M4 Assault Rifle
 * 0x1C
 * AK47
 * 0x1D
 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|
 * 0x1D
 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|
 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|

Slot 8 - Heavy

 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|

+ 0x63C

 * Rocket Launcher
 * 0x20
 * Flamethrower
 * 0x21
 * M60
 * 0x22
 * Minigun
 * 0x23
 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|
 * Minigun
 * 0x23
 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|
 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|
 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|

Slot 9 - Sniper

 * bgcolor="#000000" style="background-color: rgb(221, 221, 221);"|

+ 0x658

 * Sniper Rifle
 * 0x1E
 * Laser Sniper Rifle
 * 0x1F
 * bgcolor="#cccccc" style="background-color: rgb(204, 204, 204);"|
 * 0x1F
 * bgcolor="#cccccc" style="background-color: rgb(204, 204, 204);"|
 * bgcolor="#cccccc" style="background-color: rgb(204, 204, 204);"|

Slot 10 - Tools

 * bgcolor="#cccccc" style="background-color: rgb(204, 204, 204);"|

+ 0x674

 * style=""|Detonator
 * style=""|0x24
 * style=""|Heli Cannon
 * style=""|0x25
 * style=""|Camera
 * style=""|0x26
 * style=""|Binoculars
 * style=""|0x27
 * }
 * style=""|Binoculars
 * style=""|0x27
 * }
 * }

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Closest Ped/Ped to be Aimed At
pplayer or pped + 0x6F8 int pointer
 * }

Pointer to the ped that is closest to the player and the first ped that will be aimed at when the player hits R.

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Aiming Information
pplayer or pped + 0x81C int pointer
 * }

This is a pointer to a) the ped the ped is aiming at or b) where Vic is aiming if he is in manual aim mode. Points to 0x09914520 if in manual aim.

paim = getint(pplayer + 0x81C);

paim + 0x30 float

This is the X, Y, and Z information as to where Vic is aiming if he is in manual aim mode, otherwise it is the location of the ped he is aiming at. This could be used to make a cheat that locks onto things.

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Action Target
pplayer or pped + 0x890 int pointer
 * }

This is a pointer to what I like to call the "Action Target," which is basically the pedestrian's focus. It points to another pedestrian to be used with the AI/Commands in the next section. If you set this to pplayer, then whatever the ped is doing will be focused towards Vic.

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

AI Commands
pplayer or pped + 0x894 char
 * }

This address is still very untested - there are many different things you can do with it, including forcing people in and out of your car, causing people to instantly drop dead, causing people to attack or follow you, etc. The limits are endless, as long as you know what you are doing. Most of these do work with Vic, but not all.

Known values and their effects:
{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Animations and Other Commands
pplayer or pped + 0x8B4 char
 * }

This controls the animation of the pedestrian, making them do different things like drop dead, wave, fall over, etc.

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Movement Information
pplayer or pped + 0x8C4 char
 * }

Displays the following values depending on what the ped is doing.

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Location of Target
pplayer or pped + 0xC80 float
 * }

Displays the location in X, Y, Z order of the ped's target.

=Player-Only Addresses=

{| cellpadding="1" cellspacing="1" class="pbNotSortable" style="width: 942px; height: 19px;"
 * bgcolor="#333333" style="background-color: rgb(51, 51, 51);"|

Player's Target
0x08BA1D70 int pointer This is a pointer to which pedestrian the player is targeting. From VCS Cracked Open
 * }