SA-MP Forums Archive
Making the tutorial save? - 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)
+--- Thread: Making the tutorial save? (/showthread.php?tid=484479)



Making the tutorial save? - HK - 30.12.2013

Hello guys, i've been trying to use this tutorial:everything works great!

But i'm now facing an seriously problem, can't I make this save?

like in my enum having an TutorialFinish to check about something?


Re: Making the tutorial save? - ConnorHunter - 30.12.2013

What do you mean save it? If it's in the script, it will happen automatically, unless you're trying to make it dynamic.

Make an enum like "InTut"
And when a player connects set the value to 1
then if the variable if 1 when a player joins, perform the tutorial
when the tutorial finishes, set the variable to 0 then spawn them


Re: Making the tutorial save? - SilentSoul - 30.12.2013

Yes you can of course , just make at last response for that tutorial (however if you're using dialogs, etc..) just store the variable of tutorialfinish = 1;,then when the player connect check if the variable equal to 1 or not if it's equal true ignore that case here's an example
pawn Код:
public OnPlayerSpawn(playerid)
{
    if(PlayerInfo[ playerid ][ TutorialFinish ] == 0)
    {
     //show him your dialogs , textdraws..
    }//on the other cases if he saw that tutorials before , just he can spawn without anything bothers him.
    return 1 ;
}
If you need more explanation just tell me your saving stats system and show me your enums.


Re: Making the tutorial save? - HK - 31.12.2013

Hmm, doesnt really work..


Re: Making the tutorial save? - HK - 02.01.2014

Anyone else ?