31.05.2009, 13:42
Okay everytime i type /prisijungti and i enter a 1 letter or something that is not my password ex: /prisijungti 32 but my password is like 7658 and it still logins for me i tryed to fix it but i don't know how here's the code;
the login command
OnPlayerLogin callback
sry didn't want to show my onplayerlogin all of it but these are the lines that should show not incorrect password and it should close the account but it still logins for me. Please someone help me!!!!!
the login command
Код:
if (strcmp(cmd, "/prisijungti", true) == 0) { new tmppass[128]; if(AccountInfo[playerid][Prisijunges] == 1) return SendClientMessage(playerid, LIGHTBLUE, "Tu jau esi prisijunges."); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, LIGHTBLUE, "Naudojimas: /prisijungti [slaptazodis]"); new plname[MAX_PLAYER_NAME]; GetPlayerName(playerid, plname, sizeof(plname)); format(string, sizeof(string), "/fAccounts/%s.ini", plname); if(!fexist(string)) return SendClientMessage(playerid, LIGHTBLUE, "Account'as neregistruotas! Prisiregistruok: /registruotis [slaptazodis]"); strmid(tmppass, tmp, 0, strlen(cmdtext), 255); OnPlayerLogin(playerid, MD5_Hash(tmppass)); return 1; }
Код:
if (!strcmp("Slaptazodis", passres)) { value = GetFileValue(pass); strmid(AccountInfo[playerid][Slaptazodis], value, 0, strlen(value)-1, 128); } else { SendClientMessage(playerid, LIGHTBLUE, "Neteisingas slaptazodis."); fclose(account); return 1; }