I've edited the code, made major changes (cleaner code, if to Switches, Sequential gear, more gears, etc, etc).

Source code is available on the mod page but I can provide mine version if required.

So, here comes the part of being new to Visual Studio. I will start by saying what I did and hope that someone can pin point me where I went wrong or what I'm missing.

- Visual Studio Express 2013 > New Project > Visual C++ > DLL

- I've downloaded ScriptHookV SDK, got all the *.h files in a single Folder (inclduing the ones in the Sample Folder and the ScriptHookV.lib). Changed the script.h "#include "..\..\inc\natives.h"" to "#include "natives.h""

- Copied all the *.h files and the ScriptHookV.lib to my project folder "..\Projects\MT1\MT1\MT1.Shared\"

Share this post

Link to post

Share on other sites

zebrajr
3

zebrajr
3

Why are you compiling c# in c++? it kinda seems you have no idea what you're doing, maybe you should start at the basics.

Actually I've tried to compile as a DLL in C# but I get the same errors. Forgot to edit the post after that but anyway, the issue seems to be I can't import the ScriptHook library to my Visual Studio, at least when I link the file it doesn't seems to get recognized, and I can't use the functions from the NATIVEDB.

Got my way around it making it as a LUA mod instead, working exacly the same.

I do know what I am doing, it just that I never made a mod before (to any game, like I stated in my OP) therefore I wanted to see why I couldn't use the library on Visual Studio. If you read the post completely you would see the problem was not the typo of C# for C++ but libraries not being useable in Visual Studio. Thanks anyway.