Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (85,173 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

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

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

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

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

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

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

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. 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

    2. Red Dead Redemption

    3. 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. Forum Support

    2. Site Suggestions

Spooky

[REL|SRC] SCM and DirectX Hooking Source Code

Recommended Posts

ghost of delete key
float fSpeedoMultiplier	= 3.6f;	// Default multiplier to 2.24 (mph)...3.6(kmh)

 

What you need?

- Visual C++ 2008 Express Edition

- DirectX8 SDK

- The good old Speedo-Source

(Yep...I never delete a sourcecode...never...for years!)

Friggin' sweet!

 

I've been looking for this source forever...

 

except the link you gave has been dead for like a day. angry.gif

 

Could you upload to a different host that doesn't suck?

 

I'll send a basket of cookies.

 

colgate.gif

Share this post


Link to post
Share on other sites
ghost of delete key

Thanks a bunch! biggrin.gif

 

Here's your basket of cookies...

 

user posted image

Edited by ghost of delete key

Share this post


Link to post
Share on other sites
JohnMirror

Thanks smile.gif

 

I downloaded and installed Visual C++ 2008 and DirectX SDK.

Also I added 2 paths at "Visual C++ directories in the Projects and Solutions section in the Options dialog box" (Include and Library) pointing to DirectX 9 SDK files and replaced "afxres.h" with "windows.h" in code.

After "build" I get speedo.dll 1MB.

If I try to copy the file as d3d8.dll into the Vice City folder gta-vc.exe shows error: "The application failed to initialize properly (0xc000007b). Click on OK to terminate the application".

 

What should I do...?

Share this post


Link to post
Share on other sites
grovespaz

I had the same problem recently. I am terribly sorry I do not remember how I solved it sad.gif IIRC, it can be caused by wrong libs, wrong or missing dlls and any other number of things.

I have successfully used MSVC++ 2003 to compile and run this, most other versions gave me a bad headache.

 

BTW, I have been working on the speedo source a LOT in the past few weeks.

Here's a little teaser wink.gif

user posted image

Note the custom menu moto_whistle.gif

Share this post


Link to post
Share on other sites
NTAuthority
Note the custom menu moto_whistle.gif

Is that a custom UI system, or an existing one like CEGUI?

Share this post


Link to post
Share on other sites
JohnMirror
I had the same problem recently. I am terribly sorry I do not remember how I solved it sad.gif IIRC, it can be caused by wrong libs, wrong or missing dlls and any other number of things.

I have successfully used MSVC++ 2003 to compile and run this, most other versions gave me a bad headache.

 

BTW, I have been working on the speedo source a LOT in the past few weeks.

Here's a little teaser wink.gif

user posted image

Note the custom menu moto_whistle.gif

I tried with Visual Studio 2003. Same problem...

Share this post


Link to post
Share on other sites
NTAuthority
I tried with Visual Studio 2003. Same problem...

0xc000007b: STATUS_INVALID_IMAGE_FORMAT

 

Also known as the error indicating the application itself, or a dependent library (your d3d8.dll, or further in the tree) is not a completely valid Win32 PE file. It being one megabyte large might also be an issue, since the correct standard (non-debug) file should not be that size. Also, the project file should directly output a 'd3d8.dll'... it not being the case shows you're using debug mode, which might generate incorrect files for this modification.

 

Also, try looking through the DLL's dependencies with Dependency Walker to see where the issue might be. smile.gif

Share this post


Link to post
Share on other sites
JohnMirror

 

I tried with Visual Studio 2003. Same problem...

0xc000007b: STATUS_INVALID_IMAGE_FORMAT

 

Also known as the error indicating the application itself, or a dependent library (your d3d8.dll, or further in the tree) is not a completely valid Win32 PE file. It being one megabyte large might also be an issue, since the correct standard (non-debug) file should not be that size. Also, the project file should directly output a 'd3d8.dll'... it not being the case shows you're using debug mode, which might generate incorrect files for this modification.

 

Also, try looking through the DLL's dependencies with Dependency Walker to see where the issue might be. smile.gif

Yes, you're right smile.gif

I switched from "debug" to "release" and now it has the same size as the original (409 600) + it works fine.

Thank you.

 

Now I have to find a way to solve those problems that I mentioned in my first post monocle.gif

Share this post


Link to post
Share on other sites
grovespaz

 

Note the custom menu moto_whistle.gif

Is that a custom UI system, or an existing one like CEGUI?

Actually, you are right on the money wink.gif

It's CEGUI alright smile.gif (What tipped you of, the default theme? tounge.gif) I absolutely love it, and the developers have been really helpful to me whenever I had questions. I meant custom as in my own menu as opposed to a default game (I wasn't planning on coding an entire ui subsystem, I wanted to experiment with VC wink.gif ).

 

It was a bit of a hassle to get it to play nice with VC, but now that it's working I can imagine all sorts of cool stuff I can do.

 

I have been working on a in-game memory hacker/explorer, and I have been trying to hook certain game functions, with varying levels of success and failure sigh.gif

Share this post


Link to post
Share on other sites
NTAuthority
It's CEGUI alright smile.gif (What tipped you of, the default theme? tounge.gif)

Nah, never knew that was CEGUI's default theme, it's just the most well-known UI library (and the odd mouse cursor looks like it's from CEGUI) tounge.gif

 

 

I absolutely love it, and the developers have been really helpful to me whenever I had questions. I meant custom as in my own menu as opposed to a default game

 

 

I also like CEGUI for debugging stuff where you already need a mouse; for menus in the game itself I prefer manual position compatible with gamepads and stuff (yes, you could make CEGUI compatible with gamepads... it's a bit unhandy). tounge.gif And yes, I know that's what you meant with 'custom'. smile.gif

 

 

(I wasn't planning on coding an entire ui subsystem, I wanted to experiment with VC wink.gif ).

 

reuse rocks. tounge.gif

 

 

It was a bit of a hassle to get it to play nice with VC, but now that it's working I can imagine all sorts of cool stuff I can do.

 

 

I remember hacking around a lot to get it to work correctly with SA, so I can imagine that. I also need to re-implement CEGUI for Citizen for debugging stuff, having an actual mouse-controlled UI for development of missions can help a lot, as R* North finally found out for GTA4 tounge.gif

 

 

I have been working on a in-game memory hacker/explorer, and I have been trying to hook certain game functions, with varying levels of success and failure sigh.gif

 

 

In-game? What if you do something wrong and it crashes, that'd be a bit odd, right? tounge.gif

 

@JohnMirror: glad it's working now. smile.gif

Share this post


Link to post
Share on other sites
grovespaz

 

I also like CEGUI for debugging stuff where you already need a mouse; for menus in the game itself I prefer manual position compatible with gamepads and stuff (yes, you could make CEGUI compatible with gamepads... it's a bit unhandy). tounge.gif And yes, I know that's what you meant with 'custom'. smile.gif

Well, I have not tried gamepads myself, but the varying input injection methods of CEGUI make it relatively easy to get that done, I imagine smile.gif

 

 

reuse rocks. tounge.gif

 

Absolutely, I could not agree more.

 

 

I remember hacking around a lot to get it to work correctly with SA, so I can imagine that. I also need to re-implement CEGUI for Citizen for debugging stuff, having an actual mouse-controlled UI for development of missions can help a lot, as R* North finally found out for GTA4 tounge.gif

 

Hehehe, true that! I was thinking about some sort of mission editor as well, but that's all long term. wink.gif

 

 

In-game? What if you do something wrong and it crashes, that'd be a bit odd, right? tounge.gif

Well, I run VC in windowed mode, I can move the mouse from in VC to my debug windows outside and back, so crashes are not that much of a problem smile.gif

I have been creating some basic Actor and Car classes, which are easy to use in C++. Complete awesomeness would of course be threaded missions and such from my dll. There are just so many possibilities now that I do not know where to begin blush.gif

Another idea I had was making a step-by-step (aka instruction-by-instruction) debugger for the SCM script. I have already hooked the opcode interpreter, so pausing it at certain points should not be a big problem if all things work out.

EDIT!I just made a part of what I described!

Check the VC Memory addresses thread for a video biggrin.gif

Edited by grovespaz

Share this post


Link to post
Share on other sites
JohnMirror

I modified the code so in speedo.cfg you can set directly mph or kph.

When you set "kph" the background image with KPH is shown.

 

You can find the source code here:

http://www.mediafire.com/?onmz2jy1tmn

 

And the compiled dll here:

http://www.mediafire.com/?ylzzwtmztyz

 

2 questions:

1. Does anybody know what font did Spooky used for text in background image...?

2. Because I tested the code so many times I noticed a problem: when the radio starts (when you enter in a car) or when you change the radio station, the speedometer disappears. How can I solve this...?

 

Oh, and it does not work with RC plane. It's probably from the game...

 

Thank you in advance for any reply.

Edited by JohnMirror

Share this post


Link to post
Share on other sites
ManUthps

hi,

 

ive included the dx8 files and the d3dx8.lib file, but now my Visual Studio 2008 says me by building this file "GTA.obj can not open" what ive done wrong?

i hope someone can help me sad.gif

Share this post


Link to post
Share on other sites
CaeziumH

ermm.. It seems like that spookie's website is down.. so I would appreciate if anyone would reupload the source.

Thx in adv.

 

Share this post


Link to post
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

×

Important Information

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