sashadkiselev Posted June 9, 2015 Share Posted June 9, 2015 I have recently been playing a lot of GTA V on PC singleplayer with friends, seeing how many kills we could get. I have found this mod which does so https://www.gta5-mods.com/scripts/killstreak-kill-counter-netbut I wanted to modify it. The mod came with the source code in a .cs file which I modified but now need to compile. When I try to compile it through cmd using csc it gives me the following errors C:\Users\sashadkiselev>C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /target:library /out:Kill.dll "C:\Program Files (x86)\Grand Theft Auto V\scripts\KillCounter.cs" Microsoft ® Visual C# Compiler version 4.0.30319.17929 for Microsoft ® .NET Framework 4.5 Copyright © Microsoft Corporation. All rights reserved. c:\Program Files (x86)\Grand Theft Auto V\scripts\KillCounter.cs(17,7): error CS0246: The type or namespace name 'GTA' could not be found (are you missing a using directive or an assembly reference?) c:\Program Files (x86)\Grand Theft Auto V\scripts\KillCounter.cs(21,32): error CS0246: The type or namespace name 'Script' could not be found (are you missing a using directive or an assembly reference?) c:\Program Files (x86)\Grand Theft Auto V\scripts\KillCounter.cs(42,9): error CS0246: The type or namespace name 'Ped' could not be found (are you missing a using directive or an assembly reference?) Please can you help me with this or suggest a similar mod. I wanted to change the time for killstreak to reset and the range of scanning Link to comment Share on other sites More sharing options...
Jitnaught Posted June 9, 2015 Share Posted June 9, 2015 (edited) Looks like it needs to reference the ScriptHookVDotNet.dll file. BTW, you can just copy the .cs file to the scripts folder instead of compiling it, and it will still be loaded by ScriptHookV .NET. Edited June 10, 2015 by LetsPlayOrDy sashadkiselev 1 Link to comment Share on other sites More sharing options...
spearminty Posted June 10, 2015 Share Posted June 10, 2015 hi! I made this killstreak mod I have not released an update because of the point you mention, range of scanning. This is a limitation in the scripthook dot net but I am working on improving so this counter has no limit to range. To change time limit for killstreak mod is easy: //number of seconds before killstreak resetsprivate int Cooldown = 15; To allow no reset on death: if (mTimer.ElapsedMilliseconds > (Cooldown * 1000) || Player.IsDead)change toif (Player.IsDead) I will have an update soon that makes these values configurable, plus some extra features sashadkiselev 1 Link to comment Share on other sites More sharing options...
sashadkiselev Posted June 10, 2015 Author Share Posted June 10, 2015 Looks like it needs to reference the ScriptHookVDotNet.dll file. BTW, you can just copy the .cst file to the scripts folder instead of compiling it, and it will still be loaded by ScriptHookV .NET. I do not have a .cst file, only .cs and that does not automatically compile by ScriptHook. and how would I reference ScriptHook in my code. I am new to this type of coding. Link to comment Share on other sites More sharing options...
sashadkiselev Posted June 10, 2015 Author Share Posted June 10, 2015 hi! I made this killstreak mod I have not released an update because of the point you mention, range of scanning. This is a limitation in the scripthook dot net but I am working on improving so this counter has no limit to range. To change time limit for killstreak mod is easy: //number of seconds before killstreak resetsprivate int Cooldown = 15; To allow no reset on death: if (mTimer.ElapsedMilliseconds > (Cooldown * 1000) || Player.IsDead)change toif (Player.IsDead) I will have an update soon that makes these values configurable, plus some extra features I think you misunderstood me. I have figured out how to edit the .cs file and be able to change all of the values, because I had some specific purposes, such as the time of 10 min does not reset on kills, so we could time the goes. What I really wanted to know is how to create the .dll file myself from the .cs file so that I could make these changes at will. Link to comment Share on other sites More sharing options...
Jitnaught Posted June 10, 2015 Share Posted June 10, 2015 (edited) Looks like it needs to reference the ScriptHookVDotNet.dll file. BTW, you can just copy the .cst file to the scripts folder instead of compiling it, and it will still be loaded by ScriptHookV .NET. I do not have a .cst file, only .cs and that does not automatically compile by ScriptHook. and how would I reference ScriptHook in my code. I am new to this type of coding.Typo. Meant .cs. I don't know how to compile with cmd, but you could compile it with Visual Studio by creating a new C# Class Library project, adding a reference to the ScriptHookVDotNet.dll file included with ScriptHookV .NET, copy the contents of your edited mod into the source file created automatically when creating the project, and then compile. Things like "adding a reference to..." can be Googled. I think you misunderstood me. I have figured out how to edit the .cs file and be able to change all of the values, because I had some specific purposes, such as the time of 10 min does not reset on kills, so we could time the goes. What I really wanted to know is how to create the .dll file myself from the .cs file so that I could make these changes at will. It seems like his post was meant for another topic... Edited June 10, 2015 by LetsPlayOrDy Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now