Tutorials
#1

Hello, SA-MP Community. I was wondering if there is anyone here who could maybe help me out with something. I'm planing to create a tutorial for my server. I'm not to sure how to do that thought, and i was wondering if anyone could show me how to? or give a example? That would be greatly appreciated Thanks !!
Reply
#2

Well this the way how I did it.
Create a timer like SetTimer("Tutorial",20000,1);
Or use SetTimerEx if you want.
Create the Callback Tutorial
Код:
new Tut[MAX_PLAYERS];

forward Tutorial();
public Totorial()
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(Tut[i] == 1)
		{
			SendClientMessage(i, COLOR, "Text for the first part of the tutorial");
			Tut[i] = 2;
		}
		if(Tut[i] == 2)
		{
			SendClientMessage(i, COLOR, "Text for the second part of the tutorial");
			Tut[i] = 3;
		}
		if(Tut[i] == 3)
		{
			SendClientMessage(i, COLOR, "End of the tutorial.");
			Tut[i] = 4;
		}
	}
}
I hope you can create a command like /starttutorial. So the Tut[playerid] go to 1
Then the tutorial will start.
Reply
#3

is there a way to start this right after you've registered?
Reply
#4

Put SetTimer("Tutorial",20000,1); part to your success part of register command
Reply
#5

Quote:
Originally Posted by Thrarod
Put SetTimer("Tutorial",20000,1); part to your success part of register command
No don't do this. It will cause bugs when you are with more people.
Just set Tut[playerid] = 1;
Then the tutorial will start for him in 20 seconds.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)