cmd /changepass
#7

I have no idea how your functions/codes look like, the code below is just a typical example. Change it according to your own settings.

pawn Код:
if(!strcmp(cmd, "/changepass", true, 11))
    {
        new tmp[32];
        tmp = strtok(cmd, idx);
       
        if(strlen(tmp) < 5 || strlen(tmp) > 20)
        return SendClientMessage(playerid, -1, "Your new password needs to be within 5 - 20 characters.");
       
        format
        (
            PlayerInfo[playerid][pKey],
            sizeof PlayerInfo[playerid][pKey],
            "%s", MD5_hash(tmp) //<-- Just replace MD5_hash with the function you use.
        );

        new message[128];

        format
        (
            message,
            sizeof message,
            "Your new password has been set to: \"%s\" Use it yo login next time!",
            tmp
        );

        SendClientMessage(playerid, -1, message);
       
        return 1;
    }
Reply


Messages In This Thread
cmd /changepass - by taifu - 12.02.2012, 16:49
Re: cmd /changepass - by iPLEOMAX - 12.02.2012, 16:58
Re: cmd /changepass - by taifu - 12.02.2012, 17:03
Re: cmd /changepass - by ReneG - 12.02.2012, 17:10
Re: cmd /changepass - by Konstantinos - 12.02.2012, 17:12
Re: cmd /changepass - by taifu - 12.02.2012, 17:19
Re: cmd /changepass - by iPLEOMAX - 12.02.2012, 17:22
Re: cmd /changepass - by taifu - 12.02.2012, 17:25
Re: cmd /changepass - by iPLEOMAX - 12.02.2012, 17:28
Re: cmd /changepass - by taifu - 12.02.2012, 17:30

Forum Jump:


Users browsing this thread: 1 Guest(s)