zGaming RP script help.
#1

So if youve used the zGaming script youve more then likely realised that you can log in with a fake password, and dont even need to put in the proper pass.

Does anyone know how to fix this?

Код:
new file[64], password[256], IP[16], password2[256];
			format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
			WP_Hash(password2, sizeof(password2), inputtext);
			format(password, sizeof(password), "%s", dini_Get(file, "Password"));
			if(!strcmp(PlayerInfo[playerid][Password], inputtext , false))
			{
				SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: {FFFFFF}Invalid password.");
			    ShowDialog(playerid, 2);
			    return 1;
			}
Reply
#2

Try this.

pawn Код:
new file[64], password[256], IP[16], password2[256];
  format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
  WP_Hash(password2, sizeof(password2), inputtext);
  format(password, sizeof(password), "%s", dini_Get(file, "Password"));
  if(strcmp(password, inputtext,true) && strcmp(password, password2, true))
  {
   SendClientMessage(playerid, COLOR_RED, "SERVER: {FFFFFF}Invalid password.");
   ShowDialog(playerid, 2);
   return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)