05.12.2015, 02:53
Try this [ check if work ] :
PHP код:
CMD:changepassword(playerid,params[])
{
if(pInfo[playerid][Logged] == 1)
{
new pass[25],query[435] ;
if(sscanf(params, "s[25]", pass)) return SCM(playerid, yellow, "SERVER : /Changepassword <New Password>");
if(strlen(pass) < 3 || strlen(pass) > 20) return SCM(playerid,red,"Error: Password length must be between 3 - 20 chracters!");
WP_Hash(pInfo[playerid][Password], 129, pass);
mysql_format(mysql, query, sizeof(query), "UPDATE `Players` SET `Password` = '%s' WHERE `Username` = '%e'", pInfo[playerid][Password], GetName(playerid));
mysql_tquery(mysql, query, "", "");
format(Jstring, sizeof(Jstring),"Your password has been successfully changed to '%s'",pass);
return SCM(playerid,yellow,Jstring);
}
return 1;
}