samp.directory
← Scripts et bibliothèques

Southclaws/go-samp-query

SA:MP Query API for Go

Outil★ 4mis à jour oct. 2025MITGo
Ouvrir sur GitHub

README.md

go-samp-query

Implements the SA:MP query mechanism for getting data about a running server.

See GoDoc for full documentation

Examples

Most of the time, you'll only need one function:

server, err := GetServerInfo(ctx, "192.168.1.1", true)
if err != nil {
    // handle
}

The attemptDecode parameter determines whether or not the library should attempt to guess the encoding of the text fields such as hostname etc.

If you want to get specific data about a server, you can create a query and selectively query for data:

query, err := NewLegacyQuery(host)
if err != nil {
    // handle
}
defer query.Close()

rules, err := query.GetRules(ctx)
if err != nil {
    return
}

sa-mp

Cette page est construite à partir de ce que GitHub publie sur le dépôt. samp.directory n’héberge pas le code. Signaler un problème avec cette fiche

Southclaws/go-samp-query : Outil SA-MP | samp.directory