11Getting started
22===============
33
4- If you are new to Source.Python this is the right place for you!
4+ If you would like to start developing server plugins with Source.Python this is
5+ the right place for you!
56
6- In order to use Source.Python you need to install it on your game server. To
7+ In order to use Source.Python you first need to install it on your game server. To
78do so, please follow the instructions described :doc: `here <../general/installation >`.
89
910As soon as you have successfully installed Source.Python you can start writing
@@ -20,14 +21,14 @@ To do so, please create a directory in Source.Python's plugin directory
2021(``../addons/source-python/plugins ``). All plugins will be located in this
2122directory and must have their own sub-directory. Give the new created
2223directory an abitrary name (e.g. test1). Now, you need to create the actual
23- plugin file. It must be named after its directory. So, if you have created a
24+ plugin file. It must be named like its directory. So, if you have created a
2425``test1 `` directory, you have to create a ``test1.py `` in that directory.
2526
2627The first plugin should simply print a message to the server console, when the
2728plugin has been loaded and another message when the plugin has been unloaded.
2829You can easily do that by adding a ``load `` and an ``unload `` function to your
2930plugin file. These two functions will be called by Source.Python when the
30- plugin has been loaded or unloaded.
31+ plugin is loaded or unloaded.
3132
3233To print a message to the console you can use Python's
3334`print <https://docs.python.org/3.4/library/functions.html#print >`_ function.
@@ -46,6 +47,14 @@ Your plugin should now look like this.
4647 print (' Plugin has been unloaded successfully!' )
4748
4849
50+ To load your plugin enter ``sp plugin load test1 `` in your server console. To
51+ unload or reload it, you can use ``sp plugin reload test1 `` or
52+ ``sp plugin unload test1 ``.
53+ Source.Python plugins are not getting loaded automatically. Thus, you need to
54+ add the statement ``sp plugin load test1 `` to your ``autoexec.cfg `` if you wish
55+ this behaviour.
56+
57+
4958Modifying your first plugin
5059---------------------------
5160
@@ -157,7 +166,7 @@ What's next?
157166------------
158167
159168You should definitely take a look at the :doc: `module tutorials section <module_tutorials >`.
160- It contains detailed tutorials about Source.Python modules/packages.
169+ It contains detailed tutorials about some Source.Python modules/packages.
161170
162171Moreover, you should take a look at the :ref: `modindex `. It's a list of all
163172Source.Python modules/packages and contains the API documentation.
0 commit comments