08.06.2014, 05:45
Hey, there i am using dini and i am trying to make a command which gives me the password of a offline player, but it doesnt seems to work.Here is my command!
pawn Код:
CMD:getpass(playerid, params[])
{
new file[32], playerb[32], string[128], password[256];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(sscanf(params, "s[32]", params)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /getpass [username]");
format(file, sizeof(file), "users/%s.ini", playerb);
if(!dini_Exists(file)) return SendClientMessage(playerid, COLOR_GREY, "Player name not found.");
dini_Get(file, "Password", password);
WP_Hash(password, sizeof(password), password);
format(string, sizeof(string), "Username: %s | Password: %s", playerb, password);
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}