This repository is for you who wants to make open.mp compatible with sampctl. With some little tweaks, it manages to be able to work together:
- Excluding
LegacyOptioncomponent inconfig.jsonso it won't automatically parseserver.cfggenerated by sampctl. - Changing sampctl runtime to
main, making it unable to run the server normally. So now,sampctl runis only used to re-ensure the plugins. This makes sampctl being a package management tool only. - Adding
components/additionsfolder for you to put non-open.mp native components, so that you won't be pushing the open.mp native components to your repo.
Clone this repository:
git clone https://github.com/Hreesang/openmp-sampctl-boilerplate.git
cd openmp-sampctl-boilerplate
sampctl ensureOnce it's fully downloaded and ensured, now it's your time to be creative.
To build a gamemode, you have to change the entry and output file on pawn.json then simply do
sampctl buildNext, open config.json and change pawn.main_scripts to be your gamemode names, it works the same like SA:MP's server.cfg but in array.
To run your server, you have to manually, yes manually, download the open.mp's files from here and place it inside the root directory but do not overwrite/replace the config.json. Then, you do
omp-serverMove the binaries (.dll and .so files) to components/additions folder and its include file (.inc) to legacy/ folder. Then, open config.json and add additions/component_name on the components array var. Yes again, you need to do it manually.
{
"components": ["...", "additions/component_name"]
}Same with how you normally add SA:MP plugins with sampctl, but now you need to open config.json and add the binaries' names on pawn.legacy_plugins array var.
{
"pawn": {
"legacy_plugins": ["crashdetect", "PawnPlus", "..."]
}
}Q: What did you do with SA:MP default gamemodes?
A: I made them to adapt open.mp natives, especially the tags.