Intro problem
#3

Why did you loop here?
pawn Код:
else
        {
            for(new i; i < sizeof(Intro); i++)
            {
                TextDrawHideForPlayer(playerid, Intro[i]);
                ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "naslov2", "text", "Login", "Odustani");
            }
Try this
pawn Код:
forward ShowIntro(playerid);
public ShowIntro(playerid)
{
        SetPVarInt(playerid, "Intro", GetPVarInt(playerid, "Intro") + 1);
        new iteration = GetPVarInt(playerid, "Intro");
        switch(iteration)
        {
                case 1:
                {
                        for(new i; i < 11; i++)
                        {
                            SendClientMessage(playerid, -1, "");
                        }
                        TextDrawShowForPlayer(playerid, Intro[0]);
                }
                case 2:
                {
                    TextDrawShowForPlayer(playerid, Intro[1]);
                }
                case 3:
                {
            TextDrawShowForPlayer(playerid, Intro[2]);
                }
                case 4:
                {
                    TextDrawHideForPlayer(playerid, Intro[2]);
                    TextDrawShowForPlayer(playerid, Intro[3]);
                }
                case 5:
                {
                    TextDrawHideForPlayer(playerid, Intro[3]);
                    TextDrawShowForPlayer(playerid, Intro[4]);
                }
                case 6:
                {
                    TextDrawHideForPlayer(playerid, Intro[4]);
                    TextDrawShowForPlayer(playerid, Intro[5]);
                }
                case 7:
                {
                    TextDrawHideForPlayer(playerid, Intro[5]);
                    TextDrawShowForPlayer(playerid, Intro[6]);
                }
                case 8:
                {
                    TextDrawHideForPlayer(playerid, Intro[6]);
                    TextDrawShowForPlayer(playerid, Intro[7]);
                }
                case 9:
                {
                    TextDrawHideForPlayer(playerid, Intro[7]);
                    TextDrawShowForPlayer(playerid, Intro[8]);
                }
                case 10:
                {
                    TextDrawShowForPlayer(playerid, Intro[9]);
                }
                case 11:
                {
                    TextDrawShowForPlayer(playerid, Intro[10]);
                }
                case 12:
                {
                    TextDrawShowForPlayer(playerid, Intro[11]);
                }
        }
        if(GetPVarInt(playerid, "Intro") < 10)
        {
                SetTimerEx("ShowIntro", 300, 0, "d", playerid);
        }
        else if(9 < GetPVarInt(playerid, "Intro") < 13)
        {
        SetTimerEx("ShowIntro", 2000, 0, "d", playerid);
        }
        else
        {
                TextDrawHideForPlayer(playerid, Intro[playerid]);
                ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "naslov2", "text", "Login", "Odustani");
            TogglePlayerSpectating(playerid, false);
            ForceClassSelection(playerid);
        }
        return 1;
}
If it doesn't work try this
pawn Код:
forward ShowIntro(playerid);
public ShowIntro(playerid)
{
        SetPVarInt(playerid, "Intro", GetPVarInt(playerid, "Intro") + 1);
        new iteration = GetPVarInt(playerid, "Intro");
        switch(iteration)
        {
                case 1:
                {
                        for(new i; i < 11; i++)
                        {
                            SendClientMessage(playerid, -1, "");
                        }
                        TextDrawShowForPlayer(playerid, Intro[0]);
                }
                case 2:
                {
                    TextDrawShowForPlayer(playerid, Intro[1]);
                }
                case 3:
                {
            TextDrawShowForPlayer(playerid, Intro[2]);
                }
                case 4:
                {
                    TextDrawHideForPlayer(playerid, Intro[2]);
                    TextDrawShowForPlayer(playerid, Intro[3]);
                }
                case 5:
                {
                    TextDrawHideForPlayer(playerid, Intro[3]);
                    TextDrawShowForPlayer(playerid, Intro[4]);
                }
                case 6:
                {
                    TextDrawHideForPlayer(playerid, Intro[4]);
                    TextDrawShowForPlayer(playerid, Intro[5]);
                }
                case 7:
                {
                    TextDrawHideForPlayer(playerid, Intro[5]);
                    TextDrawShowForPlayer(playerid, Intro[6]);
                }
                case 8:
                {
                    TextDrawHideForPlayer(playerid, Intro[6]);
                    TextDrawShowForPlayer(playerid, Intro[7]);
                }
                case 9:
                {
                    TextDrawHideForPlayer(playerid, Intro[7]);
                    TextDrawShowForPlayer(playerid, Intro[8]);
                }
                case 10:
                {
                    TextDrawShowForPlayer(playerid, Intro[9]);
                }
                case 11:
                {
                    TextDrawShowForPlayer(playerid, Intro[10]);
                }
                case 12:
                {
                    TextDrawShowForPlayer(playerid, Intro[11]);
                }
        }
        if(GetPVarInt(playerid, "Intro") < 10)
        {
                SetTimerEx("ShowIntro", 300, 0, "d", playerid);
        }
        else if(9 < GetPVarInt(playerid, "Intro") < 13)
        {
        SetTimerEx("ShowIntro", 2000, 0, "d", playerid);
        }
        else
        {
            for(new i; i < sizeof(Intro); i++)
            {
                TextDrawHideForPlayer(playerid, Intro[i]);
                ShowPlayerDialog(i, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "naslov2", "text", "Login", "Odustani");
            }
            TogglePlayerSpectating(playerid, false);
            ForceClassSelection(playerid);
        }
        return 1;
}
Reply


Messages In This Thread
Intro problem - by FL3GM4 - 28.12.2012, 18:42
Re : Intro problem - by [HRD]Mar1 - 28.12.2012, 18:49
Re : Intro problem - by DaRk_RaiN - 28.12.2012, 19:06
Re: Intro problem - by FL3GM4 - 28.12.2012, 19:15
Re: Intro problem - by FL3GM4 - 28.12.2012, 20:00

Forum Jump:


Users browsing this thread: 1 Guest(s)