This repo will do everything for you; including download the latest server files.
Install NodeJS Prior to Starting
-
Open a command prompt in a folder.
-
Run this:
git clone https://github.com/Stuyk/altv-quickstart
cd altv-quickstart
-
Run the code block below this.
5.1. This can be used whenever you need to update your server files.
5.2. Run the code block below; wait for packages to install.
5.2. Then follow the instructions on screen.
npm run update
-
Bootup the Server
3.1. This script downloads for Linux or Windows automatically.
3.2. Use a screen on Linux to run the server in the background.
3.3. Use a built in command prompt such as in VSCode to run the server.
3.4. You may press
Ctrl + C
to stop the server at any time.
Linux:
./start.sh
Windows (CMD):
altv-server.exe
Windows (Powershell):
./altv-server.exe
Adding Typings Naturally to the Project:
- Run the following where your package.json is.
npm i -D @altv/native-types
-
Replace current imports with these special imports.
2.1 For Server:
/// <reference types="@altv/types" />
import * as alt from 'alt-server'
2.2 For Client:
/// <reference types="@altv/types" />
import * as alt from 'alt-client'