SA-MP Forums Archive
Help :) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help :) (/showthread.php?tid=342563)



Help :) - ColdRain - 14.05.2012

How i can create command that change password in dudb inclue


i need just the function who are change password thnx all


Re: Help :) - Face9000 - 14.05.2012

pawn Код:
if(strcmp(cmd, "/changepass", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(gPlayerLogged[playerid] == 0)
            {
                SendClientMessage(playerid, COLOR_GREY, "You need to login first.");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_RED, "USAGE: /changepass [new password]");
                return 1;
            }
            strmid(PlayerInfo[playerid][pPassword], tmp, 0, strlen(cmdtext), 255);
            SendClientMessage(playerid, COLOR_YELLOW, "Password has been changed successfuly");
        }
        return 1;
    }
Change pPassword with the password variable used in your registration system.