/changepassword cmd
#1

Hello,i've created a registration/login system and i need the /changepassword cmd just for admins.

I use dini/dudb to save users accounts,how to make it?Tell me if you need some variables or functions.Thanks.
Reply
#2

id need to see your script to help you bud.
Reply
#3

is the password of the players hashed?
Reply
#4

Quote:
Originally Posted by fordawinzz
Посмотреть сообщение
is the password of the players hashed?
Yes,in MD5

Quote:
Originally Posted by Skidmarks
Посмотреть сообщение
id need to see your script to help you bud.
What part?
Reply
#5

BUMP
Reply
#6

pawn Код:
if(strcmp(cmd,"/changepassword",true) == 0)
{
    if(PlayerInfo[playerid][Admin] <5) return 1;
    new id = -1;
    id = strval(strtok(cmdtext,idx));
    new password[256];
    password = strtok(cmdtext,idx);
    if(!IsPlayerConnected(id) || strval(password) == 0)return SendClientMessage(playerid,~0,"Use: /changepassword [playerid] [newpass]");
    new playername[40];GetPlayerName(id,playername,40);
    format(playername, 40, "Users/%s.ini",playername);
    dini_Set(playername,"Password",MD5(password));
    SendClientMessage(playerid,~0,"Password successeful changed!");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)