25.01.2013, 18:14
There's a number of different ways to do this, so keep in mind you have freedom to change things according to your habits of scripting. I'm inexperienced, but I would make a variable for each player, saving the current tutorial "text" he's seen. So for example if I were to view:
=============================================
Tutorial 1/10 - How to begin
Firstly you need to know how to Role Play.
Role Play is not a DM server, where you can shoot everyone.
=============================================
That variable would be set to 1, since I'm on text 1. Then make a stock which checks the players last viewed text and starts the next one with a timer. In the following example I assume you have some basic knowledge of scripting and use enums and/or database.
Quick example:
I haven't tested this, just wrote it quickly, hoping it'll work.
=============================================
Tutorial 1/10 - How to begin
Firstly you need to know how to Role Play.
Role Play is not a DM server, where you can shoot everyone.
=============================================
That variable would be set to 1, since I'm on text 1. Then make a stock which checks the players last viewed text and starts the next one with a timer. In the following example I assume you have some basic knowledge of scripting and use enums and/or database.
Quick example:
Код:
public OnPlayerConnect(playerid) { if(pInfo[playerid][Registered]==false){ // using a bool here. if not registered you start the stock. ShowPlayerTutorial(playerid); } else{}//Nothing. Let the player continue. return 1; } ShowPlayerTutorial(playerid) { if(pInfo[playerid][TutorialText]=10){}//Done if(pInfo[playerid][TutorialText]=1){ SendClientMessage(playerid, 0xFFFFFF, "Your tutorialtext1"); } if(pInfo[playerid][TutorialText]=2){ SendClientMessage(playerid, 0xFFFFFF, "Your tutorialtext2"); } SetTimerEx("TutorialTimer", 10000, false, "i", playerid); } forward TutorialTimer(playerid); public TutorialTimer(playerid) { pInfo[playerid][TutorialText]++; ShowPlayerTutorial(playerid); return 1; }