SA-MP Forums Archive
Able to log in with any password? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Able to log in with any password? (/showthread.php?tid=563929)



Able to log in with any password? - eXeDeveloper - 18.02.2015

Код:
if(response)
		{
			new buf[129];
			WP_Hash(buf, sizeof(buf), inputtext);
			if(!strcmp(buf, cInfo[playerid][cPassword], false))
			{
				INI_ParseFile(GetCharacterPath(playerid), "LoadCharacter_%s", .bExtra = true, .extra = playerid);

				SetSpawnInfo(playerid, 0, 1, 1743.0426, -1862.5818, 13.5761, 359.2747, 0, 0, 0, 0, 0, 0);
				SpawnPlayer(playerid);
			}
			else
			{
				ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, DIALOG_LOGIN_CAPTION, DIALOG_LOGIN_INFO, "Login", "Cancel");
			}
		}
		else
		{
			Kick(playerid);
		}



Re: Able to log in with any password? - ATGOggy - 18.02.2015

The only way to prevent this is to make a login timer and prevent player from spawning without logging in