Hi, i have a question. I found this;
Quote:
#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
}
|
Okay, this is for write in file. But i want to Update and delete them.
Like that;
amx_list
it shows me users and passwords on my console. in of the file.
amx_delete nick
it finds the user in file and deletes it.
amx_update nick newnick
it finds the user in file and updates it.
Sorry for my bad english
I hope you understand. Thank you...