SA-MP Forums Archive
Help it's making it blank - 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 it's making it blank (/showthread.php?tid=521295)



Help it's making it blank - AroseKhanNiazi - 22.06.2014

Cmd for change pass
pawn Код:
CMD:changepass(playerid,params[])
{
    if(pInfo[playerid][Adminlevel] > 0 && adminloggedin[playerid] == 1) return SCM(playerid,COLOR_RED,ERROR_MESSAGE);
    if(spawned[playerid] == 0) return SCM(playerid,COLOR_RED,"You Can't Use This Command While You Are Dead.");
    new newmail[200],string[500];
    if(!sscanf(params,"s[200]",newmail))
    {
        if(strlen(newmail) > 30 || strlen(newmail) < 3) return SCM(playerid,COLOR_RED,"Please enter password between 3-30 words.");
        new hashpass[129];
        WP_Hash(hashpass,sizeof(hashpass),newmail);
        strdel(pInfo[playerid][Pass], 0, 129);
        strins(pInfo[playerid][Pass], hashpass,0);
        format(string,sizeof(string),"You Have Changed Your Password To %s",newmail);
        SCM(playerid,COLOR_SKYBLUE,string);
        AUTO_SAVE(playerid);
        format(string,sizeof(string),"Welcome,\n\n"RED"Important "WHITE": \nYour password has been changed to "RED"%s "WHITE"\nYou Didn't made this change contact admins on our forums {FF7519}http://forums.disconinjas.site40.net{FFFFFF}\nRegister on {00B6FF}Forums{FFFFFF} and grow with our commuinty\nYour Account Info:\nUsername : {008000}%s\n{FFFFFF}Pass : {FF0000}%s\n\n\n\n\n{FFFFFF}Thanks,\nDisco Ninjas.",pInfo[playerid][Pass],pInfo[playerid][playername],pInfo[playerid][Pass]);
        SendMail(pInfo[playerid][email],support_email,"Disco Ninjas's Account Info","Account Info",string);
    } else return SCM(playerid,COLOR_RED,"USAGE : /changepass [Password]");
    return 1;
}
this is the result

and in player .cfg

p.s why am i using newmail ... well i made another command for changing email and it has the same problem


Re: Help it's making it blank - AroseKhanNiazi - 23.06.2014

help plz


Re: Help it's making it blank - AroseKhanNiazi - 24.06.2014

anyoneee


Re: Help it's making it blank - arlindi - 24.06.2014

What is error Or bug or what ?


Re: Help it's making it blank - AroseKhanNiazi - 26.06.2014

see the password that saves it empty


Re: Help it's making it blank - PrivatioBoni - 26.06.2014

Ignore, delete


Re: Help it's making it blank - BroZeus - 26.06.2014

pawn Код:
strdel(pInfo[playerid][Pass], 0, 129);
strins(pInfo[playerid][Pass], hashpass,0);
instead of these lines try
pawn Код:
format(pInfo[playerid][Pass],129,"%s",hashpass);
and also use params not pInfo[playerid][Pass] while formating the variable "string"
caz u wouldnt send hash password to a player