Hello im making plugin
With cvar admin enable and disable SAY(command y) (teamsay didnt touched)
Code:
#include <amxmodx>
#include <amxmisc>
new bool:g_eventSay = true
public plugin_init()
{
register_plugin("Message Block", "1.0", "aZT")
register_concmd("son", "dmb_on", ADMIN_ADMIN)
register_concmd("soff", "dmb_off", ADMIN_ADMIN)
register_clcmd("say", "event_say")
}
public dmb_on(id, level, cid)
{
if (!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED
client_print(id, print_chat, "Say komanda ijungta")
g_eventSay = true
return PLUGIN_CONTINUE
}
public dmb_off(id, level, cid)
{
if (!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED
client_print(id, print_chat, "Say isjungtas galite naudotis tik team_say")
g_eventSay = false
return PLUGIN_CONTINUE
}
public event_say()
{
if (g_eventSay == true)
{
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
when i trying turn on SAY(son) it continiuos disabled please help fix it.