Almost. Remember you can post code in [small][/small] tags.
Code:
#include <amxmodx>
#include <amxmisc>
public plugin_init() {
register_plugin("plugin name", "1.00", "plugin author")
register_clcmd("amx_adduser", "newuseradd")
}
public newuseradd(id) {
if ( ! is_user_admin(id) ) {
client_print(id, print_console, "You are not an administrator. Please refrain from using this command!")
return PLUGIN_HANDLED
}
new whattowrite[64], player[32], pass[28]
read_argv(1, player, 31)
read_argv(2, pass, 27)
new target = cmd_target(id, player, 9)
get_user_name(target, player, 31)
format(whattowrite, 63, "^"%s^" ^"%s^"", player, pass)
write_file("addons/amxmodx/nicks.txt", whattowrite)
client_print(id, print_console, "User %s, password %s wrote to file.", player, pass)
return PLUGIN_HANDLED
}