How to make a tutorial script
#6

pawn Код:
// top of script
new pStep[ MAX_PLAYERS ];

// somewhere, like after registering
SetUpPlayer( playerid );

// Bottom of script
forward SetUpPlayer( playerid );
public SetUpPlayer( playerid )
{
   switch( pStep[ playerid ] )
   {
      case 0:
      {
         // ..
         // SendClientMessage( ... );
         // SetPlayerCameraPos( ... );
         // etc
      }
      case 1:
      {
         // Next step, add in this information
      }
   }
   pStep[ playerid ] ++;
   if( pStep[ playerid ] == 5 ) // Change the '5' to the amount of steps the tutorial will have
   {
      SpawnPlayer( playerid );
      pStep[ playerid ] = 0;
   }
   else
   {
      SetTimerEx( "SetUpPlayer", 10000, false, "i", playerid ); // JChange the '10000' to the amount of time between steps
   }
   return 1;
}
This is an outline of what you need to do. Do not simply copy and paste the code - build off of it.
Reply


Messages In This Thread
How to make a tutorial script - by Jordan Smith - 01.01.2011, 15:51
Re: How to make a tutorial script - by 06leachr - 01.01.2011, 16:04
Re: How to make a tutorial script - by Grim_ - 01.01.2011, 16:12
Re: How to make a tutorial script - by Jordan Smith - 01.01.2011, 17:16
Re: How to make a tutorial script - by Jordan Smith - 01.01.2011, 17:39
Re: How to make a tutorial script - by Grim_ - 01.01.2011, 17:46
Re: How to make a tutorial script - by Jordan Smith - 01.01.2011, 18:05

Forum Jump:


Users browsing this thread: 1 Guest(s)