when you post a code use PHP tags
PHP Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "say_forum"
#define VERSION "1.0"
#define AUTHOR "Extreem"
new forum_Stranky // <- you forgot to make a cvar pointer
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /forum","showmotd", ADMIN_KICK, "Show Motd") // Access To Command ADMIN_KICK
register_clcmd("say_team /forum","showmotd", ADMIN_KICK, "Show Motd") // Access To Command ADMIN_KICK
forum_Stranky = register_cvar("forum_stranky","1")
}
public showmotd (id, level, cid)
{
if(!cmd_access(id, level, cid, 1)) // check if has access to command ( ADMIN_KICK )
return PLUGIN_HANDLED
// if (get_cvar_num(forum_Stranky == 1)) <- this is yours
if(get_pcvar_num(forum_Stranky) == 0) // <- should be like this use pcvar
return PLUGIN_HANDLED;
show_motd(id,"forum.txt")
return PLUGIN_CONTINUE;
}
__________________