Y_INI Tutorial help! - 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: Y_INI Tutorial help! (
/showthread.php?tid=394442)
Y_INI Tutorial help! -
sgtjones12 - 22.11.2012
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);
Re: Y_INI Tutorial help! -
niels44 - 22.11.2012
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?
Re: Y_INI Tutorial help! -
-=Dar[K]Lord=- - 22.11.2012
You Have Rewrite everything when the tutorial gets over... otherwise add that onplayerdisconnect
Re: Y_INI Tutorial help! -
sgtjones12 - 22.11.2012
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.