17.10.2014, 05:39
Please can you help me so i cn make it so you have to enter your password correctly in 3 attempts then it kicks you, but at the minute if you enter the wrong pass it kicks you
case LOGIN_MENU:
{
new f[40], string[150];
format(f, sizeof(f), USER_FILE, GetName(playerid));
if(!strlen(inputtext)) return SendClientMessage(playerid, RED, "You MUST provide a password.") && Kick(playerid);
else if(!response) return SendClientMessage(playerid, RED, "You MUST login before you can spawn.") && Kick(playerid);
{
new buf[129];
WP_Hash(buf, sizeof (buf), inputtext);
if(strcmp(buf, PlayerInfo[playerid][pPass], false) != 0)
{
SendClientMessage(playerid, RED, "Incorrect password.");
format(string, sizeof(string), "%s [%d] has been kicked from CCNR - Reason: Incorrect password", GetName(playerid), playerid);
SendClientMessage(playerid, RED, string);
Kick(playerid);
return 1;
}
else
{
case LOGIN_MENU:
{
new f[40], string[150];
format(f, sizeof(f), USER_FILE, GetName(playerid));
if(!strlen(inputtext)) return SendClientMessage(playerid, RED, "You MUST provide a password.") && Kick(playerid);
else if(!response) return SendClientMessage(playerid, RED, "You MUST login before you can spawn.") && Kick(playerid);
{
new buf[129];
WP_Hash(buf, sizeof (buf), inputtext);
if(strcmp(buf, PlayerInfo[playerid][pPass], false) != 0)
{
SendClientMessage(playerid, RED, "Incorrect password.");
format(string, sizeof(string), "%s [%d] has been kicked from CCNR - Reason: Incorrect password", GetName(playerid), playerid);
SendClientMessage(playerid, RED, string);
Kick(playerid);
return 1;
}
else
{