Simple Question
#1

I have two dialogs, Rules and login/register
When I
pawn Код:
/*The login/register*/
the Rules box appears..
But when I appear them the rules don't appear

I want the rules appear, and when they accept, the other box appears.
pawn Код:
public OnPlayerConnect(playerid)
{
    {
        new pname[MAX_PLAYER_NAME], string[63 + MAX_PLAYER_NAME];
        SendClientMessage(playerid,COLOR_GREEN,"Welcome to **********");
        SendClientMessage(playerid,COLOR_GREEN,"Make sure you read and Abide by our /rules, and obey our admins.");
        new C_Rules;
        new BigString[1900];
        strcat(BigString, "\n{FFFFFF}1. {F81414}Respect and obey all Admins.", 1900 );
        strcat(BigString, "\n{FFFFFF}2. {F81414}Do not Deathmatch or Teamkill.", 1900 );
        strcat(BigString, "\n{FFFFFF}3. {F81414}Do not Spam.", 1900 );
        strcat(BigString, "\n{FFFFFF}4. {F81414}Do not use cheats or hacks.", 1900 );
        strcat(BigString, "\n{FFFFFF}5. {F81414}Respect all other players.", 1900 );
        strcat(BigString, "\n{FFFFFF}6. {F81414}******.", 1900 );
        strcat(BigString, "\n{FFFFFF}7. {F81414}Never quit to avoid anything.", 1900 );
        strcat(BigString, "\n{FFFFFF}8. {F81414}********other players.", 1900 );
        strcat(BigString, "\n{FFFFFF}9. {F81414}****.", 1900 );
        strcat(BigString, "\n{FFFFFF}10. {F81414}No mods are allowed.", 1900 );
        ShowPlayerDialog(playerid,C_Rules, DIALOG_STYLE_MSGBOX, "{ff0000}Rules", BigString, "Accept","Ignore");
        if(fexist(UserPath(playerid)))
        {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"{F81414}San Andreas *****.","{FFFFFF}Welcome, Type your password below to login.\nIf it's not you, relog with a different username","Login","Quit");
        }
        else
        {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"{F81414}San Andreas ********** ","{FFFFFF}Welcome, Type your password below to register a new account.","Register","Quit");
        }
        GetPlayerName(playerid, pname, sizeof(pname));
        format(string, sizeof(string), "%s has Joined the server.", pname);
        SendClientMessageToAll(COLOR_CYAN, string);
        return 1;
     }
}
Note: No Compiling error or warning.
Reply
#2

It's setup so you only see the rules once.
Reply
#3

Now I just used another nickname, and the rules box didn't appear, register one did
Reply
#4

It appears for a second then BOOM register pwns it.
Reply
#5

I'm super tired, why don't you make the Rules appear on,

OnPlayerSpawn?
Reply
#6

It's stupid to kick someone after they actually spawn, + I'm willing to make another helping textdraw after every class spawn.
Reply
#7

pawn Код:
strcat(BigString, "\n{FFFFFF}1. {F81414}Respect and obey all Admins.", 1900 );
pawn Код:
strcat(BigString, "\n{FFFFFF}1. {F81414}Respect and obey all Admins.", sizeof(BigString));
:\
Reply
#8

Why don't you have it after they entered there login information? So, it's directly before the "OnPlayerSpawn"
Reply
#9

you cant show 2 dialogs in the same momment.

so

you have to do when the player agrees to read the rules.

the login/register box appears.

like that:

pawn Код:
#define C_Rules randomid
#define DIALOG_LOGIN randomid
#define DIALOG_REGISTER randomid

public OnPlayerConnect(playerid)
{
    new BigString[1900];
        strcat(BigString, "\n{FFFFFF}1. {F81414}Respect and obey all Admins.", 1900 );
        strcat(BigString, "\n{FFFFFF}2. {F81414}Do not Deathmatch or Teamkill.", 1900 );
        strcat(BigString, "\n{FFFFFF}3. {F81414}Do not Spam.", 1900 );
        strcat(BigString, "\n{FFFFFF}4. {F81414}Do not use cheats or hacks.", 1900 );
        strcat(BigString, "\n{FFFFFF}5. {F81414}Respect all other players.", 1900 );
        strcat(BigString, "\n{FFFFFF}6. {F81414}******.", 1900 );
        strcat(BigString, "\n{FFFFFF}7. {F81414}Never quit to avoid anything.", 1900 );
        strcat(BigString, "\n{FFFFFF}8. {F81414}********other players.", 1900 );
        strcat(BigString, "\n{FFFFFF}9. {F81414}****.", 1900 );
        strcat(BigString, "\n{FFFFFF}10. {F81414}No mods are allowed.", 1900 );
    ShowPlayerDialog(playerid,C_Rules, DIALOG_STYLE_MSGBOX, "{ff0000}Rules", BigString, "Accept","Ignore");
    //some of your stuffs
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == C_Rules)
    {
        if(response)
        {
            if(fexist(UserPath(playerid)))
            {
            INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
            ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"{F81414}San Andreas *****.","{FFFFFF}Welcome, Type your password below to login.\nIf it's not you, relog with a different username","Login","Quit");
            return 1;
            }
            else
            {
                ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"{F81414}San Andreas ********** ","{FFFFFF}Welcome, Type your password below to register a new account.","Register","Quit");
                return 1;
            }
        }
    }
   
    //some of your stuffs
}
Reply
#10

Keep your login/register box under OnPlayerSpawn to show login/register box,when player gets spawned.

Or keep your login/register dialog boxes OnDialogResponse.

Response of Accept rules button of the rules box.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)