My tutorial doesn't work.
#1

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;
}
Reply
#2

Do you mean it doesn't come up when a player arrives? Are there any error codes?
Reply
#3

Yeah, It doesn't come up and No, no errors when compiled.
Reply
#4

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?
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)