Using Timers
#4

Oh, ok :
pawn Код:
// Global Variable
new ChangeInterior_Timer[ MAX_PLAYERS ];

// Timer
ChangeInterior_Timer[ playerid ] = SetTimerEx( "ChangeInterior", 10000, true, "i", playerid );

// Callback
forward ChangeInterior( playerid );
public ChangeInterior( playerid )
{
    new _P[ MAX_PLAYERS ] = 0;
   
    switch( _P[ playerid ] )
    {
        case 0:
        {
            // Do your code for the Plane Interior
        }
        case 1:
        {
            // Do your code for the Airport Interior
        }
        // And so on...
        // PS: At the last case, in this case, '1', use 'KillTimer( ChangeInterior_Timer[ playerid ] );' and '_P[ playerid ] = 0;'.
    }
    _P[ playerid ] ++;

    return 1;
}
Reply


Messages In This Thread
Using Timers - by HazardGaming - 20.04.2012, 17:12
Re: Using Timers - by aRoach - 20.04.2012, 17:17
Re: Using Timers - by HazardGaming - 20.04.2012, 17:20
Re: Using Timers - by aRoach - 20.04.2012, 17:31
Re: Using Timers - by [KHK]Khalid - 20.04.2012, 17:43
Re: Using Timers - by HazardGaming - 20.04.2012, 17:50

Forum Jump:


Users browsing this thread: 3 Guest(s)