Use C# and .NET to create your own SA:MP Gamemode.
DISCLAIMER: Due to missing support by Microsoft there is currently no support for .NET on linux x86! This plugin will still be published for linux, but there is currently no .NET 5.0 runtime for linux x86.
sampctl package install Micky5991/samp-dotnet
- Download the latest zip release of SAMP.Net for your platform.
- Unpack the content of the plugin to your SA:MP server.
- Install the .NET runtime of your choice. (Will be provided on windows)
- Change the configuration of the
server.cfg
. - Start developing your first gamemode.
SAMP.Net provides some configurations in the server.cfg
to change the behavior of this plugin.
Key | Type | Default | Description |
---|---|---|---|
dotnet_gamemode | string | empty | Specifies where your main DLL of your gamemode is, relative to the dotnet/gamemodes/ folder. |
In this example we specified the path of the main dll. This will look for your gamemode in dotnet/gamemodes/net5.0/Micky5991.Samp.Net.Example.dll
.
echo Executing Server Config...
lanmode 0
rcon_password changeme
maxplayers 50
port 7777
hostname SA-MP 0.3 Server
gamemode0 grandlarc 1
filterscripts
announce 0
chatlogging 0
weburl www.sa-mp.com
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
logtimeformat [%H:%M:%S]
language English
dotnet_gamemode net5.0/Micky5991.Samp.Net.Example.dll
To develop your first SAMP.Net gamemode, you must fulfill these requirements:
- Knowledge in C#
- .NET SDK installed on your system.
- IDE / Text editor to develop and test on. (Visual Studio Code / Visual Studio / JetBrains Rider)
- Recommended: sampctl
Package | Description |
---|---|
Micky5991.Samp.Net.Framework | .NET Standard 2.0 / 2.1 library that provides types and tools for your first gamemode. You only need this package to start creating your first gamemode. |
Micky5991.Samp.Net.Core | Provides core functionality to other parts of SAMP.Net. |
Micky5991.Samp.Net.Generators | Generates APIs for natives, events and constants by reading sampgdk .idl files using C# source generators |
Micky5991.Samp.Net.Commands | Optional extension that adds command handling to your gamemode. |
- Zeex for sampgdk, subhook, configreader
- SA:MP team for San Andreas Multiplayer
SAMP.Net is licensed under the MIT license.