Switching Textdraws with Timer
#2

Frist way: (here the messages will not mix each others and can't be repeated more than 1 time at 3 minutes)

PHP код:
new
    
TEXT_STEP,
    
TD_AGAIN_X,
    
TD_AGAIN,
    
Text:your_TDMAX_PLAYERS ]
;
public 
OnGameModeInit( )
{
    
TD_AGAIN_X SetTimer"TDAgainX"60 3true );
    return 
1;
}
public 
OnPlayrSpawnplayerid )
{
    
TextDrawShowForPlayerplayeridyour_TDplayerid ] );
    return 
1;
}
stock RandomTextDraw( )
{
    foreach(new 
iPlayer)
    {
        if( 
TEXT_STEP == )
        {
            
TextDrawSetStringyour_TD], "Your first message here" );
        }
        if( 
TEXT_STEP == )
        {
            
TextDrawSetStringyour_TD], "Your second message here" );
        }
        
TextDrawShowForPlayerplayeridyour_TD] );
    }
    return 
1;
}
function 
TDAgainX( )
{
    
TEXT_STEP 1;
    
RandomTextDraw( );
    
KillTimerTD_AGAIN_X );
    
TD_AGAIN SetTimer"TDAgain"60 3true );
}
function 
TDAgain( )
{
    
TEXT_STEP 0;
    
RandomTextDraw( );
    
KillTimerTD_AGAIN );
    
TD_AGAIN_X SetTimer"TDAgainX"60 3true );

Another way: (here one message can be repeated more than 1 time at 3 minutes)

PHP код:
new Text:your_TDMAX_PLAYERS ];
new 
RandomTextdraw[ ][ ] =
{
    
"Your first message",
    
"Your second message"
};
public 
OnGameModeInit( )
{
    
SetTimer"RandomTextDrawTimer"60 3);
    return 
1;
}
public 
OnPlayrSpawnplayerid )
{
    
TextDrawShowForPlayerplayeridyour_TDplayerid ] );
    return 
1;
}
function 
RandomTextDrawTimer( )
{
    foreach(new 
iPlayer)
    {
        
TextDrawSetStringyour_TD], RandomTextdrawrandomsizeofRandomTextdraw ) ) ] );
    }
    return 
1;

I literally think that you will use the first way that i gave you here.
I don't think that you want messages to repeat. So use first. It is ofc your choice.
Reply


Messages In This Thread
Switching Textdraws with Timer - by Dancsika - 08.05.2018, 05:17
Re: Switching Textdraws with Timer - by FaLLenGirL - 08.05.2018, 15:11
Re: Switching Textdraws with Timer - by TadePoleMG - 08.05.2018, 15:14
Re: Switching Textdraws with Timer - by Lokii - 08.05.2018, 15:27
Re: Switching Textdraws with Timer - by ItsRobinson - 08.05.2018, 15:40
Re: Switching Textdraws with Timer - by CrystalGamer - 08.05.2018, 15:42
Re: Switching Textdraws with Timer - by Dancsika - 08.05.2018, 19:00

Forum Jump:


Users browsing this thread: 1 Guest(s)