blockshas.blogg.se

Developing sourcemod plugins
Developing sourcemod plugins










  1. DEVELOPING SOURCEMOD PLUGINS HOW TO
  2. DEVELOPING SOURCEMOD PLUGINS CODE

In the example above, the unpack declaration for sourcemod says to unpack the /addons directory to /addons. The build root is a hidden directory maintained by sourceknight which will contain the entire sourcemod tree (i.e., it will contain the addons directory) as well as any other dependencies and sources specified by your project.

developing sourcemod plugins

  • Optional: version, which can be manually specified to help prevent re-downloading the same file unnecessarilyīoth of these types of dependencies must have an unpack block, which tells us which files to copy out of them and where they belong relative to the sourceknight build root.
  • location: URL to download the tar file from.
  • Right now, only two types are supported: git and tar, which refer to git repositories and tar archives, respectively.

    DEVELOPING SOURCEMOD PLUGINS HOW TO

    The type tells sourceknight how to acquire the dependency.ĭepending on the type, different additional fields may be required. The most important keys in your dependency declarations are its name, its type, and unpack instructions.

    DEVELOPING SOURCEMOD PLUGINS CODE

    You will likely need to specify the sourcemod dependency for every project because it provides the compiler for sourcepawn code ( spcomp) as well as several essential headers. Dependenciesĭependencies describe any external code, including external plugins you want to build, include files you need, and even sourcemod itself. This allows users to be warned if they need to update. The sourceknight key specifies the version of sourceknight this package was designed for. (Technically, it isn't even required to be specified right now, but that might change.)

    developing sourcemod plugins

    The name key specifies the name of your project. Here, we're just telling sourceknight where to download sourcemod itself, and specifying that we want to build myplugin.ĭetails about the individual sections of the project file follow. source: /addons dest: /addons root: / targets: name: sourcemod type: tar version: 1.10.0-git6503 location: unpack: Name: myplugin-example sourceknight: 0.1 dependencies:












    Developing sourcemod plugins