Silly thing isn't working
#1

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case DIALOG_LOGIN:
        {
            if(!response)
            {
                SendClientMessage(playerid, COLOUR_RED, "Kick due to : Quitted login");
                return Kick(playerid);
            }
            if(CheckUserLogin(playerid, inputtext))
            {
                if( PlayerInfo[playerid][tutorial] == 0)
                {
                    SendClientMessage(playerid, COLOUR_BEACH, "Welcome to TT:AA. This is a quick test, followed by a tutorial to help you survive!" );
                    ShowPlayerDialog(playerid, 100, DIALOG_STYLE_LIST, "What is meant by DM", "Deadmen\nDeathmatching\nDeathmaking\nDeathmilk", "Select", "Quit");
                }
                if( PlayerInfo[playerid][tutorial] >= 1)
                {
                    LoginUser(playerid);
                    SpawnPlayer(playerid);
                }
            }
            else
            {
                SendClientMessage(playerid, COLOUR_RED, "Wrong password, please try again");
                return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login", "Type in your password to login", "Login", "Quit");
            }
        }
This isn't working. When your tutorial is at 0 it is meant to put you in the tutorial, but when it is one it isn't meant to. I really don't get understand why, but even when your tutorial = 1 it still puts me in the tutorial! Help!
Reply
#2

Change this:
pawn Код:
if( PlayerInfo[playerid][tutorial] == 0)
                {
                    SendClientMessage(playerid, COLOUR_BEACH, "Welcome to TT:AA. This is a quick test, followed by a tutorial to help you survive!" );
                    ShowPlayerDialog(playerid, 100, DIALOG_STYLE_LIST, "What is meant by DM", "Deadmen\nDeathmatching\nDeathmaking\nDeathmilk", "Select", "Quit");
                }
To:
pawn Код:
if( PlayerInfo[playerid][tutorial] == 0)
                {
                    SendClientMessage(playerid, COLOUR_BEACH, "Welcome to TT:AA. This is a quick test, followed by a tutorial to help you survive!" );
                    ShowPlayerDialog(playerid, 100, DIALOG_STYLE_LIST, "What is meant by DM", "Deadmen\nDeathmatching\nDeathmaking\nDeathmilk", "Select", "Quit");
                    PlayerInfo[playerid][tutorial] = 1;
                }
You forgot to change the value to 1. It remains 0, so, it keeps on showing the tut.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)