Can you show me example please ? I'm very begginer in scripting.
Is it something like this?
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "mute"
#define VERSION "1.0"
#define AUTHOR "monolit"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say ", "CmdSay")
}
public CmdSay(id)
{
static arg[60]
read_argv(1, arg, charsmax(arg))
if(arg[0] != '!')
return PLUGIN_CONTINUE;
if(equal(arg, "!mute", 5))
{
new target[20], mutetime[7], reason[40]
replace(arg, charsmax(arg), "!mute ", "")
strbreak ( arg, target, sizeof target-1, mutetime, sizeof mutetime-1 )
replace(arg, charsmax(arg), target, "")
replace(arg, charsmax(arg), mutetime, "")
copy(reason, charsmax(reason), arg)
client_print(id, print_console, "^nTarget: %s", target)
client_print(id, print_console, "Time: %d", mutetime)
client_print(id, print_console, "Reason: %s", reason)
return PLUGIN_HANDLED_MAIN;
}
return PLUGIN_CONTINUE;
}
Also what is the difference between
Charsmax(smth) and
sizeof smth-1