Change Pass
#6

Here

pawn Код:
CMD:changepass(playerid,params[])
{
    new string[128],
        oldpass[32],
        newpass[32];
       
    if(sscanf(params, "s[32]s[32]", oldpass, newpass)) return SendClientMessage(playerid, COLOR_WHITE, "{FFFF00}[Usage:]: {FFFFFF}/changepass [old password] [new password]");
    if(strcmp(PlayerInfo[playerid][pPass], oldpass, false) == 0)
    {
        if(strcmp(PlayerInfo[playerid][pPass], newpass, false) == 0) return SendClientMessage(playerid,COLOR_RED,"Error: Your new password is the current password.");
        format(PlayerInfo[playerid][pPass], 32, newpass);
        format(string, sizeof(string), "Your password is successfully changed to: %s", newpass);
        SendClientMessage(playerid, COLOR_WHITE, string);
    }
    else
    {
        SendClientMessage(playerid,COLOR_RED,"Error: Your old password is incorrect, please try again.");
    }
    return 1;
}
Reply


Messages In This Thread
Change Pass - by AnonScripter - 24.10.2013, 22:37
Re: Change Pass - by Patrick - 24.10.2013, 22:39
Re: Change Pass - by AnonScripter - 24.10.2013, 22:44
Re: Change Pass - by DanishHaq - 24.10.2013, 22:48
Re: Change Pass - by AnonScripter - 24.10.2013, 22:57
Re: Change Pass - by rickisme - 24.10.2013, 22:59
Re: Change Pass - by AnonScripter - 24.10.2013, 23:08
Re: Change Pass - by GiamPy. - 24.10.2013, 23:17
Re: Change Pass - by Pottus - 24.10.2013, 23:24
Re: Change Pass - by GiamPy. - 24.10.2013, 23:42

Forum Jump:


Users browsing this thread: 1 Guest(s)