pawn Код:
CMD:changepassword(playerid, params[])
{
if(!UserExists(playerid))
else //line 774
{
if (IgracInfo[playerid][Jezik] == 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "/changepassword [nova lozinka]");
}
if (IgracInfo[playerid][Jezik] == 2)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "/changepassword [novi password]");
}
if (IgracInfo[playerid][Jezik] == 3)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "/changepassword [new password]");
}
}
if(isnull(params)) return SendClientMessage(playerid, COLOR_RED, "Tocnije: /changepassword [nova lozinka]");
if(PlayerInfo[playerid][LoggedIn] == 0) return SendClientMessage(playerid, COLOR_RED,"Nisi ulogiran!");
new FilePath[128];
format(FilePath, sizeof(FilePath), "Korisnici/%s.ini", PlayerName(playerid));
new password = num_hash(params);
PlayerInfo[playerid][Password] = password;
dini_IntSet(FilePath,"Password",PlayerInfo[playerid][Password]);
if (IgracInfo[playerid][Jezik] == 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Информација:");
new string[256]; format(string, sizeof(string), "Успешно ја променивте вашата лозинка, новата лозинка е: \'%s\'.", params);
SendClientMessage(playerid, COLOR_WHITE, string);
}
if (IgracInfo[playerid][Jezik] == 2)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Informacije:");
new string[256]; format(string, sizeof(string), "Uspesno ste promenili password, novi password je: \'%s\'.", params);
SendClientMessage(playerid, COLOR_WHITE, string);
}
if (IgracInfo[playerid][Jezik] == 3)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Information:");
new string[256]; format(string, sizeof(string), "Successful change your password, your new password is: \'%s\'.", params);
SendClientMessage(playerid, COLOR_WHITE, string);
}
return PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
}