Skip to content
forked from OnlyNoob/gm_dotnet

Garry's Mod module in C# ( Still a Work In Progress)

Notifications You must be signed in to change notification settings

cramt/gm_dotnet

 
 

Repository files navigation

GSharp

GSharp is a C# Shared project that makes it easy to interact with the C side of GMod.

Creating a new module

  1. Clone this repo
  2. Create a new dll in visual studio
  3. Go to project properties>Build and set Platform target to x86, and tick Allow unsafe code
  4. Install the package DllExport
  5. Add the GSharp shared project as a reference
  6. Make a class like the following:
public class Module
{

  [DllExport("gmod13_open", CallingConvention = CallingConvention.Cdecl)]
  public static int Open(lua_state L)
  {
      return 0;
  }

  [DllExport("gmod13_close", CallingConvention = CallingConvention.Cdecl)]
  public static int Close(IntPtr L)
  {
      return 0;
  }
}
  1. Start writing your code!

About

Garry's Mod module in C# ( Still a Work In Progress)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 93.5%
  • JavaScript 3.5%
  • C++ 2.2%
  • Other 0.8%