10.05.2015, 23:55
pawn Код:
if(strcmp(password, inputtext, false) == 0)
{
If I hit enter, it allows access to the server without a password! (MAJOR EXPLOIT!)
Thanks for any assistance.
if(strcmp(password, inputtext, false) == 0)
{
if(udb_hash(inputtext) == PlayerInfo[playerid][Password])// THIS HASHES THE PASSWORD, BE SURE TO HAVE WHIRLPOOL
{
GivePlayerMoney(playerid, PlayerInfo[playerid][Money]); // GIVES MONEY
SpawnPlayer(playerid); // SPAWNS PLAYER
}
else
{
ShowLoginDialog(playerid); // RESHOWS YOUR DIALOG, CHANGE IF NEEDED
SendClientMessage(playerid, GREY, "[SERVER]: You have entered an incorrect password."); // SAYS INCORRECT PW
LoginAttempt[playerid] ++; //ADDS A LOGIN ATTEMPT
if(LoginAttempt[playerid] == 2) // TO MANY AND HE'S KICKED
{
LoginAttempt[playerid] = 0;
Kick(playerid);
}
}
if(!strlen(password) || isnull(password))