Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SourcePawn #79

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions sourcepawn/README.md
Original file line number Diff line number Diff line change
@@ -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)
Binary file added sourcepawn/hello.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions sourcepawn/hello.sp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#pragma semicolon 1

#define DEBUG

#define PLUGIN_AUTHOR "PauldeKoning"
#define PLUGIN_VERSION "1.00"

#include <sourcemod>
#include <sdktools>

#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!");
}