Y_INI Tutorial help!
#1

I am making a tutorial system so when player spawns they have the choice to do the tutorial or dont do it all. But when they do the tutorial I want it to save in their .ini file. For example Its like this when a player hasnt done their tutorial Tutorial = 0 and when they have done their tut I want it to be like this
Tutorial = 1.


I have tried adding the saving code at the end of the tutorial but it hasnt worked my code is below. I also use Y_INI for my saving system.


Код:
    if(Tutcheckpoint[playerid] == 7)
    {
        DisablePlayerCheckpoint(playerid);
        Tutcheckpoint[playerid] = 0;
        SendClientMessage(playerid, COLOR_GREEN, "----------------------------------[The End]----------------------------------");
   	SendClientMessage(playerid, COLOR_YELLOW, "You've made it to the end and now that you know your way around its time to have fun!");
   	SendClientMessage(playerid, COLOR_GREEN, "-----------------------------------------------------------------------------");

        new INI:File = INI_Open(UserPath(playerid));
        INI_SetTag(File,"data");
	INI_WriteInt(File,"Tutorial",1);
       	INI_Close(File);
Reply
#2

do you actually CHECK at the connect or whereever they can choose if their Tutorial = 1? or do you just save it and never use it again?
Reply
#3

You Have Rewrite everything when the tutorial gets over... otherwise add that onplayerdisconnect
Reply
#4

Quote:
Originally Posted by niels44
Посмотреть сообщение
do you actually CHECK at the connect or whereever they can choose if their Tutorial = 1? or do you just save it and never use it again?
Yes I do when a player registers it is set to 0 and when they spawn they can do /tut to start the tutorial if they want and when they complete the tutorial I want it to change to 1 so they cant use the command anymore.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)