NOTE: The v2 module is still a work in progress and not ready for production use.
Repository containing the new JS module v2 module for alt:V multiplayer.
Directory | Description |
---|---|
/client | Clientside JS module powered by V8 |
/server | Serverside JS module powered by Node.js |
/shared | Shared code for the clientside & serverside module |
/docs | Documentation for the internal workings of the module |
/deps | Global dependencies |
/tools | Scripts for any tooling related to the module |
/types | Typings for the API |
All contributions are greatly appreciated. If there are any questions or you would like to discuss a feature, contact the module maintainer.
NOTE: Client modules are only loaded when you are on the dev
branch and have debug
mode enabled.
-
Download the latest
js-module-v2-windows-client.zip
file from the Releases page. -
Copy the
modules
folder into your alt:V client directory (the folder wherealtv.exe
is located). -
Once you start alt:V, a popup will appear, asking whether you want to run unofficial modules. Click "Yes"
NOTE: Your server must be on the latest dev
branch for the module to load correctly.
-
Download the latest
js-module-v2-windows-server.zip
orjs-module-v2-linux.zip
file from the Releases page. -
Copy the
modules/js-module-v2.*
files (for Windows) orlibjs-module-v2.so
file (for Linux) into your server'smodules
folder. -
Copy the
libnodev2.dll
file (for Windows) orlibnodev2.so
file (for Linux) into the root folder of your server, where youraltv-server.exe
(for Windows) oraltv-server
(for Linux) executable is located. -
Load the module by adding
'js-module-v2'
to the array of modules in yourserver.toml
file. -
Create a resource with
type = "jsv2"
andclient-type = "jsv2"
inresource.toml
file.
Alternatively, you can also download the server module from the official alt:V CDN server:
-
Windows: https://cdn.alt-mp.com/js-module-v2/dev/x64_win32/update.json
-
Linux: https://cdn.alt-mp.com/js-module-v2/dev/x64_linux/update.json
Add this to resource.toml
to use v1 API (alt-client
, alt-server
, etc.)
[js-module-v2]
compatibilityEnabled = true