Intro problem
#1

Why my intro starts behind login dialog...
i want to make that it go first intro, then dialog login ...

Код:
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(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "naslov2", "text", "Login", "Odustani");
            }
            TogglePlayerSpectating(playerid, false);
            ForceClassSelection(playerid);
        }
        return 1;
}
and i have this problem: http://i.imgur.com/Bwx3q.png
Reply
#2

Add dialog login in your OnPlayerRequestClass,
The intro in onplayerconnect.
Reply
#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
#4

this second public working, but still have this rpoblem: http://i.imgur.com/Bwx3q.png
Reply
#5

bump:

well... i put this:

Код:
	new naslov2[128], text[1024], strText[104];
    format(strText, 35, USER_FILE, PlayerName(playerid));
    if(!INI_Exists(strText))
    {
    	format(naslov2, sizeof(naslov2), "Registracija");
    	format(text, sizeof(text), ""COL_BLUE"________________________________________________\n\n"COL_WHITE"Dobrodosao na WestSide DeathMatch server!\n\n\n"#COL_BLUE"%s\n"#COL_WHITE"Tvoj korisnicki racun nije pronaden\n\n\nMolimo upisi svoju lozinku da se registriras:\n\n"COL_BLUE"________________________________________________", PlayerName(playerid));
    	ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, naslov2, text, "Register", "Odustani");
    }
	else
    {
        format(naslov2, sizeof(naslov2), ""#COL_WHITE"Logiranje");
        format(text, sizeof(text),""COL_LIGHTBLUE"________________________________________________\n\n"COL_WHITE"Dobrodosao na WestSide DeathMatch server!\n\n\n"#COL_LIGHTBLUE"%s\n"#COL_WHITE"Tvoj korisnicki racun je pronaden\n\n\nMolimo upisi svoju lozinku da udjes na server:\n\n"COL_LIGHTBLUE"________________________________________________", PlayerName(playerid));
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, naslov2, text, "Login", "Odustani");
    }
   	SetPVarInt(playerid, "Prijavljen", 1);
and:

Код:
forward ShowIntro(playerid);
public ShowIntro(playerid)
{
        SetPVarInt(playerid, "Intro", GetPVarInt(playerid, "Intro") + 1);
        new iteration = GetPVarInt(playerid, "Intro");
        new naslov2[128], text[1024];
        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(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, naslov2, text, "Login", "Odustani");
            }
            TogglePlayerSpectating(playerid, false);
            ForceClassSelection(playerid);
        }
        return 1;
}
but i need to write my password much timer... around three-four times ...

EDIT: And i got these message in samp-server.exe - warning: playerdialogresponse playerid: 0 dialogID doens't match last sent dialog ID
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)