Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 2.72 KB

README.md

File metadata and controls

31 lines (23 loc) · 2.72 KB

SampSharp

GitHub Action: dotnet GitHub Action: Plugin (Linux) GitHub Action: Plugin (win32) GitHub Releases GitHub Issues

Join us on Discord

SampSharp is a plugin and library that allows you to write San Andreas: Multiplayer(SA-MP) gamemodes in C#. SampSharp's aim is to allow you to enjoy all features of object-oriented programming and .NET. SampSharp uses the .NET runtime which allows the plugin to run on both Windows and Linux server. For information about installing and building SampSharp, check the documentation. If you have any questions, feel free to join our Discord chat or file an issue.

Documentation

The SampSharp .NET packages provided are available on NuGet.org and contains all API documentation. Additional documentation is available on https://sampsharp.net/ and https://api.sampsharp.net/

Examples

Some example gamemodes are available here:

  • GrandLarc (GM) - SA-MP default gamemode "grandlarc" ported to C# using SampSharp.GameMode
  • GrandLarc (ECS) - SA-MP default gamemode "grandlarc" ported to C# using SampSharp.Entities
  • RiverShell (GM) - SA-MP default gamemode "rivershell" ported to C# using SampSharp.GameMode

Building SampSharp

In order to build the .NET libraries you can simply open and build SampSharp.sln using Visual Studio 2022, or you can build it from the command line using dotnet (version 6 or newer) dotnet publish SampSharp.sln --configuration Release.

To build the plugin on Windows, build SampSharp.Plugin.sln with Visual Studio 2022. You'll need to have the "Desktop development with C++" workload installed using Visal Studio Installer.

To build the plugin on Linux you'll at least need to have the packages make gcc g++ gcc-multilib g++-multilib installed. Run make to build the plugin.