Posts: 134
Threads: 32
Joined: Dec 2007
Reputation:
0
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?
Posts: 214
Threads: 1
Joined: May 2010
Reputation:
0
Sure, just remove "Kick(playerid);" in the respective lines of OnDialogResponse or remove ShowPlayerDialog in OnPlayerConnected.
Posts: 134
Threads: 32
Joined: Dec 2007
Reputation:
0
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?
Posts: 1,110
Threads: 183
Joined: Jul 2009
Reputation:
0
If it kicks when the press disconnect, and logs them in with password, they cannot get around it.
Posts: 214
Threads: 1
Joined: May 2010
Reputation:
0
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.
Posts: 134
Threads: 32
Joined: Dec 2007
Reputation:
0
In simple terms, is this what you mean? Something like...
public OnPlayerRequestSpawn(playerid)
{
if(GetPVarInt(playerid, "LoggedIn") != 1)
{
ShowPlayerDialog.......
return 0;
}
else
{
return 1;
}
}