Delay between functions
#4

I have that, but it's not working.

pawn Код:
new Tutorial[ MAX_PLAYERS ][ 2 ]; //Should be global, so we can use it.

forward PlayerTutorial(playerid);
public PlayerTutorial(playerid)
{
    Tutorial[ playerid ][ 1 ] = SetTimerEx( "PlayerTutorial", 100*10*2, true, "i", playerid );
    switch(Tutorial[playerid][0])
    {
        case 0:
        {
            SendClientMessage(playerid, GREEN, "=========================================");
            SendClientMessage(playerid, -1, "Hello there. Welcome to San Andreas Online.");
            SendClientMessage(playerid, -1, "In this server, you will be able to ................");
            SendClientMessage(playerid, -1, "---------------------------------------------------");
            SendClientMessage(playerid, GREEN, "=========================================");
        }
        case 1:
        {

        }
        case 2:
        {
            SendClientMessage(playerid, -1, "Hello, welcome to SAOnline");
        }
        case 3:
        {
            SendClientMessage(playerid, -1, "Hello, welcome to SAOnline");
        }
        case 4:
        {
            SendClientMessage(playerid, -1, "Hello, welcome to SAOnline");
        }
        case 5:
        {
            SendClientMessage(playerid, -1, "Hello, welcome to SAOnline");
        }
        case 6:
        {
            SpawnPlayer(playerid);
            SendClientMessage(playerid, -1, "The end");
        }
        case 7:
        {
            KillTimer(Tutorial[ playerid ][ 1 ]);
        }
    }
    Tutorial[ playerid ][ 0 ] ++;
    return true;
}



new Tutorial2[ MAX_PLAYERS ][ 2 ]; //Should be global, so we can use it.

forward wTutorial(playerid);
public wTutorial(playerid)
{
    Tutorial2[ playerid ][ 1 ] = SetTimerEx( "wTutorial", 100*10*5, true, "i", playerid );
    switch(Tutorial2[playerid][0])
    {
        case 0:
        {
            SendClientMessage(playerid, GREEN, "We're now loading the tutorial for you.\n Please, bare with us, it will not take more than five secodns!");
        }
        case 1:
        {
            for(new i = 0; i < 16; i++) SendClientMessageToAll(-1," "); return 1;
        }
        case 2:
        {
            KillTimer(Tutorial2[ playerid ][ 1 ]);
        }
    }
    Tutorial2[ playerid ][ 0 ] ++;
    return true;
}
Reply


Messages In This Thread
Delay between functions - by Twizted - 10.05.2014, 08:10
Re: Delay between functions - by RajatPawar - 10.05.2014, 08:14
Re: Delay between functions - by iZN - 10.05.2014, 08:16
Re: Delay between functions - by Twizted - 10.05.2014, 09:03

Forum Jump:


Users browsing this thread: 1 Guest(s)