20.06.2014, 14:42
Am creeat aceasta comanda pentru a debloca conturile banate, singura problema este dupa ca dupa ce deblochez contul imi decripteaza parola, nu mai recunoaste parola la logare. Functiile OnPlayerRegister, OnPlayerUpdateEx si OnPlayerLogin nu sunt creeate cu dini_ si banuiesc ca din cauza asta se intampla. Vreo solutie sau trebuie modificate functiile ?
Код:
if (strcmp(cmd, "/unban", true)==0) { if(PlayerInfo[playerid][pAdmin] >=1) { new file[32]; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "{FFFF00}USAGE:{FFFFFF} /unban [AccountName]"); return 1; } format(file, sizeof(file),"users/%s.ini", tmp); if(!dini_Exists(file)) return SendClientMessage(playerid, COLOR_LIGHTRED,"Error: account doesn't exists!"); dini_Set(file, "Locked", "0"); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, 128, "AdmCmd: %s has unbanned %s", sendername, tmp); SendClientMessage(playerid, COLOR_WHITE, "Player unlocked please ask for his IP and use /unbanip [IP]"); ABroadCast(COLOR_LIGHTRED,string,1); new year, month,day; getdate(year, month, day); format(string, sizeof(string), "%s, was unbanned by, %s, reason:, Unban, (%d-%d-%d), no,", tmp, sendername,day,month,year); BanLog(string); } else { SendClientMessage(playerid, COLOR_GRAD1, " Nu ai dreptul de a utiliza aceasta comanda!"); } return 1; }