Tutorials - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Tutorials (
/showthread.php?tid=141884)
Tutorials -
Tony1337 - 15.04.2010
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 !!
Re: Tutorials -
RSC_Quicker - 15.04.2010
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.
Re: Tutorials -
Tony1337 - 15.04.2010
is there a way to start this right after you've registered?
Re: Tutorials -
Thrarod - 15.04.2010
Put SetTimer("Tutorial",20000,1); part to your success part of register command
Re: Tutorials -
RSC_Quicker - 16.04.2010
Quote:
Originally Posted by Thrarod
Put SetTimer("Tutorial",20000,1); part to your success part of register command ![Cheesy](images/smilies/biggrin.png)
|
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.