Login without a password?
#1

This code doesnt require a password to log in.. help please!

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) //the callback
{
if (dialogid == 1)
{
if (response == 1) //making sure "Login" was pressed
{
if (LogAttempts[playerid] < 2) //is it greater then or equal to 2?
{
if (!strcmp(inputtext, PlayerInfo[playerid][pPassword])) //checking if it is the players password
{
OnPlayerLogin(playerid,inputtext);
return 1;
}
else //incorrect password
{
ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_INPUT, "Invalid Password", "Invalid Password, try again", "Login", "Exit"); //shows another dialog, with the same dialogid.
LogAttempts[playerid]++; //increments a variable to know how many time he has tried to login
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Too many attempts, kicked");
Kick(playerid);
return 1;
}
}
}
else //pressed "Cancel"
{
SendClientMessage(playerid, COLOR_RED, "You must Login to play!");
Kick(playerid);
}
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)