SA-MP Forums Archive
Question? - 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: Question? (/showthread.php?tid=334484)



Question? - sampmark05 - 15.04.2012

How to make a RP tutotrial for my RP server?

My RP server is Next Revolution Roleplay


Re: Question? - Kitten - 15.04.2012

Create a variable and increase it by 1, by setting a timer each x amount of seconds/minutes to change.

pawn Код:
new Tutorial[MAX_PLAYERS];
forward Tut(playerid);

public OnPlayerConnect(playerid)
{
    Tutorial[playerid] = 1;
    return 1;
}


public OnPlayerSpawn(playerid)
{
    if(Tutorial[playerid] == 1) {
        Tut(playerid);
        Tutorial[playerid] = 2;
    }

    if(Tutorial[playerid] == 0) return printf("Tutorial finshed"); // normal spawn stuff.
    return 1;
}


public Tut(playerid)
{
    if(Tutorial[playerid] == 2) {
        SetTimerEx("Tut",10000,false,"i",playerid);
// Tut part 1 stuff
        Tutorial[playerid] = 3;
    }
    if(Tutorial[playerid] == 3) {
        SetTimerEx("Tut",10000,false,"i",playerid);
// Tut part 2 stuff
        Tutorial[playerid] = 4;
    }
    if(Tutorial[playerid] == 4) {
        Tutorial[playerid] = 0;
        SpawnPlayer(playerid);
    }
    return 1;
}



Re: Question? - sampmark05 - 15.04.2012

HOLY shitttttttttt!!! Thank you very much Sir. Kitten i will give you 1 rep