CMD:changepass(playerid,params[]) { if(PlayerInfo[playerid][LoggedIn] == 0) { if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /changepass [new password]"); if(strlen(params) < 4) return SendClientMessage(playerid,red,"ERROR: Incorrect password length"); new string[128]; dUserSetINT(PlayerName2(playerid)).("password_hash",udb_hash(params) ); PlayerPlaySound(playerid,1057,0.0,0.0,0.0); format(string, sizeof(string),"|- ACCOUNT: You have successfully changed your password to \"%s\" -|",params); return SendClientMessage(playerid,yellow,string); } else return SendClientMessage(playerid,red, "ERROR: You must have an account to use this command"); }
CMD:changepass(playerid,params[])
{
if(PlayerInfo[playerid][LoggedIn] == 0) return SendClientMessage(playerid,red, "ERROR: You must have an account to use this command");
if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /changepass [new password]");
if(strlen(params) < 4) return SendClientMessage(playerid,red,"ERROR: Incorrect password length");
new string[128];
dUserSetINT(PlayerName2(playerid)).("password_hash",udb_hash(params) );
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
format(string, sizeof(string),"|- ACCOUNT: You have successfully changed your password to \"%s\" -|",params);
SendClientMessage(playerid,yellow,string);
return 1;
}
CMD:changepass(playerid,params[])
{
if(PlayerInfo[playerid][LoggedIn] == 0) return SendClientMessage(playerid,red, "ERROR: You must have an account to use this command");
if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /changepass [new password]");
if(strlen(params) < 4) return SendClientMessage(playerid,red,"ERROR: Incorrect password length");
new string[128];
dUserSetINT(PlayerName2(playerid)).("password_hash",udb_hash(params) );
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
format(string, sizeof(string),"|- ACCOUNT: You have successfully changed your password to \"%s\" -|",params);
SendClientMessage(playerid,yellow,string);
return 1;
}
CMD:changepass(playerid, params[])
{
if(PlayerInfo[playerid][LoggedIn] == 1)
{
if(isnull(params))
return SendClientMessage(playerid, red, "USAGE: /changepass [new password]");
if(strlen(params) < 4)
return SendClientMessage(playerid, red, "ERROR: Incorrect password length");
new string[128];
format(string, sizeof(string),"|- ACCOUNT: You have successfully changed your password to \"%s\" -|",params);
SendClientMessage(playerid, yellow, string);
dUserSetINT(PlayerName2(playerid)).("password_hash", udb_hash(params));
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
}
else SendClientMessage(playerid,red, "ERROR: You must have an account to use this command");
//..
return true;
}
Show which lines they are. Also, show me your Login dialog (code)
[pawn] pawn Код:
|