Difference between revisions of "Compiling SourceMod Plugins"

From AlliedModders Wiki
Jump to: navigation, search
Line 13: Line 13:
 
Now simply move the .smx (not .sp) file from .../sourcemod/scripting/ to the .../sourcemod/plugins/ folder.
 
Now simply move the .smx (not .sp) file from .../sourcemod/scripting/ to the .../sourcemod/plugins/ folder.
  
 +
'''Note:''' When compiling preexisting plugins it is easiest to move the included from the plugin source folder to the include folder in your Sourcemod\scripting\include. Please see [[Spcomp_switches]] specifically the ''-i'' parameter for specifying a different folder for includes.
  
 
[http://forums.alliedmods.net/showthread.php?t=52664 Reference Source]
 
[http://forums.alliedmods.net/showthread.php?t=52664 Reference Source]
  
 
See Also: [http://forums.alliedmods.net/forumdisplay.php?f=107 Scripting Forum]
 
See Also: [http://forums.alliedmods.net/forumdisplay.php?f=107 Scripting Forum]

Revision as of 09:42, 15 April 2010

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 .tar.gz files.

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

cd <sourcemod>\scripting
spcomp myplugin.sp

cd command reference

In Linux use:

./compile.sh myplugin.sp

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

Note: When compiling preexisting plugins it is easiest to move the included from the plugin source folder to the include folder in your Sourcemod\scripting\include. Please see Spcomp_switches specifically the -i parameter for specifying a different folder for includes.

Reference Source

See Also: Scripting Forum