-
Notifications
You must be signed in to change notification settings - Fork 119
Creating a new plugin in plugin sdk
To create a new plugin, create a new Plugin-SDK project in your IDE.
This page assumes that you have fully set up your development environment, environment variables, and built the needed plugins, if not, please check out:
Currently there are two ways to create your plugin, the old way might still work for older versions of Visual Studio, but does not work for the 2022 version and probably future versions.
The new way should support all versions of Visual Studio.
In your plugin-sdk root folder, launch the script ./tools/myplugin-gen/Generate MyPlugin.bat
A command prompt will be spawned, asking you for the game you want to create a plugin for, as of the time of writing, here are the supported inputs:
GTA2
GTA3
GTAVC
GTASA
GTA4
You can also type HELP
for the list of allowed inputs.
Once a game has been chosen, you will be asked for a project name, the name cannot be empty.
Finally, you will need to enter your Visual Studio version for the project.
Your project will be generated in the directory ./tools/myplugin-gen/generated/
as a directory with the project name you entered as identifier, this directory will contain the sln
file inside the project_files
directory.
You can now open this file with Visual Studio to start working on your plugin.
Select File
>New
>Project...
in the menu.
In the project creation window, select category Visual C++
>Plugin-SDK
, and select Plugin-SDK Project
template.
Then, in the Plugin-SDK Project Wizard window, configure the project and complete the creation.
! You can use Special variables for Project Wizard
Select File
>New
>Project...
in the menu. In the project creation window, select Plugin-SDK
category and Plugin-SDK Project
template.
! Try not to use space characters in project paths in Code::Blocks
Then, in the Plugin-SDK Project Wizard window, configure the project and complete the creation.
! You can use Special variables for Project Wizard
The project is ready for building right after the creation.
When building a final version of your plugin, use Release
mode.