Changepassword Command
#4

PHP код:
CMD:changepassword(playerid,params[])
{
    new 
size=strlen(params);
    if(
size 15 || size 3) return SendClientMessage(playerid,-1,"Password should be between 3-15 characters.");
    new 
INI:File INI_Open(UserPath(playerid));
    
INI_SetTag(File,"data");
    
INI_WriteInt(File,"Password",udb_hash(params));
    
INI_Close(File);  
    
SendClientMessage(playerid,-1,"Password changed");
    return 
1;

Remember this is a working example, but you must always check if the player is logged in before he uses this command.
Reply


Messages In This Thread
Changepassword Command - by Lixyde - 07.03.2018, 18:02
Re: Changepassword Command - by AroseKhanNiazi - 07.03.2018, 22:12
Re: Changepassword Command - by Lixyde - 08.03.2018, 07:39
Re: Changepassword Command - by AroseKhanNiazi - 08.03.2018, 08:37
Re: Changepassword Command - by Lixyde - 08.03.2018, 17:21
Re: Changepassword Command - by AroseKhanNiazi - 08.03.2018, 17:32
Re: Changepassword Command - by Lixyde - 08.03.2018, 18:47

Forum Jump:


Users browsing this thread: 3 Guest(s)