https://github.com/bios-marcel/sampcmd-go
Little tool to start SA-MP from within Go. This can also be used as a standalone executable.
https://github.com/bios-marcel/sampcmd-go
commandline go library sa-mp samp
Last synced: about 2 months ago
JSON representation
Little tool to start SA-MP from within Go. This can also be used as a standalone executable.
- Host: GitHub
- URL: https://github.com/bios-marcel/sampcmd-go
- Owner: Bios-Marcel
- License: mpl-2.0
- Created: 2018-09-30T10:14:13.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-10-05T17:37:10.000Z (over 7 years ago)
- Last Synced: 2025-02-23T16:06:45.598Z (over 1 year ago)
- Topics: commandline, go, library, sa-mp, samp
- Language: C
- Size: 30.3 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sampcmd-go
[](https://ci.appveyor.com/project/Bios-Marcel/sampcmd-go/branch/master)
[](https://godoc.org/github.com/Bios-Marcel/sampcmd-go/sampcmd)
This tool allows you to start SA-MP via the command line, alternatively it can be used as a go library.
## Commandline Usage
```cmd
sampcmd-go.exe -h 127.0.0.1 -p 7777 -n Name
```
## Golang usage
```GO
returnValue := sampcmd.LaunchSAMP("-h 127.0.0.1 -p 7777 -n Name")
if(returnValue != 0) {
fmt.Printf("An error occured. The application returned %d", returnValue)
}
```
For all available functions, check the documentation at [https://godoc.org/github.com/Bios-Marcel/sampcmd-go/sampcmd](https://godoc.org/github.com/Bios-Marcel/sampcmd-go/sampcmd).
## Available parameters
* `-d`
> Enables the debugging mode.
* `-c `
> Passes an RCON password to directly login as RCON administrator.
* `-h `
> Specifies the server that you want to join.
* `-p `
> Specified the servers port.
* `-n `
> Specifies the ingame username.
* `-z `
> Specifies a password necessary to join the server.
## Credits
Big thanks to [BigETI](https://github.com/BigETI/) for helping me on this one!