Raised This Month: $ Target: $400
 0% 

If (nvault key exist)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 08-07-2010 , 10:13   Re: If (nvault key exist)
Reply With Quote #4

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_vaultname[id]) == && containi(name[id], " ") == -1)
    {
        
client_cmd(id"messagemode _newpassword")
    }
    if(
nvault_get(n_vaultname[id]) != 0)
    {
        
client_cmd(id"messagemode _newname")
        
client_print(idprint_chat"[Login] Invalid Username!")
    }
}

public 
cmdnewpassword(id)
{
    
read_args(password[id], 99)
    
remove_quotes(password[id])
    
    if(
containi(password[id], " ") == -1)
    {
        
nvault_set(n_vaultname[id], password[id])
        
client_print(idprint_chat"[Login] You createt a new Account! Username: %s  Password: %s"name[id], password[id])
    }

__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers

Last edited by mottzi; 08-07-2010 at 10:46.
mottzi is offline
Send a message via MSN to mottzi
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:17.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode