ShowPlayerDialog Login System -
cAMo - 13.05.2010
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?
Re: ShowPlayerDialog Login System -
cAMo - 13.05.2010
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.
|
Re: ShowPlayerDialog Login System -
juice.j - 13.05.2010
Sure, just remove "Kick(playerid);" in the respective lines of OnDialogResponse or remove ShowPlayerDialog in OnPlayerConnected.
Re: ShowPlayerDialog Login System -
cAMo - 13.05.2010
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?
Re: ShowPlayerDialog Login System -
Antonio [G-RP] - 13.05.2010
If it kicks when the press disconnect, and logs them in with password, they cannot get around it.
Re: ShowPlayerDialog Login System -
cAMo - 13.05.2010
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!
Re: ShowPlayerDialog Login System -
juice.j - 13.05.2010
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.
Re: ShowPlayerDialog Login System -
cAMo - 14.05.2010
In simple terms, is this what you mean? Something like...
public OnPlayerRequestSpawn(playerid)
{
if(GetPVarInt(playerid, "LoggedIn") != 1)
{
ShowPlayerDialog.......
return 0;
}
else
{
return 1;
}
}
Re: ShowPlayerDialog Login System -
juice.j - 14.05.2010
Exactly what I mean
This way you make sure really no one bypasses your login dialog.