Change password
#9

PHP код:
CMD:changepass(playeridparams[])
{
    if(!
fexist(UserPath(playerid))) //We checked if you are registered, if it is not would create a file with the password but would have no statistics:
        
return SendClientMessage(playerid, -1,"You need to be registred in first.");
    if(
isnull(params)) // We note that the text you entered is not null.
        
return SendClientMessage(playerid, -1,"USAGE: /changepass [new pass]");
    if(
strlen(params) < || strlen(params) > 15// We note that the text entered is 3 to 15 characters.
        
return SendClientMessage(playerid, -1"Leght the new password incorrect, min 3 characters, max 15.");
    
SendClientMessage(playerid, -1"You hace successfully changed your password."); // message password changed successfully.
    
new INI:File INI_Open(UserPath(playerid)); // Open file the player.
    
INI_SetTag(File,"data"); // set tag data if exist write tag.
    
INI_WriteInt(File,"Password"udb_hash(params)); // write new password.
    
INI_Close(File); // close file.
    
return true// end command.

The code that left @Kaliber would create one file and change the password to a player that is not registered. Forgive me for my bad english, i'm sorry, my native language is another but i try to do my best, sorry .
Reply


Messages In This Thread
Change password - by _GHT_MarK445 - 11.03.2015, 15:46
AW: Change password - by Kaliber - 11.03.2015, 15:52
Respuesta: AW: Change password - by JuanStone - 11.03.2015, 16:04
AW: Respuesta: AW: Change password - by Kaliber - 11.03.2015, 16:07
Re: Change password - by _GHT_MarK445 - 11.03.2015, 16:14
AW: Re: Change password - by Kaliber - 11.03.2015, 16:15
Re: Change password - by _GHT_MarK445 - 11.03.2015, 16:18
AW: Change password - by Kaliber - 11.03.2015, 16:23
Respuesta: Change password - by JuanStone - 11.03.2015, 16:31
AW: Respuesta: Change password - by Kaliber - 11.03.2015, 16:33

Forum Jump:


Users browsing this thread: 1 Guest(s)