Hello everyone. I've decided to try my hand at learning how these plugins work and to maybe write a few (one day). I've read the tutorials from mod.net and some that I have found links to on this site.
The plugin that I am starting off with is the Say_BS plugin from f117bomb because it's really short.
Code:
/* AMXMOD script.
*
* (c) Copyright 2000-2002, f117bomb
* This file is provided as is (no warranties).
*
*/
#include <amxmod>
new phrase[4][] = { "bs", "bullshit", "bullsh*t", "hack"}
public say_event(id)
{
new sid[10]
num_to_str(id,sid,10)
new said[192]
read_args(said,191)
for(new i = 0 ;i < 4; i += 1)
if(containi(said,phrase[i]) != -1)
set_task(1.0,"client",0,sid,10)
}
public client(sid[])
{
new id = str_to_num(sid)
engclient_cmd(id,"say", "But then agian, I am a noob...")
}
public plugin_init()
{
register_plugin("Say BS","0.3","f117bomb")
register_clcmd("say","say_event")
return PLUGIN_CONTINUE
}
Im trying to figure as much of this out on my own as I can so my question for now is what does the line "new sid[10]" do? What does sid mean, and what is the significance of the 10?
Thanks for the help.