I need a little help
#1

Код:
//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
Reply
#2

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
Reply
#3

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[]){
    if(
dialogid == RULES){
        if(
response){
            
ShowPlayerDialog(playerid, (login dialog), DIALOG_STYLE_PASSWORD"{FFFFFF}Login""Tralalala","Login","Quit");
            }
        }
        return 
1;
    }
return 
1;

Reply
#4

Where must put Login, because I want first to show "Rules".
Edit: Bogdan, I wonder where to put Login, to appear after "Rules".
Reply
#5

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(playeridRULESDIALOG_STYLE_MSGBOX"Rules""Rules-here""Ok""No"); //If he clicks NO then he will be kicked from the server. 
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[]){ 
    if(
dialogid == RULES){
        if(
response){
            
ShowPlayerDialog(playerid, (login dialog), DIALOG_STYLE_PASSWORD"{FFFFFF}Login""Tralalala","Login","Quit");
        }else{
            
Kick(playerid);
            }
        }
        return 
1;
    }
return 
1

Reply
#6

Thanks Bogdan +1 rep
Reply
#7

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)