ShowPlayerDialog Login System
#1

Once someone connects to my server, they are immediately prompted with a ShowPlayerDialog for logging in. The two options are "Login" or "Disconnect"

If the user chooses disconnect, it will kick them. If they choose login, it will submit the password they inserted.

Question: Is it possible to get around ShowPlayerDialog? Could they potentially not be prompted or get the menu to close without being disconnected?
Reply
#2

Quote:
Originally Posted by cAMo
Once someone connects to my server, they are immediately prompted with a ShowPlayerDialog for logging in. The two options are "Login" or "Disconnect"

If the user chooses disconnect, it will kick them. If they choose login, it will submit the password they inserted.

Question: Is it possible to get around ShowPlayerDialog? Could they potentially not be prompted or get the menu to close without being disconnected (kicked)?

I don't have a secondary /login <password> option because right now I am counting on the idea that they won't be able to get around the dialog menu.
Reply
#3

Sure, just remove "Kick(playerid);" in the respective lines of OnDialogResponse or remove ShowPlayerDialog in OnPlayerConnected.
Reply
#4

No, hold on... I scripted it with the intention of not allowing people to bypass the Dialog login.

Is it possible for them to get around it?
Reply
#5

If it kicks when the press disconnect, and logs them in with password, they cannot get around it.
Reply
#6

Quote:
Originally Posted by Antonio (dominationrp.netii.net)
If it kicks when the press disconnect, and logs them in with password, they cannot get around it.
Alright cool, thanks!
Reply
#7

Sorry, got what you mean now, and it's in some cases possible to get around the dialog. Hence I suggest you declare a global (or better a PVar) storing whether a player is logged in.

This gets set to true as soon as they enter the correct password into your dialogbox.

If the variable is not true, you reject e.g. RequestSpawn and re-apply the dialog.
Reply
#8

In simple terms, is this what you mean? Something like...

public OnPlayerRequestSpawn(playerid)
{
if(GetPVarInt(playerid, "LoggedIn") != 1)
{
ShowPlayerDialog.......
return 0;
}
else
{
return 1;
}
}
Reply
#9

Exactly what I mean

This way you make sure really no one bypasses your login dialog.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)