GTA3script for Visual Studio Code
This is an extension for VSCode which adds support for GTA3script:
- Syntax highlighting.
- Documentation for commands and its arguments.
Installing & Configuring
First, you will need to install Visual Studio Code. Then, in the command pallete (
Install Extension and choose
Then, you need to configure the extension with the path to a compiler and path to the game executable (optional). Go to
File > Preferences > User Settings and paste the following within the curly brackets:
And replace the settings apropriately. The final result should look like this.
.sc script file using Visual Studio Code and start coding! When in doubt of what to type, try pressing
ctrl-space for auto-completion.
f6 or execute
GTA3script: Build to compile this script.
f7 or execute
GTA3script: Build and Run to compile and run the game in case of success.
ctrl-f7 or execute
GTA3script: Run to run the game.
If, instead of opening a
.sc file, you open a workspace (
File > Open Folder), all the
*.sc files in the root of the workspace folder are going to be compiled instead of the one currently open in the editor.
Additionally, do notice the status bars at the lower right corner while a
.sc file is open:
- Click on the game status (
GTASA in the image above) to select the target game to compile and run.
- Click on the type flag (
CS in the image above) to select compilation options, including whether to compile a custom script, custom mission or a multifile script.
GTA3script: Select Game and
GTA3script: Build Flags are the analogues of this status bar.
Selecting a game is always set as a user setting (i.e. not a workspace setting). Build flags, however, are set as workspace settings if there's a workspace open, otherwise as a user setting.
Although, most of the settings can be set within commands embeded in VSCode by this extension, advanced users may desire to have more control over their settings. The following Visual Studio Code settings are available. These can be set in user preferences (
ctrl+,) or workspace settings (
"gtasa": ["--guesser", "--cs"]
"gta3script.docprovider": ["GTAModding", "GTAG Opcode Database"],