31.01.2011, 02:20
Try this command:
pawn Код:
CMD:changepass(playerid, params[])
{
new
EscPass[40],
Query[128],
iStr[55];
if(isnull(params)) return SendClientMessage(playerid, -1, ""#CRED"Usage: "#CORANGE"/ChangePass < New Password >");
mysql_real_escape_string(params, EscPass);
format(Query, sizeof(Query), "UPDATE `playerinfo` SET `password` = md5('%s') WHERE `user` = '%s'", EscPass, pName(playerid));
mysql_query(Query);
format(iStr, sizeof(iStr), "You've changed your password to: "#CBLUE"%s", params);
SendClientMessage(playerid, -1, iStr);
return 1;
}