Code:
#include <amxmodx>
#include <amxmisc>
#include <file>
#include <string>
#define PLUGIN "Add Ent Access"
#define VERSION "1.0"
#define AUTHOR "Fluffy"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("amx_addentuser", "addenter", ADMIN_LEVEL_B, "- adds an EntMod User <target> <pass>")
register_clcmd("amx_delentuser", "delenter", ADMIN_LEVEL_B, "- deletes an EntMod User")
}
public addenter(id, level, cid)
{
if (!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED
new Player[24]
read_argv(1, Player, 23)
new Password[24]
read_argv(2, Password, 23)
remove_quotes(Player);
remove_quotes(Password);
new PlayerID[24] = get_user_userid(Player)
new szFile[24]
format( szFile, 23, "addons/EntMod/DF_admins.txt")
write_file(szFile,"%s;%s;1 //%s",PlayerID,Password,Player,-1)
}