Bugsy thts how i save:
the thing is, the player can set a username & password.
When the username is already taken the plugin shoud stop the register and send a message "Invalid Username". But i can take the name "mottzi" many times.
PHP Code:
public cmdnewname(id)
{
read_args(name[id], 99)
remove_quotes(name[id])
if(nvault_get(n_vault, name[id]) == 0 && containi(name[id], " ") == -1)
{
client_cmd(id, "messagemode _newpassword")
}
if(nvault_get(n_vault, name[id]) != 0)
{
client_cmd(id, "messagemode _newname")
client_print(id, print_chat, "[Login] Invalid Username!")
}
}
public cmdnewpassword(id)
{
read_args(password[id], 99)
remove_quotes(password[id])
if(containi(password[id], " ") == -1)
{
nvault_set(n_vault, name[id], password[id])
client_print(id, print_chat, "[Login] You createt a new Account! Username: %s Password: %s", name[id], password[id])
}
}
__________________