I need a little help -
Join7 - 13.03.2012
Код:
//OnPlayerConnect
ShowPlayerDialog(playerid, RULES, DIALOG_STYLE_MSGBOX, "Rules", "Rules-here", "Close", "");
I want to put a Login Dialog, but when I put in OnPlayerConnect, skips "Rules" and goes directly to Login
Re: I need a little help -
TTJJ - 13.03.2012
Hi Join7,
A player can only have 1 dialog being displayed at a time. Are you attempting to display them both at once?
Cheers,
TJ
Re: I need a little help -
Bogdan1992 - 13.03.2012
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){
if(dialogid == RULES){
if(response){
ShowPlayerDialog(playerid, (login dialog), DIALOG_STYLE_PASSWORD, "{FFFFFF}Login", "Tralalala","Login","Quit");
}
}
return 1;
}
return 1;
}
Re: I need a little help -
Join7 - 13.03.2012
Where must put Login, because I want first to show "Rules".
Edit: Bogdan, I wonder where to put Login, to appear after "Rules".
Re: I need a little help -
Bogdan1992 - 13.03.2012
Put the "ShowPlayerDialog(playerid, RULES, DIALOG_STYLE_MSGBOX, "Rules", "Rules-here", "Ok", "No");" at OnPlayerConnect
Then if the player clicks on the rules it will show up the login dialog.
EDIT: You can do another thing.
This at OnPlayerConnect
PHP код:
ShowPlayerDialog(playerid, RULES, DIALOG_STYLE_MSGBOX, "Rules", "Rules-here", "Ok", "No"); //If he clicks NO then he will be kicked from the server.
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){
if(dialogid == RULES){
if(response){
ShowPlayerDialog(playerid, (login dialog), DIALOG_STYLE_PASSWORD, "{FFFFFF}Login", "Tralalala","Login","Quit");
}else{
Kick(playerid);
}
}
return 1;
}
return 1;
}
Re: I need a little help -
Join7 - 13.03.2012
Thanks Bogdan +1 rep
Re : Re: I need a little help -
Issam - 13.03.2012
Quote:
Originally Posted by Join7
Thanks Bogdan +1 rep
|
You can also try using timer, if you don't want players to click 'rules' and avoid reading them, then just log in.
Use SetTimer, Don't forget to forward it.