An in-application console manager and console communicator for C# Development.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
csharp-src
src
README.md
conf.json
package.json

README.md

Rage.MP Development Kit


This project will let you run the server in an .exe file and allow you to also use a special C# reference to hook into an event and send the server custom commands. The server takes 'string' messages and relays them to an event you can hook into.


Installation:

  • Install directly to your server-files folder.
  • Installation will be done correctly if you have a Rage Dev Kit folder inside server-files.

Quick start:

  • Reference the DeveloperKit.dll in your project.
  • This .dll file can be found inside of the zipped archive.
    • You may have to add this .dll to your runtime folder. Not entirely sure on this.
  • Hook into the event -> DeveloperKit.Main.RconEvent.RconEventTrigger += EventHandler;
  • Compile your C# into a .dll and reference the .dll instead of individual files.
  • Run the server through the Dev Kit and it should work out.

Using the Event in your Resource:

using DeveloperKit; // Add the using statement.

// Reference Rage.MP Script
public class MyClass : Script 
{
    [ServerEvent(Event.ResourceStart)]
    public void ResourceStart()
    {
        // Hook into the event.
        RconEvent.RconEventTrigger += EventTrigger;
    }
    
    private void EventTrigger(object source, string[] args) {
        // Handle called events here. All events are seperated by spaces.
        
        // Terrible Example:
        if (args[0] == "kick") {
            Console.WriteLine("Kicking...");
        }
    }
}