• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] How to make pasword validation?
#2
Code:
public OnPlayerLogin(playerid, bool:success)

{

    if(success)

    {

        DeletePVar(playerid, "loginFails");

        // Logged in code

    }

    else

    {

        SetPVarInt(playerid, "loginFails", (GetPVarInt(playerid, "loginFails")  1));

        if(GetPVarInt(playerid, "loginFails") >= 3)

        {

            SendClientMessage(playerid, -1, "Too many failed login attempts!");

            Kick(playerid);

        }

        else

        {

            SendClientMessage(playerid, -1, "You entered the wrong password, please try again!");

        }

    }

}
Using Pawn.CMD?

If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
  Reply


Messages In This Thread
How to make pasword validation? - by CrypticSin - 2021-06-27, 02:48 PM
RE: How to make pasword validation? - by Pinch - 2021-06-28, 09:41 AM

Forum Jump: