 |
|
Senior Member
Join Date: Jan 2006
Location: Behind you >:D
|

03-23-2006
, 15:13
|
#8
|
Quote:
|
Originally Posted by Brad
Something more like this:
Code:
#include <amxmodx>
public plugin_init()
{
register_clcmd("say" , "hook_say");
register_clcmd("say_team" , "hook_say");
register_cvar("allowtalk","1");
}
public hook_say(id)
{
if(!get_cvar_num("allowtalk"))
{
client_print(id,print_chat,"[AMXX] You may not speak now.");
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
Or in AMXX 1.70 or later...
Code:
#include <amxmodx>
new g_cvarAllowTalk;
public plugin_init()
{
register_clcmd("say" , "hook_say");
register_clcmd("say_team" , "hook_say");
g_cvarAllowTalk = register_cvar("allowtalk","1");
}
public hook_say(id)
{
if(!get_pcvar_num(g_cvarAllowTalk))
{
client_print(id,print_chat,"[AMXX] You may not speak now.");
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
|
this is for amxx 1.01 and the specialists
|
|
|
|