#include <sourcemod> // This line includes all of the scripting inside sourcemod.inc when compiled
//note anything with //infornt is marked as a comment and is not included in the code
//this is our first real coding below, it just give info on the plugin, who made it, the name, ect
public Plugin:myinfo =
{
name = "Hello World!",
author = "Epicity",
description = "Tutorial #1",
version = "1.0",
url = "http://thediscussionzone.com"
}
//this says when the plugin starts or loads, do the following.
public OnPluginStart()
{
// This creats the command hello, ingame you would type /hello, or !hello
RegConsoleCmd("hello", HelloWorld); //the second part you see is HelloWorld after a comma, this is used for things such as public action.
}
public Action:HelloWorld(client,args) //see this is the public action, its basically saying, take the command !hello from above, and when its executed, do the following.
{ // "\n" is basically a line break.
PrintToChatAll("Hello world! \n This is my first SourcePawn plugin!") //this is saying when !hello is executed, the plugin will print to chat what ever is inside the quotes (viewable by everyone)
return Plugin_Continue;
}