ok, this is public
Code:
public add_rule(id,level,cid)
{
if( ! cmd_access ( id , level, cid , 2) )
return PLUGIN_HANDLED;
new g_FILE[128]
get_localinfo("amxx_configsdir",g_FILE,127)
format(g_FILE,127,"%s/sayrules.txt",g_FILE)
new text[32]
read_argv(1,text,31)
new fileh = fopen(g_FILE, "w");
if ( ! fileh )
return PLUGIN_CONTINUE
fprintf(fileh, "%s", text);
fclose(fileh);
return PLUGIN_HANDLED;
}
Sure, i register that public, with comand amx_addrule ;
So, i used command : amx_addrulle hello all
After i use command:
1) Cleared all information from my file
2) Added only "hello" on file