SA-MP Forums Archive
HOW TO DO THIS? - 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: HOW TO DO THIS? (/showthread.php?tid=370766)



HOW TO DO THIS? - NinjaChicken - 21.08.2012

ok in my server i have after you do the tut /start to begin playing how can i have it so a text draw pops up saying press Y to spawn and choose your skin then when they press Y it will send the CMD /start but only once so it doesnt fuck up other shit?


Re: HOW TO DO THIS? - Akira297 - 21.08.2012

You mean like NGG's textdraw for the tutorial system?


Re: HOW TO DO THIS? - NinjaChicken - 21.08.2012

yea but not the text draw just at the end of my tutorial press y to spawn


Re: HOW TO DO THIS? - Akira297 - 21.08.2012

/withdrawsfromthetopic.


Re: HOW TO DO THIS? - Ranama - 21.08.2012

Just use OnPlayerKeyStateChange and when your tutorial is finished you set a variable on them, like
pawn Код:
new tutfinish[MAX_PLAYERS];//or make a player varible here instead

//on the tutorial finish do like this:
tutfinish[playerid] = 1;

//and onkeystatehcange you use:
if(newkeys & KEY_YES && tutfinish[playerid] == 1){
tutfinish[playerid] = 0;
//and your spawn functions here
}
Hope it helped