Skip to content

Releases: spc-samp/samp-injector

SA-MP Injector Executable

26 May 14:12
1b6f77e

Choose a tag to compare

SA-MP Injector Executable is an executable designed to automate the launch of GTA: San Andreas with the multiplayer modules SA-MP and OMP.

While it can be used directly via the command line, samp-injector.exe is especially designed to be embedded in custom launchers and other applications. It enables you to quickly configure your game to connect to any server by simply providing the injection mode (samp or omp), game directory, nickname, server IP and port, and optionally, a password.

Highlights:

  • Dynamic Injection: Supports injection of samp.dll (for SA-MP) or both samp.dll and omp-client.dll (for OMP).
  • Custom Parameters: Connect to specific servers with defined nickname, IP, port, and password.
  • Command-Line Interface: Perfect for use in scripts, custom launchers, or directly from the terminal.
  • Built with the C++ Library: The executable is a practical application of the SA-MP Injector C++ library, ensuring performance and reliability.

How to Use:

samp-injector.exe is a command-line tool. Below are basic examples:

SA-MP Mode:

samp-injector.exe "samp" "C:\Games\GTA San Andreas" "Name" "127.0.0.1" "7777" "password (optional)"

OMP Mode:

samp-injector.exe "omp" "C:\Games\GTA San Andreas" "Name" "127.0.0.1" "7777" "password (optional)"

Parameters:

  1. <mode>: Either samp or omp.
  2. <game_directory>: Full path to your GTA:SA directory (e.g., "C:\Games\GTA San Andreas").
  3. <nickname>: Your in-game username.
  4. <ip>: The server’s IP address or domain name.
  5. <port>: The server’s port (e.g., 7777).
  6. <password (optional)>: Server password, if required.

For more details and advanced use cases (including integration with other applications), please refer to the full project documentation on GitHub.

SA-MP Injector DLL

07 Jul 11:29
1b6f77e

Choose a tag to compare

SA-MP Injector Dynamic-Link Library (DLL) is a dynamic-link library (.dll) designed to provide a direct, programmatic API for launching GTA: San Andreas with the multiplayer modules SA-MP and OMP.

Unlike the command-line executable, samp-injector.dll is designed for deeper integration into custom launchers and applications. It allows you to seamlessly embed the injection logic into your own program by calling a single, simple function, eliminating the need to manage external processes.

Highlights:

  • Dynamic Injection: Supports injection of samp.dll (for SA-MP) or both samp.dll and omp-client.dll (for OMP).
  • API-Driven Parameters: Configure the connection by passing the nickname, IP, port, and password directly as function arguments.
  • Language-Agnostic Interface: Provides a stable C-style API (__stdcall convention) that can be called from a wide range of programming languages, including C#, C++, Python, Delphi, and more.
  • Built with the C++ Library: The DLL is a lightweight wrapper around the core SA-MP Injector C++ library, ensuring performance and reliability.

How to Use:

samp-injector.dll is used by importing and calling its Launch_Game function. Below is a basic example in C#:

using System.Runtime.InteropServices;

public class Launcher
{
    // Import the function from the DLL, specifying the API contract.
    [DllImport("samp-injector.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall, EntryPoint = "Launch_Game")]
    private static extern int Launch_Game(string mode, string folder, string nickname, string ip, string port, string password);

    public void Start_Game() {
        string gta_folder = "C:\\Games\\GTA San Andreas"; // Use the actual path!

        // Call the function directly from your code.
        int result = Launch_Game(
            "samp",
            gta_folder,
            "Name",
            "127.0.0.1",
            "7777",
            null // or an empty string "" if there is no password
        );

        if (result != 0) {
            // The DLL will show its own error, but you can add custom logging.
            Console.WriteLine($"The call to Launch_Game failed with code: {result}");
        }
    }
}

Parameters:

The Launch_Game function accepts the following parameters (as wide character strings):

  1. mode: Either L"samp" or L"omp".
  2. folder: Full path to your GTA:SA directory (e.g., L"C:\\Games\\GTA San Andreas").
  3. nickname: Your in-game username.
  4. ip: The server’s IP address or domain name.
  5. port: The server’s port (e.g., L"7777").
  6. password (optional): Server password. You can safely pass null or an empty string (L"") if not required.

For more details and advanced use cases (including examples in other languages), please refer to the full project documentation on GitHub.