27.06.2013, 22:03
(
Последний раз редактировалось Sandiel; 02.07.2013 в 20:20.
)
EDITED: I fixed it myself, thanks to everyone though .
new timer1[MAX_PLAYERS]; new timer2[MAX_PLAYERS]; new timer3[MAX_PLAYERS]; .. start .. timer1[playerid]=SetTimerEx timer2[playerid]=SetTimerEx timer3[playerid]=SetTimerEx .. kill .. KillTimer(timer1[playerid]); KillTimer(timer2[playerid]); KillTimer(timer3[playerid]);
new TutorialTimer [MAX_PLAYERS]; public OnPlayerConnect (playerid) { TutorialTimer [playerid] = SetTimerEx ("TutorialStage", 1, 0, "ii", playerid, 1); } public TutorialStage(playerid, stage) { switch (stage) { case 1: { // the player are in stage 1 SetTimerEx ("TutorialStage", 3500, 0, "ii", playerid, 2); // 3500 = how much time the player should see this message? // 2 = what is the next stage? } case 2: { SetTimerEx ("TutorialStage", 3500, 0, "ii", playerid, 3); // 3500 = how much time the player should see this message? // 3 = what is the next stage? } case 3: { // finish here SetTimerEx ("TutorialStage", 3500, 0, "ii", playerid, 4); // 3500 = how much time the player should see this message? // 4 = what is the next stage? } case 4: { // reset the player here; him is ready to spawn. } } }
top: #define NEXT_TUT_STAGE(%0,%1) SetTimerEx ("TutorialStage", %0, 0, "ii", playerid, %1); then public TutorialStage(playerid, stage) { switch (stage) { case 1: { // the player are in stage 1 NEXT_TUT_STAGE(3500, 2); // 3500 = how much time the player should see this message? // 2 = what is the next stage? } case 2: { NEXT_TUT_STAGE(3500, 3); // 3500 = how much time the player should see this message? // 3 = what is the next stage? } case 3: { // finish here NEXT_TUT_STAGE(3500, 4); // 3500 = how much time the player should see this message? // 4 = what is the next stage? } case 4: { // reset the player here; he is ready to spawn. } } }