Skip to content
This repository has been archived by the owner on Jun 30, 2018. It is now read-only.

Source Code and Explanation

EmilSayahi edited this page Oct 3, 2014 · 2 revisions

NOTE: any < or > characters do not render correctly on this page. Meaning #include sourcemod actually has < and > around it.
#pragma semicolon 1

#include sourcemod

public Plugin:myinfo = {
name = “Hello!”,
author = “Emil Sayahi (Gamer1207)”,
description = “Says Hello!”,
version = “1.0.0.0”,
url = “http://www.emilsayahi.tk/”
};

public OnPluginStart() {
RegConsoleCmd(“sm_hello”, Command_Hello, “Displays a greeting message.”);
}

public Action:Command_Hello(client, args) {
PrintToChat(client, “Hello!”);
return Plugin_Handled;
}

Understanding:
At the top #include sourcemod includes the Sourcemod include file. public OnPluginStart() {
RegConsoleCmd(“sm_hello”, Command_Hello, “Displays a greeting message.”);
}
Makes a console command, as sm_hello.
public Action:Command_Hello(client, args) {
PrintToChat(client, “Hello!”);
return Plugin_Handled;
}
This makes the command say “Hello!” in the chat.

Hello Plugin

Clone this wiki locally