Jump to content

Recommended Posts

Thank you very much indeed.

 

I was planning to convert this code to c#, but no need. It is lean and crispy.

 

Time to implement a communication between this dll (running in gta process) and an external vb process to include vb coders to have an easy-going UI with a solid c++ dll at back-end.

Exporting the calls will not be enough. As then, even through extern dll calls, a new instance of this dll will get loaded into vb process, and the gta4-process injected dll will not be referenced.

 

cheers, and happy coding

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/2/#findComment-1058853647
Share on other sites

 

Oh well, no biggie. Dled VC2008 and messed around with it. Been meaning to learn something other than VB anyway.

But I have question: how do I display text? Displaying your own strings isn't probably possible, like in SA, but how can I display text from GXTs? I don't really know what gxtName should be.

If you want to display your own strings without using a gxt file, you could use Direct3D.

 

DL the DirectX SDK: http://www.microsoft.com/downloads/details...&displaylang=en

 

Then follow this tutorial: http://www.toymaker.info/Games/html/text.html

 

It's actually doable with no/little experience with C++ (i could do it, so that is proof) tounge.gif

Edited by the hubster
Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/2/#findComment-1058853945
Share on other sites

 

great job aru! i am just having a problem with constant ingame crashes. Did you use the asi loader that came with alice or the more outdated standalone asi loader(both by Alexander Blade)?

I did all my testing with xliveless... avail @ http://www.gtaforums.com/index.php?showtopic=388658&st=0

 

You might have to copy some save games around to get it to load your existing save, but other than that, its works pretty well.

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/2/#findComment-1058854564
Share on other sites

Yeah, a DotNet script hook (for C# and VB.Net) would be perfect! I already tried to compile the scripthook with managed extensions (to call other dotnet assemblies from it) but it crashes the game. sad.gif nevertheless, amazing work aru!

This is un-managed pure C++ code if im correct smile.gif I prefere unmanaged myself since i learned C++ in CBuilder 6.

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/2/#findComment-1058854729
Share on other sites

You need 2008 to open the sln file... for 2005, just create a empty Win32 DLL project and add the source files (cpp/h) to it.

 

And yes, this is fully unmanaged C++. I *think* it should still load up with IV if compiled with /clr, as long as you keep the CustomThread, NativeThread, NativeContext, etc classes as unmanaged since they are subclasses of game types.

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/2/#findComment-1058854887
Share on other sites

And yes, this is fully unmanaged C++. I *think* it should still load up with IV if compiled with /clr, as long as you keep the CustomThread, NativeThread, NativeContext, etc classes as unmanaged since they are subclasses of game types.

Yes, i tried that. It crashed. confused.gif I was suprised too. I converted other unmanaged projects to mixedmode/managed projects before, but yet i'm still VERY unexperienced in C++ and such a hook is a more special case too. I maybe did something wrong... i just added the /clr parameter and added "#pragma unmanaged" directives to all files, to be sure that no unwanted stuff is compiled as managed.

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/2/#findComment-1058854928
Share on other sites

 

Argh, 2008 version needs now activation. Can i download full version from somewhere?

Just get the Visual Studio 2008 Express Edition. It's free.

I have it, but it needs now activation because it is 30 days old or something.

Edited by Touho
Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/2/#findComment-1058854989
Share on other sites

 

Register this product within 30 days. To receive your free registration key, click Register Product on the Help menu of your Express Edition. For more information, visit Registration Benefits .
tounge2.gif

 

DLL/ASI loader = "XLiveLess" or "ASI Loader"

Edited by L0uNGeR
Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/2/#findComment-1058854991
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
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

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