diff --git a/sourcepawn/README.md b/sourcepawn/README.md new file mode 100644 index 0000000..da7ac08 --- /dev/null +++ b/sourcepawn/README.md @@ -0,0 +1,20 @@ +# SourcePawn + +## What is SourcePawn, SourceMod and Metamod:Source? +SourcePawn is a scripting language based on Pawn. + +Pawn is an embeddable, (almost) typeless, easy to use scripting language that is compiled for a virtual machine written in C. + +SourcePawn is used to create plugins for SourceMod. + +SourceMod is a plugin for Metamod:Source which is an API manager and interception handler that sits in between the source game engine and game modifications. + +## Installation + +- Download a game server that runs on the source engine and supports Metamod:source +- Download and install Metamod:source and SourceMod via https://wiki.alliedmods.net/Installing_SourceMod +- Compile the SourcePawn Script file using the compiler in the scripting folder (gamename/addons/sourcemod/scripting/) (example command: ./compile.sh hello.sp) +- Put the compiled file (hello.smx) in the plugins folder (gamename/addons/sourcemod/plugins/) +- Run the game server + +![screenshot](hello.png) diff --git a/sourcepawn/hello.png b/sourcepawn/hello.png new file mode 100644 index 0000000..52684da Binary files /dev/null and b/sourcepawn/hello.png differ diff --git a/sourcepawn/hello.sp b/sourcepawn/hello.sp new file mode 100644 index 0000000..292d8a2 --- /dev/null +++ b/sourcepawn/hello.sp @@ -0,0 +1,25 @@ +#pragma semicolon 1 + +#define DEBUG + +#define PLUGIN_AUTHOR "PauldeKoning" +#define PLUGIN_VERSION "1.00" + +#include +#include + +#pragma newdecls required + +public Plugin myinfo = +{ + name = "Hello World", + author = "PauldeKoning", + description = "Prints 'Hello World!' to the server console", + version = "1.00", + url = "https://github.com/PauldeKoning" +}; + +public void OnPluginStart() +{ + PrintToServer("Hello World!"); +}