2021-06-28, 09:41 AM
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.
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.