Setup Edit this page on GitHub


In order to get started with SampSharp, you'll need to install a few things:

SA-MP Server

The SA-MP Server package can be downloaded from the SA-MP website. Once unzipped, open the server.cfg file with a text editor.

As of SampSharp 0.8:

echo Executing Server Config...
lanmode 0
rcon_password mysecurepassword
maxplayers 50
port 7777
hostname SA-MP 0.3 Server
gamemode0 empty 1
gamemode path/to/your/Gamemode.dll
coreclr path/to/downloaded/dotnet-runtime/
announce 0
chatlogging 0
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
logtimeformat [%H:%M:%S]
language English
plugins SampSharp

Dotnet runtime

The dotnet runtime package can be downloaded from the Microsoft website for windows or in case of linux there's a unofficial runtime located here (refs issue #25).

For Windows the value in the server config should look something like:

corclr path/to/downloaded/dotnet-runtime-2.1.1-win-x86/shared/Microsoft.NETCore.App/2.1.1

for the unofficial linux dotnet runtime:

coreclr path/to/downloaded/dotnet-runtime/

SampSharp Plugin

The plugin can be downloaded from the releases page on GitHub. Copy the contents of the folder in the ZIP file to your SA-MP server directory.

Visual Studio and .NET Core

Download and install Visual Studio from the Visual Studio website. The Community Edition can be downloaded for free. During the setup process make sure to mark the ".NET Core cross-platform development" workload for installation.

NuGet Repository

SampSharp hosts it own NuGet package repository which contains the framework and various other SampSharp related packages. In order to uses these packages, you have to add the repository to your package manager.

  1. In Visual Studio's toolbar click on Tools > Options...
  2. In the left menu, select NuGet Package Manager > Package Sources
  3. Click on the big +(plus) icon in the upper right corner of the window.
  4. In the Name field type SampSharp.
  5. In the Source field type
  6. Click on OK.

Packages Sources window in Visual Studio