Welcome to SampSharp

Build powerful open.mp game modes with modern C# and a proven Entity-Component-System architecture.

What is SampSharp?

SampSharp is a framework that lets you write open.mp game modes in C# instead of Pawn. Powered by the .NET runtime, it brings modern programming practices, strong typing, and access to the entire NuGet ecosystem to SA-MP/open.mp development.

The new SampSharp v1.x (for open.mp) features an Entity-Component-System (ECS) architecture that makes your code more modular, testable, and maintainable compared to traditional callback-based approaches.

Why Choose SampSharp?

🎯 ECS Architecture

Build scalable systems with clear separation of concerns using the Entity-Component-System pattern

🔷 Modern C#

Write type-safe, expressive code with the latest C# language features and LINQ

High Performance

.NET's performance and JIT compilation deliver efficient game mode execution

📦 NuGet Ecosystem

Use thousands of mature, reliable libraries for logging, JSON, async operations, and more

🖥️ Multi-Platform

Run seamlessly on Windows and Linux servers

Rich Tooling

Get IntelliSense, debugging, and refactoring support from Visual Studio and VS Code. Deploy easily with Docker for consistent environments

class PlayerSystem : ISystem
{
    [Event]
    public void OnPlayerConnect(Player player)
    {
        player.SendClientMessage($"Welcome {player.Name}! You're the {player.Id}th player.");
        Console.WriteLine($"{player.Name} connected to the server.");
    }

    [Event]
    public void OnPlayerDisconnect(Player player)
    {
        Console.WriteLine($"{player.Name} disconnected from the server.");
    }
}

Getting Started

Ready to build? Check out the resources below:


Community & Support

Have questions? Join us on Discord or visit the GitHub repository.