-
Notifications
You must be signed in to change notification settings - Fork 1
Source Code and Explanation
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 Wiki
Hello Plugin