My tutorial doesn't work. - 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: My tutorial doesn't work. (
/showthread.php?tid=186398)
My tutorial doesn't work. -
cre8ticity - 28.10.2010
Hey,
I quickly made this tutorial type thing, but when you spawn it doesnt do anything.
pawn Код:
public OnPlayerSpawn(playerid)
{
if(PlayerInfo[playerid][pTut] == 0)
{
InfoTimer[playerid] += 1;
if(InfoTimer[playerid] == 3)
{
new name[MAX_PLAYER_NAME];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, 128, "Greetings %s, Welcome to Heathrow Airport, London.", name);
SendClientMessage(playerid, COLOR_WHITE, string);
}
if(InfoTimer[playerid] == 5)
{
SendClientMessage(playerid, COLOR_WHITE, "Airport Checkout Says: I hope you enjoyed your flight.");
}
if(InfoTimer[playerid] == 7)
{
SendClientMessage(playerid, COLOR_WHITE, "Airport Checkout Says: Before you can checkout from Heathrow Airport, We just need some details.");
}
if(InfoTimer[playerid] == 10)
{
ShowPlayerDialog(playerid,3,DIALOG_STYLE_LIST,"Gender:","Male\nFemale","Select","Cancel");
InfoTimer[playerid] = 0;
}
}
return 1;
}
Re: My tutorial doesn't work. -
Crayon - 28.10.2010
Do you mean it doesn't come up when a player arrives? Are there any error codes?
Re: My tutorial doesn't work. -
cre8ticity - 28.10.2010
Yeah, It doesn't come up and No, no errors when compiled.
Re: My tutorial doesn't work. -
••• ĤБĶБM ••• - 28.10.2010
It doesn't come up?
pawn Код:
if(PlayerInfo[playerid][pTut] == 0)
Are you sure the character you're using has the Tutorial variable set to 0 instead of 1 or more?
Re: My tutorial doesn't work. -
cre8ticity - 28.10.2010
Yup, I'm pretty sure, it saves to the .ini file of my character, If I open it, it says Tut = 0 so yeah.
And when you login it is set to retrieve it
pawn Код:
PlayerInfo[playerid][pTut] = dini_Int(file, "Tut");
Edit :
http://pastebin.com/7cB1Gdj7 -- Here is the whole script