Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

JernejL

Documenting GTA3/VC memory addresses

Recommended Posts

TwoZero

ok wait, i want to add a digital clock into the speedo, i already did all the grafiks, but now i need the "scm address" of the time smile.gif

Ok.. if you need the memory addresses for time:

Hours: A10B6B Byte

Minutes: A10B92 Byte

Addresses in hex.

Edit: last night I was a bit tired and put dword after minutes, should be bytes, edited now.

 

If you need the SCM command to get the time:

00BF get_current_time $hours $minutes

Edited by TwoZero

Share this post


Link to post
Share on other sites
TwoZero

Double post but got some addresses.

 

On the first page Stretchnutter posted some addresses that control menu related things, well after exploring that part of the memory this is what I found:

 

Menu Addresses:Options > Display:86963A byte Display: HUD Switch869648 DWord Display: Brightness setting (read only)86964C Float Display: Draw Distance (read only)869650 Byte Display: Subtitles switch869651 Byte Display: Map Legend switch869652 Byte Display: Wide Screen switch869655 Byte Display: Frame Limiter switchOption > Sound:869657 Byte Sound: Speaker Configuration setting (0=2 Speakres, 1=Headphones, 2=More then 2 Speakers)869658 Byte Sound: Dynamic Accoustic Modeling switch869659 Byte Sound: SFX Volume (Scale from 1 till 65 (read only))86965A Byte Sound: Music Volume (Scale from 1 till 65 (read only)86965B Byte Sound: Current Radion Station (read only)Options > Language:869680 Byte Language: Currently selected (0=English untill 4=Spanish)Options > Controls:86968B Byte Controls: Current Control (0=Standard, 1=Classic)Map:869670 Float Map: Zoom (normally 0 till 1000, you can set it higher though  )869674 Float Map: X Pos (in pixels)869678 Float Map: Y Pos (in pixels)Misc Menu things:869660 DWord Currently selected item (with green bar)869694 DWord Mouse X Pos in menu (in pixels)869698 DWord Mouse Y Pos in menu (in pixels)

 

I know this is kind of useless, you can just go to the options and change it, but might come in handy for a tool to read from or something.. whatever, I enjoyed searching for it tounge.gif

 

Since a few days I'm doing stuff with memory, I would like to thank ModelingMan for helping me a lot and learning most stuff i know about memory now.

 

We also found a way more addresses about the HUD (delfi posted a few HUD addresses before) we will post them later, we aren't completely done with exploring yet.

Share this post


Link to post
Share on other sites
JernejL
We also found a way more addresses about the HUD (delfi posted a few HUD addresses before) we will post them later, we aren't completely done with exploring yet. 

1. who is we ?

 

2. i think i have covered ALL possible adresses for hud object placement and sizes.

 

3. i am making a hud editor

 

Share this post


Link to post
Share on other sites
TwoZero
1. who is we ?

 

2. i think i have covered ALL possible adresses for hud object placement and sizes.

 

3. i am making a hud editor

1. With "we" I meant ModelingMan and I, I have talked a lot with him lately and we searched together.

 

2. "we" have a list of around the 36 addresses now, that is a lot more then I ever found in this topic, so you might have more but I didn't see it here. I'll make a list and edit my post in a minute.

 

3. That sounds awesome biggrin.gif

Share this post


Link to post
Share on other sites
James Caldwell

Here is the list of HUD addresses that TwoZero and I have found, quite a few of these were also found by Delfi:

 

 

697A68 - HUD Vertical Scale (everything) = Float697A6C - Weapon icon scale (except fist) = Float697A70 - HUD Horizontal Scale (everything) = Float697AA4 - Radardisc Horizontal Scale = Float697AF4 - HUD transparency = Float697B10 - Car/District name distance from right = Float697B14 - Message Box distance from top = Float697B20 - HUD Text horizontal scale (time, money, etc.) = Float697B48 - Format of money ($%08d) = 5 bytes697B50 - HUD text vertical scale = Float697B54 - Money distance from top = Float697B58 - Money distance from right = Float697B5C - Format of Weapon Ammo (%d-%d) = 5 bytes697B64 - Format of Weapon Ammo (%d) = 2 bytes697B68 - Weapon icon scale (all) = Float697B6C - Weapon icon distance from top = Float697B70 - Weapon icon distance from right = Float697B74 - Weapon ammo text vetical scale = Float697B78 - Weapon ammo text distance from top = Float697B7C - Weapon ammo text distance from right = Float697B80 - Format of health and armor (%03d) = 4 bytes697B88 - Health and Armor distance from top = Float697B8C - Health Icon distance from right of Health value = Float697B90 - Armor distance from right = Float697B94 - Armor Icon distance from right of Armor value = Float697B98 - Wanted stars distance from top = Float697B9C - Distance between each Wanted star = Float697BA8 - Unknown Format of something (%s %d -%d-) = 10 bytes697BB4 - Unknown Format of something (%s %d) = 5 bytes697BC4 - Car/District name fade in/out speed (clashes with the next address) = Float697BC8 - Car/District name time on screen (millisecnonds) = float697BCC - Car/District name vertical scale = Float697BD0 - Car/District name horizontal scale = Float697BD4 - District name distance from bottom = Float697BD8 - Car/District name rotation (like italic) = Float697BE0 - Car name distance from bottom = Float697BE4 - Format of time (%02d:%02d) = 9 bytes697BF0 - Time distance from top = Float697BF4 - Time distance from right = Float697C0C - Radardisc scale = Float697C10 - Radardisc shadow scale = Float697C18 - Radardisc distance from bottom = Float697C1C - Radardisc horizontal scale = Float697C20 - Radardisc vertical scale = Float697C38 - Message box text transparency = Float697C3C - Message box time on screen (milliseconds) = Float697C40 - Message box vertical scale = Float697C44 - Message box horizontal scale = Float697C48 - Message box distance from left = Float697C4C - Message box transparency = Float697C50 - Message box distance from top = Float697C54 - Message box distance from top = Float

 

The last two addresses are correct incase you think I made a mistake.

 

Some screenshots of what I did with the HUD:

 

user posted imageuser posted imageuser posted image

Edited by ModelingMan

Share this post


Link to post
Share on other sites
James Caldwell

I didn't know you already found most of those, I missed quite a few pages of this topic.

 

Here are some new discoveries, I found the actual radar addresses. I have currently tried three specific addresses, those are the radar scale, distance from bottom of the screen and the radar shape (yes you can change that!)

 

$68FD28 - Radar Scale = Float

$68FD34 - Radar distance from bottom = Float

$68FD3C - Radar Shape = Float (The lesser the value the more squared, the higher the value the more round)

 

There are quite a few addresses around those that I haven't checked yet.

 

Here is a screenshot of what I did with the radar:

 

user posted image

Share this post


Link to post
Share on other sites
JernejL
I didn't know you already found most of those, I missed quite a few pages of this topic.

 

Here are some new discoveries, I found the actual radar addresses. I have currently tried three specific addresses, those are the radar scale, distance from bottom of the screen and the radar shape (yes you can change that!)

 

$68FD28 - Radar Scale = Float

$68FD34 - Radar distance from bottom = Float

$68FD3C - Radar Shape = Float (The lesser the value the more squared, the higher the value the more round)

 

There are quite a few addresses around those that I haven't checked yet.

 

Here is a screenshot of what I did with the radar:

 

user posted image

*amazed at the square radar*

 

whooooohooooo. cookie.gif

 

Share this post


Link to post
Share on other sites
Serero-Kuh

hi,

i have a little question, can anyone post the sourcecode of a VC Trainer (in delphi) like i press the 1 key in vc and then i get unlimited health u know? i don't know how to make a trainer plz help me thx

 

sorry for my bad english wink.gif

Edited by Serero-Kuh

Share this post


Link to post
Share on other sites
Kryptos

Most of the trainers work in the same manner, the only difference is in their implementation, i.e. whether it be a stand-alone executable, a DLL loaded by the game at runtime, or some other method. Languages are another aspect, although since you know enough to say 'source code' I assume you at least have a general grasp of that, I'll just use tidbits of C++ to outline some general ideas. Since it seems as though your more of a beginner to trainers the executable method would be much more logical. All these trainers do is search the system's processes for a specific window, so they can essentially 'hook' it.

 

 

HWND lngHWnd;unsigned long lngPid;HANDLE lngPHandle;bool ViceHook(){lngHWnd = FindWindow("GTA: Vice City", "GTA:VC");if (lngHWnd > 0){if (FindWindow(0, "Unhandled Exception") > 0) return false;SetFocus(lngHWnd);lngPid = 0;GetWindowThreadProcessId(lngHWnd, &lngPid);if (lngPid != 0) { 	lngPHandle = OpenProcess(proc, false, lngPid); 	 	if (lngPHandle > 0) 	{   if(!SetPriorityClass(lngPHandle, idle))	return false; 	} }}else return false;return true;}

 

That's the basic idea of that. I don't want to get into the specific crap about error proofing and such. After hooking it it's just a matter of using ReadProcessMemory(...) and WriteProcessMemory(...), as seen here:

 

 

void SetMemory(){float fltVariable = (float) rand();WriteProcessMemory(lngPHandle, (void*) 0xFFFFFF, &fltVariable, 4, 0);}

 

It's also generally good to have functions to ensure the game is running and for other such tasks.

Share this post


Link to post
Share on other sites
Andy80586

I was wondering if any of you were interested in extending the map boundaries. I was partially successful in doing so and I still think that it can be fully completed. What I have done so far can be located in this thread: http://www.gtaforums.com/index.php?showtopic=137408

 

Basically, what I have done is this:

 

1. I have extended the bounceback boundaries out 1000 units each way, but ran into some problems (bugs?) not the least of which are game crashes. I did this by modifying the floating-point integers located at 69A890, 69A894, 69A898, and 69A8A0 (298490, 298494, 298498, and 2984A0 in hex editor). I also found and modified data that had a series of four values that closely resembled the original map boundaries.

 

2. When the game crashes, the exception reports usually point to one of three different addresses: BB14F, B1187, and D6EE0.

 

3. The game crashes when you go north and south, but not when you go east or west, over the original boundaries of the map. The crashes take place at what seem to be defined places (it crashes at the same y location every time, unless you move horizontally to a few select places spaced every few hundred units at which the game lets you travel an extra fifty units or so before it crashes). I did a data lookup on the point(s) at which the game crashes but found nothing.

 

4. In addition to the game crashes, the vehicle fails to render when the boundaries are passed, and sometimes you can see Tommy stuck/hanging in midair. However, I have considered this to be less significant than the game crashes, but it still needs to be resolved before anything useful can be done with the potential mod involved here.

 

5. There are invisible walls of water that have seemingly infinite heights at defined areas past the boundaries, but I have not resolved any coordinates from these.

 

6. There is a floating-point integer, 2048, that seems to control the distance from the center of the map that the water is rendered. It is the only floating-point integer with the value 2048 in the entire set of data that I remember seeing, and it shouldn't be that hard to relocate it. The water rendering and the invisible water walls might be correlated, but I did not find a correlation between this and the game crashes in the tests that I did.

 

I believe that some of the expert modders in this thread can expand on what I have done and perhaps create a solution to the map boundary problem once and for all. The solution may lie in memory hacking for some of the problems listed above, or in data hacking in places that I have overlooked. I simply have not had time to work on this anymore as a result of the fact that I have been overloaded with homework since the beginning of August (the time of the last progress update on the other thread), and I am posting this as a result.

 

-Andy80586

Share this post


Link to post
Share on other sites
Opius
6. There is a floating-point integer, 2048, that seems to control the distance from the center of the map that the water is rendered. It is the only floating-point integer with the value 2048 in the entire set of data that I remember seeing, and it shouldn't be that hard to relocate it. The water rendering and the invisible water walls might be correlated, but I did not find a correlation between this and the game crashes in the tests that I did.

 

This looks interesting. If you extend the draw distance of the game with timecycl.dat, you'll notice that the water is drawn at all beyond 2048 game units.

 

So, it's not from the center of the game world, its the radius around the player.

Share this post


Link to post
Share on other sites
Andy80586

Maybe, but there is a definite boundary that can be seen when you cross over the 2048 line going east or west (because north/south results in a crash) that can be seen. When increasing that particular integer to say, 4096, there is a major difference in appearance that takes place when the water is rendered, and it also seems to shift the placement of the invisible walls. The timecycl.dat file you mentioned might have some data that is somehow correlated with the invisible walls, and it might be worth a look.

 

It may be necessary to verify what happens altogether regarding that integer, as what I have written is mainly from what I remember happening at the time that was modified. Since that memory is now over two months old, it may not be accurate enough to be trusted.

Share this post


Link to post
Share on other sites
Serero-Kuh

i need an examplein delphi plz for a trainer, i don't understand c++ sorry!

Share this post


Link to post
Share on other sites
James Caldwell

i need an examplein delphi plz for a trainer, i don't understand c++ sorry!

Here is a short conversion of what Kryptos posted:

 

 

var WindowName: HWND; ProcessId: Longword; HandleWindow: THandle; VCBytes: DWord; // This holds the value of how many bytes were written...function ViceHook: Boolean;beginWindowName := FindWindow('Grand theft auto 3', nil); // Finds Vice's window handle if running if WindowName > 0 then  begin  GetWindowThreadProcessId(WindowName, @ProcessId); // This will retrieve Vice's ProcessId  HandleWindow := OpenProcess(PROCESS_ALL_ACCESS, False, ProcessId); // This gives you reading/writing abilities  end else result := false; // If WindowName = 0 then Vice is not runningresult := true;end;

 

'Grand theft auto 3' is Vice's Classname, if you use the Classname your trainer will be compatible with any WindowTitle.

 

 

procedure SetMemory;var FltValue: single;beginFltValue := 1.2; // exampleWriteProcessMemory(HandleWindow, Pointer($FFFFFF), @FltValue, 4, VCBytes);end;

 

Share this post


Link to post
Share on other sites
JernejL
Maybe, but there is a definite boundary that can be seen when you cross over the 2048 line going east or west (because north/south results in a crash) that can be seen. When increasing that particular integer to say, 4096, there is a major difference in appearance that takes place when the water is rendered, and it also seems to shift the placement of the invisible walls. The timecycl.dat file you mentioned might have some data that is somehow correlated with the invisible walls, and it might be worth a look.

 

It may be necessary to verify what happens altogether regarding that integer, as what I have written is mainly from what I remember happening at the time that was modified. Since that memory is now over two months old, it may not be accurate enough to be trusted.

we have tried.. but we still don't know what is the real place where they are stored, i still have my left eye pointed at water.dat sly.gif

 

Share this post


Link to post
Share on other sites
steve-m

 

'Grand theft auto 3' is Vice's Classname, if you use the Classname your trainer will be compatible with any WindowTitle.

But how do you distinguish between GTA3 and VC then?

Share this post


Link to post
Share on other sites
JernejL
'Grand theft auto 3' is Vice's Classname, if you use the Classname your trainer will be compatible with any WindowTitle.

But how do you distinguish between GTA3 and VC then?

don't do it and let the stupid user learn not to run both programs at the same time because the trainer crashes them tounge.gif

 

Share this post


Link to post
Share on other sites
grovespaz

I think he means, how does your TRAINER distinguish them, so that users cant run GTA 3 with your VC trainer for example...

Share this post


Link to post
Share on other sites
Hammer83
'Grand theft auto 3' is Vice's Classname, if you use the Classname your trainer will be compatible with any WindowTitle.

But how do you distinguish between GTA3 and VC then?

Same way you distinguish between versions of GTA3 or VC. Compare some fixed address for a knwon sequence of bytes.

Share this post


Link to post
Share on other sites
Andy80586
we have tried.. but we still don't know what is the real place where they are stored, i still have my left eye pointed at water.dat sly.gif

I did some work with the water.dat file, but I didn't find much. I extended the inner boundaries out 1000 each way and took 1000 away from the inside edge of the outer boundary stated in the file. Even with the file modified, the invisible walls are still there. However, I did a test with the 2048 integer, changing it to 4096, and the location of the invisible walls seemed to have changed. I have not yet tried to change the water.dat or the integer to create a perfect match to what I had set the boundaries at, but it might be worth a shot. It might also depend on the waterpro.dat file in some way, though I am unsure how to adapt that file to the changed boundaries. There are many different things that seem to take place when you cross the 2048 boundary going in any direction.

Share this post


Link to post
Share on other sites
DexX

Did some memory hacking today just for fun..

 

All are Vice 1.0

Police accuracy - 0x4ed7b6

00 - they barely hit you

3c - is default

8c - and they'll hardly miss unless something is blocking their line of site

 

Police Weapons dont do any damage, or play any sound when fired

zero out

4ed76e and

4ed77e

 

There was a chunk of flags in this area, these are the ones i found that actually had a noticeable effect

Cops ignore player (they get out, then instead of firing at you, just walk away..) - 4ed8fb - any value over 0

Cops get out of car, take one shot, then walk away.. - 4ed911 - 01

lock ONLY the driver side door on the police cars (wtf?!) - 4ed91f - 01

No actors in police cars, all doors are locked, but car still chases you (used for chopper maybe?) - 4ed935 - 01

 

Edit - i copy pasted this out of IDA - i think i have most of the police block figured out:

 

.text:004ED720 authority_actors_setup proc near      ; CODE XREF: sub_443E10+298p.text:004ED720                                       ; sub_443E10+2BAp ....text:004ED720 .text:004ED720 var_8           = dword ptr -8.text:004ED720 var_4           = dword ptr -4.text:004ED720 arg_0           = dword ptr  8.text:004ED720 arg_4           = dword ptr  0Ch.text:004ED720 .text:004ED720                 push    ebx.text:004ED721                 sub     esp, 8.text:004ED724                 mov     ebx, [esp+8+arg_0].text:004ED728                 push    6             ; number of possible wanted levels?.text:004ED72A                 mov     [esp+0Ch+var_4], ecx.text:004ED72E                 call    sub_50DC20.text:004ED733                 mov     eax, [esp+8+var_4].text:004ED737                 mov     edx, ebx.text:004ED739                 mov     dword ptr [eax], offset off_691CE4.text:004ED73F                 mov     eax, [esp+8+var_4].text:004ED743                 mov     [eax+608h], ebx.text:004ED749                 mov     eax, ebx.text:004ED74B                 cmp     eax, 5        ; switch 6 cases .text:004ED74E                 ja      loc_4ED8F1    ; default.text:004ED754                 jmp     off_691CC4[eax*4]; switch jump.text:004ED75B .text:004ED75B police_actor_setup:                   ; DATA XREF: .data:00691CC4o.text:004ED75B                 mov     ecx, [esp+8+var_4]; case 0x0.text:004ED75F                 mov     ebx, [ecx].text:004ED761                 push    1             ; police character model - char models need to be loaded externally first!.text:004ED763                 call    dword ptr [ebx+0Ch].text:004ED766                 mov     ecx, [esp+8+var_4].text:004ED76A                 push    1             ; police character model alt.text:004ED76C                 push    3E8h          ; load weapon command, or related? "3E8h" is before every weapon assignment...text:004ED771                 push    4             ; Nitestick...text:004ED773                 call    sub_4FFA30.text:004ED778                 mov     ecx, [esp+8+var_4].text:004ED77C                 push    3E8h          ; load weapon command or similar?.text:004ED781                 push    11h           ; Pistol (45).text:004ED783                 call    sub_4FFC30.text:004ED788                 mov     eax, [esp+8+var_4].text:004ED78C                 mov     byte ptr [eax+504h], 0; unknown.text:004ED793                 mov     eax, [esp+8+var_4].text:004ED797                 mov     dword ptr [eax+358h], 0; unknown.text:004ED7A1                 mov     eax, [esp+8+var_4].text:004ED7A5                 mov     byte ptr [eax+505h], 0D0h; seems to be how often police throw a spike strip.text:004ED7AC                 mov     eax, [esp+8+var_4].text:004ED7B0                 mov     byte ptr [eax+506h], 3Ch; police firing accuracy. 00 for horrible, 8c for really good.text:004ED7B7                 jmp     loc_4ED8F1    ; default.text:004ED7BC; ---------------------------------------------------------------------------

 

 

The SWAT and ARMY use similar blocks of data, that immediatley follow this. The FBI has a block of data like this too, but without the 2 unknown's / accuracy / spikestrip part.

 

what was that at the end? jump to 43d8f1? can do!

 

 

.text:004ED8F1 authority_actor_flags:                 ; CODE XREF: authority_actors_setup+2Ej.text:004ED8F1                                        ; authority_actors_setup+97j ....text:004ED8F1                 mov     eax, [esp+8+var_4]; default.text:004ED8F5                 mov     byte ptr [eax+5FCh], 0; set to 01 for cops to ignore player.text:004ED8FC                 mov     eax, [esp+8+var_4].text:004ED900                 mov     byte ptr [eax+5FEh], 1; unknown - didn't notice any effect ingame - at 1 by default..text:004ED907                 mov     eax, [esp+8+var_4].text:004ED90B                 mov     byte ptr [eax+5FDh], 0; cops get out and take one shot if 01.text:004ED912                 mov     eax, [esp+8+var_4].text:004ED916                 mov     dword ptr [eax+544h], 0; lock ONLY drivers side door on police cars.text:004ED920                 mov     eax, [esp+8+var_4].text:004ED924                 mov     byte ptr [eax+5FFh], 0; unknown.text:004ED92B                 mov     eax, [esp+8+var_4].text:004ED92F                 mov     byte ptr [eax+600h], 0; no actors in police cars, doors locked, but cars still chase the player.text:004ED936                 mov     eax, [esp+8+var_4].text:004ED93A                 mov     byte ptr [eax+601h], 0; unknown.text:004ED941                 mov     eax, [esp+8+var_4].text:004ED945                 mov     byte ptr [eax+602h], 0; unknown.text:004ED94C                 mov     eax, [esp+8+var_4].text:004ED950                 mov     byte ptr [eax+628h], 0FFh; unknown.text:004ED957                 mov     eax, [esp+8+var_4].text:004ED95B                 mov     dword ptr [eax+5F4h], 0; unknown.text:004ED965                 mov     eax, [esp+8+var_4].text:004ED969                 mov     byte ptr [eax+60Ch], 0; unknown.text:004ED970                 mov     eax, [esp+8+var_4].text:004ED974                 mov     dword ptr [eax+610h], 0; unknown.text:004ED97E                 mov     eax, [esp+8+var_4].text:004ED982                 mov     dword ptr [eax+604h], 0; unknown.text:004ED98C                 mov     eax, [esp+8+var_4].text:004ED990                 mov     dword ptr [eax+618h], 0; unknown.text:004ED99A                 mov     eax, [esp+8+var_4].text:004ED99E                 mov     dword ptr [eax+61Ch], 0; unknown.text:004ED9A8                 mov     eax, [esp+8+var_4].text:004ED9AC                 push    234h.text:004ED9B1                 mov     dword ptr [eax+624h], 0; unknown.text:004ED9BB                 call    sub_6403B0.text:004ED9C0                 test    eax, eax.text:004ED9C2                 pop     ecx.text:004ED9C3                 jz      short loc_4ED9CC.text:004ED9C5                 mov     ecx, eax.text:004ED9C7                 call    sub_629B50.text:004ED9CC 

 

 

This is the section of flags i was talking about, that i found. I'm sure they all do something, but i'll be damned if i know what exactly.

Edited by ashdexx

Share this post


Link to post
Share on other sites
JernejL
Did some memory hacking today just for fun..

 

All are Vice 1.0

Police accuracy - 0x4ed7b6

00 - they barely hit you

3c - is default

8c - and they'll hardly miss unless something is blocking their line of site

 

Police Weapons dont do any damage, or play any sound when fired

zero out

4ed76e and

4ed77e

 

There was a chunk of flags in this area, these are the ones i found that actually had a noticeable effect

Cops ignore player (they get out, then instead of firing at you, just walk away..) - 4ed8fb - any value over 0

Cops get out of car, take one shot, then walk away.. - 4ed911 - 01

lock ONLY the driver side door on the police cars (wtf?!) - 4ed91f - 01

No actors in police cars, all doors are locked, but car still chases you (used for chopper maybe?) - 4ed935 - 01

nice finds, i'll try to expand them wink.gif

 

Share this post


Link to post
Share on other sites
Whacko

Hi,

I was searching different opcode ressources and the coding forum for a way to get the status of the car lights. Not the signal lights, but the normal car lights. After I didn`t find anything related I remembered this thread.

First I thought of reading the whole thread before asking, but forgive me - I gave up at page 9.

Share this post


Link to post
Share on other sites
DexX

if by "car light status" you mean on/off, then no, there isn't any info. I would love to have these address, and will post them if i ever find them, rest assured. Since indiviual cars can have lights on or off (abandon one during the night, and wait for the sun. itll be the only car with headlights still on), youd think that info would be stored in the car block, but near as i can tell, it isn't...

 

Edit: i edited my last post, so it contains some much more useful code on the police actor setup. check it out.

Edited by ashdexx

Share this post


Link to post
Share on other sites
JernejL
if by "car light status" you mean on/off, then no, there isn't any info. I would love to have these address, and will post them if i ever find them, rest assured. Since indiviual cars can have lights on or off (abandon one during the night, and wait for the sun. itll be the only car with headlights still on), youd think that info would be stored in the car block, but near as i can tell, it isn't...

 

Edit: i edited my last post, so it contains some much more useful code on the police actor setup. check it out.

lights are manipulated by daytime, car alarm (blinking), damage (front ones are attached to wings)

 

the settings for them gotta be stored in the car block, seeing that cars

with alarm blink individualy..

 

 

Share this post


Link to post
Share on other sites
Whacko

Also the weather plays a role in that, too.

I registered that the cars don`t turn the lights on/off at the same time. I guess R* proggt kind of random delay to have it looking more realistic - would look strange if all the drivers would turn their`s on/off right in the same moment.

On-time ist around 8:05 to 8:20 pm, turn-off circa 6:10 am (at good weather).

Share this post


Link to post
Share on other sites
Stretchnutter

Vehicle Light and Engine ON/OFF flags:

 

Vehicle bloc + 0x1F8 - 0x1FB

 

the light and engine status are shared in the same byte(bits?!).... and 'Or'ing is going on with it and changes when it gets dark/day and when you get in/out of car.

Share this post


Link to post
Share on other sites
DexX

 

Vehicle Light and Engine ON/OFF flags:

 

Vehicle bloc + 0x1F8 - 0x1FB

 

the light and engine status are shared in the same byte(bits?!).... and 'Or'ing is going on with it and changes when it gets dark/day and when you get in/out of car.

stretchnutter, _you_rule_! biggrin.gif

i'll test this once i get home.

 

Also i have _more_ police info i'll post later. bwahahahaha!!!!! Those cops will be soon be my bitches (moreso than they already are).

 

Edit - i havent tested this, but do you think the lights on other vehicles, like the police chopper, and the unflyable plane (with the banner) could also be turned on / off through here? actually, id like to be able to add more lights onto a car. maybe i'll look into how thats done..

Share this post


Link to post
Share on other sites
James Caldwell

Dexx, since you are looking at cop stuff maybe you'd like to check out the wanted level block. It's at:

 

Wanted level pointer = Player Pointer + 1524 = DWord

 

It contains the wanted level, co-ordinates, etc. Not actually sure what the co-ordinates are for. Would be interesting to see what else is in this block.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 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.