-
Notifications
You must be signed in to change notification settings - Fork 5
Run resource
Learn how to set up and run a alt:V Go resource
At first we will create a resource folder for our gofreeroom library from the Create project guide.
mkdir resources/gofreeroomAfterwards copy the built shared library into the newly created folder.
In our example the lib is called gofreeroom.so (on linux) / gofreeroom.dll (on windows)
This is how the folder structure should look like:
server/
├── cache/
├── data/
├── modules/
├── go-module.dll # on Windows
├── libgo-module.so # on Linux
├── resources/
├── gofreeroom/
├── gofreeroom.dll # on Windows
├── gofreeroom.so # on Linux
├── altv-server.exe
├── server.tomlIn order to run a resource, the alt:V server requires a config file named resource.toml.
This file needs to be located at resources/your-resource-name/resource.toml. For our example the path is resources/gofreeroom/resource.toml.
We will use VS Code to edit the resource.toml
# run commands from alt:V server root directory
touch resources/gofreeroom/resource.toml
code resources/gofreeroom/resource.tomlMinimal resource.toml on windows:
type = 'go'
main = 'gofreeroom.dll'Minimal resource.tomlon linux:
type = 'go'
main = 'gofreeroom.so'Depending on your OS paste the appropriate minimal resource config content into the file. Your folder structure should look this:
server/
├── cache/
├── data/
├── modules/
├── go-module.dll # on Windows
├── libgo-module.so # on Linux
├── resources/
├── gofreeroom/
├── gofreeroom.dll # on Windows
├── gofreeroom.so # on Linux
├── resource.toml
├── altv-server.exe
├── server.tomlTo tell the alt:V server that it should load the new resource add it to the resources list in the server.toml config file:
Before
name = 'alt:V Server'
port = 7788
players = 128
# password = 'ultra-password'
announce = false
# token = 'YOUR_TOKEN'
gamemode = 'Freeroam'
website = 'example.com'
language = 'en'
description = 'alt:V Sample Server'
modules = [
'js-module',
'go-module'
]
resources = []After
name = 'alt:V Server'
port = 7788
players = 128
# password = 'ultra-password'
announce = false
# token = 'YOUR_TOKEN'
gamemode = 'Freeroam'
website = 'example.com'
language = 'en'
description = 'alt:V Sample Server'
modules = [
'js-module',
'go-module'
]
resources = [
'gofreeroom'
]🚀 You are ready to start the alt:V server!
You encountered a problem 💥? Check out the Troubleshooting Guide!
If you can't find a solution there file a new issue in this repository or contact me on Discord.