Shtivi 42 Posted March 5, 2020 Posted March 5, 2020 Hi, I'm trying to get these things to work and dont know how: 1. show a help message 2. Show a prompt of an available action like when you lasso someone, get close to him and you have on the right bottom corner a hogtie prompt. I've seen it in the Hunting wagon mode, you can press "Z" to call the hunting wagon. How did he added it to the menu? Quote
Shtivi 42 Posted March 5, 2020 Author Posted March 5, 2020 1 hour ago, LMS said: What ScriptHook are you using? https://github.com/Saltyq/ScriptHookRDR2DotNet But I guess that there are native functions which can help Quote
LMS 676 Posted March 5, 2020 Posted March 5, 2020 RAGE Plugin Hook has a function to print help and it also works with any .NET language, so perhaps you can give that a try. We have a tutorial here: Disclaimer: I am one of the authors of RPH. Quote
Shtivi 42 Posted March 5, 2020 Author Posted March 5, 2020 13 minutes ago, LMS said: RAGE Plugin Hook has a function to print help and it also works with any .NET language, so perhaps you can give that a try. We have a tutorial here: Disclaimer: I am one of the authors of RPH. Is it possible to look into the source code of rph? Quote
LMS 676 Posted March 5, 2020 Posted March 5, 2020 2 hours ago, Shtivi said: Is it possible to look into the source code of rph? No, it is not an open source project. Quote
Shtivi 42 Posted March 7, 2020 Author Posted March 7, 2020 Thanks for the help. Anybody knows the native of help message? Quote
LMS 676 Posted March 7, 2020 Posted March 7, 2020 The native hash is 049D5C615BD38BAD but the arguments are two structures, so it's a bit more effort to get it working. RAGE Plugin Hook has that function wrapped for you in C#, so that might be the easier way. Quote
Shtivi 42 Posted March 7, 2020 Author Posted March 7, 2020 6 hours ago, LMS said: The native hash is 049D5C615BD38BAD but the arguments are two structures, so it's a bit more effort to get it working. RAGE Plugin Hook has that function wrapped for you in C#, so that might be the easier way. I know, i tried the tutorial of the NPC taxi. extracted everything, placed NPC_taxi.dll and pdb in the c#plugins folder, launched the game and then launched RPH.exe. The game crushes when i try to load the my script... dont know what to do. Also, does RPH is able to run along side with script hook? Quote
LMS 676 Posted March 7, 2020 Posted March 7, 2020 Yeah hooks can co-exist fine just like on GTA V, that's not a problem. Does your logfile reveal anything? Perhaps some files are missing causing it to crash. Quote
Shtivi 42 Posted March 7, 2020 Author Posted March 7, 2020 2 hours ago, LMS said: Yeah hooks can co-exist fine just like on GTA V, that's not a problem. Does your logfile reveal anything? Perhaps some files are missing causing it to crash. 020 12:52:00 AM.130] Error while loading plugin D:\Program Files\Rockstar Games\Red Dead Redemption 2\C#Plugins\NPCTaxi.dll. Plugin is skipped during reload. Exception: System.TypeLoadException: Could not load type 'Rage.RemotePlugin' from assembly 'RagePluginHook2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. [3/7/2020 12:52:00 AM.133] at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type) [3/7/2020 12:52:00 AM.135] at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) [3/7/2020 12:52:00 AM.136] at System.Activator.CreateInstance(String assemblyString, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark) [3/7/2020 12:52:00 AM.138] at System.Activator.CreateInstance(String assemblyName, String typeName) [3/7/2020 12:52:00 AM.139] at System.AppDomain.CreateInstance(String assemblyName, String typeName) [3/7/2020 12:52:00 AM.140] at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName) [3/7/2020 12:52:00 AM.142] at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName) [3/7/2020 12:52:00 AM.144] at fM7yR2zBHiex_gZtaRbuPZI.hAXm7XcRP$RWRq$eZKmJrSQ(String ) [3/7/2020 12:52:00 AM.145] at sZJr2G73PwZLF8_nux5f$_7868mrTfTzroq6LRMLvXbH.XWuRhz3fzgg04umooyTjKpQ(String , Boolean ) [3/7/2020 12:52:00 AM.146] at sZJr2G73PwZLF8_nux5f$_7868mrTfTzroq6LRMLvXbH.fAltt4B2I3Ao5ZsqcOCa0zrGOSaklOzaTN2O3ndiuSwC(Boolean ) thats what i get Quote
LMS 676 Posted March 7, 2020 Posted March 7, 2020 I just tested it myself and it works fine, but due to an API change you need to change one line of code. Make sure to use the latest SDK dll in your "Dependencies" folder (it's from January 24). Once you have updated it, line 35 should throw an error when trying to compile. Change it to "if (Input.WasKeyJustPressed(Keys.G))" and it should then compile just fine. Copy the updated plugin into the C#Plugins folder. Also please note that you are not supposed to copy the SDK DLL into the game folder or the C#Plugins folder. You just need it in your project folder. Quote
Shtivi 42 Posted March 10, 2020 Author Posted March 10, 2020 On 3/7/2020 at 6:11 PM, LMS said: I just tested it myself and it works fine, but due to an API change you need to change one line of code. Make sure to use the latest SDK dll in your "Dependencies" folder (it's from January 24). Once you have updated it, line 35 should throw an error when trying to compile. Change it to "if (Input.WasKeyJustPressed(Keys.G))" and it should then compile just fine. Copy the updated plugin into the C#Plugins folder. Also please note that you are not supposed to copy the SDK DLL into the game folder or the C#Plugins folder. You just need it in your project folder. thanks for your help, i hope ill get to it soon. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.