Difference between revisions of "Compiling SourceMod Plugins"

From AlliedModders Wiki
Jump to: navigation, search
(was a code paste)
(initial writeup based on forum post)
Line 1: Line 1:
 +
Ok, so you've read the [[Introduction to SourcePawn]] and [[Introduction to SourceMod Plugins]] and now you want to actually compile a plugin.
  
 +
You'll need the compiler which is included in the .../sourcemod/scripting/ folder of the [http://www.sourcemod.net/builds.php main distribution] (not the [http://www.sourcemod.net/sdk.php SDK]). Windows users will need [http://www.7-zip.org/ 7-zip] to extract the files.
 +
 +
In Windows, open up a command prompt (Start->Run or WindowsKey+R):
 +
cd <sourcemod>\scripting
 +
spcomp myplugin.sp
 +
[http://www.computerhope.com/cdhlp.htm cd command reference]
 +
 +
In Linux use:
 +
./spcomp myplugin.sp
 +
 +
Now simply move the .smx (not .sp) file from .../sourcemod/scripting/ to the .../sourcemod/plugins/ folder.
 +
 +
 +
[http://forums.alliedmods.net/showthread.php?t=52664 Reference Source]
 +
 +
See Also: [http://forums.alliedmods.net/forumdisplay.php?f=107 Scripting Forum]

Revision as of 13:13, 27 February 2008

Ok, so you've read the Introduction to SourcePawn and Introduction to SourceMod Plugins and now you want to actually compile a plugin.

You'll need the compiler which is included in the .../sourcemod/scripting/ folder of the main distribution (not the SDK). Windows users will need 7-zip to extract the files.

In Windows, open up a command prompt (Start->Run or WindowsKey+R):

cd <sourcemod>\scripting
spcomp myplugin.sp

cd command reference

In Linux use:

./spcomp myplugin.sp

Now simply move the .smx (not .sp) file from .../sourcemod/scripting/ to the .../sourcemod/plugins/ folder.


Reference Source

See Also: Scripting Forum