Textdraw showing before login box.
#7

When you put a timer under OnPlayerConnect, it doesn't mean that you stopped the connection for a while. Here you go to make what you want:
pawn Код:
public OnPlayerConnect(playerid)
{
    for(new i = 0; i < 20; i ++)
    {
        ShowConnectTextDraws(playerid);
    }
    HideConnectTextDraws(playerid);

    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    if(fexist(Path(playerid)))
    {
        INI_ParseFile(Path(playerid),"loadaccount_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid,LOGIN_DIALOG,DIALOG_STYLE_INPUT,"Login","Enter Your Password Here","Login","Cancel");
    }
    else
    {
        ShowPlayerDialog(playerid,REGISTER_DIALOG,DIALOG_STYLE_INPUT,"Register","Register Your Account Here","Register","Quit");
        return 1;
    }
    return 1;
}

forward ShowConnectTextDraws(playerid);
public ShowConnectTextDraws(playerid)
{
    TextDrawShowForPlayer(playerid, ConnectTD0);
    TextDrawShowForPlayer(playerid, ConnectTD1);
    TextDrawShowForPlayer(playerid, ConnectTD2);
    TextDrawShowForPlayer(playerid, ConnectTD3);
    TextDrawShowForPlayer(playerid, ConnectTD4);
    TextDrawShowForPlayer(playerid, ConnectTD5);
    TextDrawShowForPlayer(playerid, ConnectTD6);
    TextDrawShowForPlayer(playerid, ConnectTD7);
    TextDrawShowForPlayer(playerid, ConnectTD8);
    TextDrawShowForPlayer(playerid, ConnectTD9);
    TextDrawShowForPlayer(playerid, ConnectTD10);
    return 1;
}

forward HideConnectTextDraws(playerid);
public HideConnectTextDraws(playerid)
{
    TextDrawHideForPlayer(playerid, ConnectTD0);
    TextDrawHideForPlayer(playerid, ConnectTD1);
    TextDrawHideForPlayer(playerid, ConnectTD2);
    TextDrawHideForPlayer(playerid, ConnectTD3);
    TextDrawHideForPlayer(playerid, ConnectTD4);
    TextDrawHideForPlayer(playerid, ConnectTD5);
    TextDrawHideForPlayer(playerid, ConnectTD6);
    TextDrawHideForPlayer(playerid, ConnectTD7);
    TextDrawHideForPlayer(playerid, ConnectTD8);
    TextDrawHideForPlayer(playerid, ConnectTD9);
    TextDrawHideForPlayer(playerid, ConnectTD10);
    return 1;
}
You can change the loop number from 20 to 50 as maximum to increase the timer interval, otherwise players will timeout on their connect.
Reply


Messages In This Thread
Textdraw showing before login box. - by earlybird325 - 20.11.2014, 21:23
Re : Textdraw showing before login box. - by Dutheil - 20.11.2014, 22:56
Re: Textdraw showing before login box. - by earlybird325 - 20.11.2014, 23:33
Re: Textdraw showing before login box. - by ikey07 - 21.11.2014, 00:31
Re: Textdraw showing before login box. - by earlybird325 - 21.11.2014, 00:55
Re: Textdraw showing before login box. - by Rdx - 21.11.2014, 05:56
Re: Textdraw showing before login box. - by Juvanii - 21.11.2014, 06:06
Re: Textdraw showing before login box. - by Quickie - 21.11.2014, 06:23

Forum Jump:


Users browsing this thread: 1 Guest(s)