Pasar cada 12 segundos pagina Tutorial
#1

Hola Gente, si no les molesta que les pida un favor, querнa saber como hacer para que dicho tutorial pase cada 12 segundos, y que dicha tecla que antes cambiaba las pagina ya no funcione, ejemplo antes el tutorial se pasaba de pagina con la tecla "F", yo quiero que el tutorial se pase automбticamente cada 12 segundos y que la tecla "F" no cumpla ninguna funciуn sobre el tutorial, aqui el tutorial antero

pawn Код:
function Tutorial_Inside(i)
{
    new string[512];
    if(TutStep[i] == 1)
    {
        if(TutTime[i] >= 1)
        {
            switch (TutTime[i])
            {
                case 1:
                {
                    PuedeP[i] = 1;
                    SetTimerEx("PuedePTimer", 1000, 0, "d", i);
                    ClearChatbox(i);
                    TextDrawShowForPlayer(i, TextTut[i]);
                    for(new p = 1; p < 5; p++)
                    {
                    }
                 TextDrawShowForPlayer(i, LoginMenu[0]);
                    TextDrawShowForPlayer(i, LoginMenu[1]);
                    TextDrawShowForPlayer(i, LoginMenu[4]);
                    gOoc[i] = 1; gNews[i] = 1; gFam[i] = 1; gNewbie[i]=1;
                    PlayAudioStreamForPlayer(i, "http://niegioe.raybod.mp3");
                    InterpolateCameraPos(i, 343.677642, -1971.036254, 16.012546, 339.695068, -2076.620117, 21.576124, 15000);
                    InterpolateCameraLookAt(i, 347.773040, -1973.903320, 16.097681, 343.308288, -2073.173095, 21.825222, 15000);
                    SetPlayerPos(i,375.7209,-2067.1392,7.8359);
                    SetPlayerVirtualWorld(i, 800);
                    TogglePlayerControllable(i, 0);
                    format(string, sizeof(string),      "hola1);
                    TextDrawSetString(TextTut[i], string);
                }
                case 2:
                {
                    PuedeP[i] = 1;
                    SetTimerEx("
PuedePTimer", 1000, 0, "d", i);
                    InterpolateCameraPos(i, 970.222778, -1151.035522, 35.782760, 1077.070312, -1151.894653, 45.418926, 15000);
                    InterpolateCameraLookAt(i, 970.111328, -1146.074218, 35.172214, 1072.826782, -1149.461425, 44.383502, 15000);
                    SetPlayerPos(i,1002.1137,-1106.6222,23.8281);
                    format(string, sizeof(string),      "
hola2");
                    TextDrawSetString(TextTut[i], string);
                }
                case 3:
                {
                    PuedeP[i] = 1;
                    SetTimerEx("
PuedePTimer", 1000, 0, "d", i);
                    InterpolateCameraPos(i, 1532.389892, -1700.885375, 34.022006, 1406.326538, -1705.109497, 40.130882, 12000);
                    InterpolateCameraLookAt(i, 1531.340332, -1705.319091, 36.081157, 1408.985473, -1709.294677, 40.774833, 12000);
                    SetPlayerPos(i,1457.6517,-1626.3792,14.7891);
                    format(string, sizeof(string),      "
hola3");
                    TextDrawSetString(TextTut[i], string);
                }
                case 4:
                {
                    PuedeP[i] = 1;
                    SetTimerEx("
PuedePTimer", 1000, 0, "d", i);
                    InterpolateCameraPos(i, 1813.110839, -1883.205078, 19.805068, 1759.052124, -1985.393432, 27.122257, 12000);
                    InterpolateCameraLookAt(i, 1808.751953, -1885.564575, 19.146829, 1760.054931, -1980.643066, 25.926916, 12000);
                    SetPlayerPos(i,1743.3328,-1862.1896,13.5766);
                    format(string, sizeof(string),      "
hola4");
                    TextDrawSetString(TextTut[i], string);
                }
                case 5:
                {
                    PuedeP[i] = 1;
                    SetTimerEx("
PuedePTimer", 1000, 0, "d", i);
                    InterpolateCameraPos(i, 1614.032104, -2300.437255, 16.151958, 1707.875854, -2293.043457, 17.251235, 12000);
                    InterpolateCameraLookAt(i, 1614.020385, -2305.432373, 15.929376, 1707.155639, -2297.991210, 17.247329, 12000);
                    SetPlayerPos(i,1586.7183,-2304.6445,13.5474);
                    format(string, sizeof(string),      "
hola5");
                    TextDrawSetString(TextTut[i], string);
                }
                case 6:
                {
                    PuedeP[i] = 1;
                    SetTimerEx("
PuedePTimer", 1000, 0, "d", i);
                    InterpolateCameraPos(i, 1735.230834, -1850.017822, 66.533882, 1744.326416, -1852.399902, 18.713655, 12000);
                    InterpolateCameraLookAt(i, 1735.922607, -1851.019042, 61.684238, 1744.446777, -1857.218017, 17.382560, 12000);
                    SetPlayerPos(i,1743.3328,-1862.1896,13.5766);
                    format(string, sizeof(string),      "
hola6");
                    TextDrawSetString(TextTut[i], string);
                }
                case 7:
                {
                    PuedeP[i] = 0;
                    TextDrawHideForPlayer(i, TextTut[i]);
                    for(new p = 1; p < 5; p++)
                    {
                    }
                    gOoc[i] = 0;    gNews[i] = 0;
                    gFam[i] = 0;    TutStep[i] = 0;
                    gNewbie[i]=0;    Muted[i] = 0;
                    TutTime[i] = 0;
                    SetPosEx(i, 1743.2155,-1862.1309,13.5767,0,0,0);
                    SendClientMessageEx(i, 0x00AFF4FF, "
Bienvenido! {FFFFFF}Si tienes alguna inquietud o duda, usa nuestro canal de ayuda, {FFFF00}/duda [Pregunta]");
                    SendClientMessageEx(i, -1, "
{FFFFFF}Puedes reportar cualquier tema con el comando {FFFF00}/reportar [ID] [Razуn] {FFFFFF}y nuestro soporte te ayudarб");
                    SendClientMessageEx(i, -1, "
Recuerda que tambien contamos con ayudantes que pueden ayudarte en lo que necesites si quieres solicitarlos usa {FFFF00}/ayudame");
                SendClientMessageEx(i, -1, "
{FFFFFF}Si necesitas ayuda o tienes dudas y no hay admins o necesitas que un usuario te ayude recuerda ocupar el canal {FFFF00}/n");
                    Info[i][pWRestricted] = 0;
                    Info[i][pTut] = 1;
                    Info[i][pTimePayDay] = 0;
                    Info[i][pLevel] = 3;
                    Info[i][pNMute] = 0;
                    TogglePlayerControllable(i, 1);
                    SetPlayerVirtualWorld(i, 0);
                    ClearAnimations(i);
                    GivePlayerCash(i, 50000);
                    SetCameraBehindPlayer(i);
                    format(string, sizeof(string), "
~b~ %s ~w~~n~Has recibido tus stats ~n~Nivel 3 y 50k", GetPlayerNameEx(i));
                    GameTextForPlayer(i, string, 4000, 1);
                    OnPlayerSavedStats(i);
                    TextDrawShowForPlayer(i, ImpactRP);
                    StopAudioStreamForPlayer(i);
                    TextDrawHideForPlayer(i, LoginMenu[0]);
                          TextDrawHideForPlayer(i, LoginMenu[1]);
                             TextDrawHideForPlayer(i, LoginMenu[4]);
          }
      }
  }
 }
    return 1;
Agradezco muchнsimo su ayuda, saludos!
Reply
#2

Necesito ayuda e.e!
Reply
#3

pawn Код:
#define TIMER_TUTORIAL (12*1000)
new PasosTutorial[MAX_PLAYERS];
new MatarTutorial[MAX_PLAYERS];

forward CargarTutorial(playerid);
public CargarTutorial(playerid) {
    switch(PasosTutorial[playerid]) {
        case 0: { //paso 1 Inicio
            PasosTutorial[playerid]++;
        }
        case 1: { //paso 2
            PasosTutorial[playerid]++;
        }
        case 2: { //paso 3
            PasosTutorial[playerid]++;
        }
        case 3: { //paso 4
            PasosTutorial[playerid]++;
        }
        case 4: { //paso 5
            PasosTutorial[playerid]++;
        }
        case 5: { //paso 6 Final
            PasosTutorial[playerid]=0;
            KillTimer(MatarTutorial[playerid]);
        }
    }
}

KillTimer(MatarTutorial[playerid]);
MatarTutorial[playerid]=SetTimerEx("CargarTutorial", TIMER_TUTORIAL, true, "d", playerid);
Reply
#4

Emmmh, no entendн, pero por lo que veo tu me estas dando una forma de como hacer el tutorial prбcticamente de 0, si puedes el mismo que te di armбrmelo algo asн para evitar, que yo tenga problemas :P (Era re cуmodo el vago jaja)


Aquн la tecla que presiono, para que pasen las paginas del tutorial

pawn Код:
if(newkeys == KEY_SECONDARY_ATTACK)
    {
        if(TutStep[playerid] == 0) return 1;
        if(PuedeP[playerid] == 1) return GameTextForPlayer(playerid, "Espera 5 Segundos!", 5000, 5);
        if(TutStep[playerid] == 1)
        {
            switch(TutTime[playerid])
            {
                case 1: TutTime[playerid] = 2;
                case 2: TutTime[playerid] = 3;
                case 3: TutTime[playerid] = 4;
                case 4: TutTime[playerid] = 5;
                case 5: TutTime[playerid] = 6;
                case 6: TutTime[playerid] = 7;
            }
            Tutorial_Inside(playerid);
        }
    }
Yo creo que por ahн pongo un 0 por allб arriba, y pasarнan solo no?
Reply
#5

No te lo puedo arreglar porque como verбs el sistema estб compuesto por varias variables, etc. Y con lo que nos has proporcionado, lo veo difнcil. Aparte de eso, hay que tener cara para pedirnos eso, vaguedad total por favor...

Yo que tu lo eliminarнa y lo harнa de cero, sigue el ejemplo que te pusieron anteriormente para que te hagas una idea.
Reply
#6

Utiliza esto, es bastante fбcil de configurar.

pawn Код:
#include <a_samp>
/*
#undef MAX_PLAYERS
#define MAX_PLAYERS 1
*/


/*||        Demas globales                  ||*/
forward callbackTutorial(jugadorid);
forward callbackTutorialInicio(jugadorid);
forward callbackTutorialTermino(jugadorid);
#define TUTORIAL_TIEMPO 12000 //Milisegundos que demorarб en pasar al otro tutorial
#define TUTORIAL_MAX_TAM 256 //Mбximo tamaсo de las cadenas que se mostrarбn

/*||        Variables                       ||*/
new bool:jTutorial[MAX_PLAYERS]; //Dice si el jugador esta en tutorial o nу
new numeroTutorial[MAX_PLAYERS]; //El ID del tutorial en el que esta
new tiempoTutorial[MAX_PLAYERS]; //Para usar con SetTimer y SetTimerEx
enum EnumInfoTutorial
{
    tut_id,
    tut_ms,
    tut_info[TUTORIAL_MAX_TAM],
    Float:tut_posCamara[3],
    Float:tut_posJugador[3]
}
new infoTutorial[][EnumInfoTutorial] =
{
    {   0, TUTORIAL_TIEMPO, "Primera parte del tutorial", {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}      },
    {   1, TUTORIAL_TIEMPO, "Segunda parte del tutorial", {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}      }
};

/*||        Funciones principales           ||*/
        //Iniciar el tutorial
stock iniciarTutorial(jugadorid, desdeID = 0)
{
    //Si ya esta en el tutorial
    if(jTutorial[jugadorid] == true) return 2;
   
    //Dice que esta en el tutorial
    jTutorial[jugadorid] = true;
   
    //Congela al jugador
    TogglePlayerControllable(jugadorid, false);
   
    //Dice que inicia el tutorial desde el punto "desdeID" (por defecto, el principio)
    numeroTutorial[jugadorid] = desdeID;
   
    //Posiciona la cбmara del jugador
    SetPlayerCameraPos(jugadorid, infoTutorial[numeroTutorial[jugadorid]][tut_posCamara][0], infoTutorial[numeroTutorial[jugadorid]][tut_posCamara][1], infoTutorial[numeroTutorial[jugadorid]][tut_posCamara][2]);
    SetPlayerCameraLookAt(jugadorid, infoTutorial[numeroTutorial[jugadorid]][tut_posJugador][0], infoTutorial[numeroTutorial[jugadorid]][tut_posJugador][1], infoTutorial[numeroTutorial[jugadorid]][tut_posJugador][2]);

    //Lleva al jugador a la posiciуn
    SetPlayerPos(jugadorid, infoTutorial[numeroTutorial[jugadorid]][tut_posJugador][0], infoTutorial[numeroTutorial[jugadorid]][tut_posJugador][1], infoTutorial[numeroTutorial[jugadorid]][tut_posJugador][2]);

    //Envia el mensaje
    GameTextForPlayer(jugadorid, infoTutorial[numeroTutorial[jugadorid]][tut_info], infoTutorial[numeroTutorial[jugadorid]][tut_ms], 3);
   
    //Crea el tiempo para pasar a la siguiente
    KillTimer(tiempoTutorial[jugadorid]);
    tiempoTutorial[jugadorid] = SetTimerEx("callbackTutorial", infoTutorial[numeroTutorial[jugadorid]][tut_ms], false, "i", jugadorid);
   
    //Llama a la callback
    CallLocalFunction("callbackTutorialInicio", "i", jugadorid);
   
    return 1;
}
        //Saber si un jugador esta en el tutorial o nу
stock bool:enTutorial(jugadorid) return jTutorial[jugadorid];

public callbackTutorial(jugadorid)
{
    //Aumenta la informaciуn
    ++numeroTutorial[jugadorid];

    if(numeroTutorial[jugadorid] >= sizeof(infoTutorial))
    {
        //Terminу el tutorial
       
        //Descongela al jugador
        TogglePlayerControllable(jugadorid, true);
       
        //Cбmara
        SetCameraBehindPlayer(jugadorid);
       
        //Dice que no esta en el tutorial
        jTutorial[jugadorid] = false;
       
        //Llama a la callback
        CallLocalFunction("callbackTutorialTermino", "i", jugadorid);
       
        return 1;
    }
    else
    {
        //Aun no termina el tutorial
       
        //Posiciona la cбmara del jugador
        SetPlayerCameraPos(jugadorid, infoTutorial[numeroTutorial[jugadorid]][tut_posCamara][0], infoTutorial[numeroTutorial[jugadorid]][tut_posCamara][1], infoTutorial[numeroTutorial[jugadorid]][tut_posCamara][2]);
        SetPlayerCameraLookAt(jugadorid, infoTutorial[numeroTutorial[jugadorid]][tut_posJugador][0], infoTutorial[numeroTutorial[jugadorid]][tut_posJugador][1], infoTutorial[numeroTutorial[jugadorid]][tut_posJugador][2]);

        //Lleva al jugador a la posiciуn
        SetPlayerPos(jugadorid, infoTutorial[numeroTutorial[jugadorid]][tut_posJugador][0], infoTutorial[numeroTutorial[jugadorid]][tut_posJugador][1], infoTutorial[numeroTutorial[jugadorid]][tut_posJugador][2]);

        //Envia el mensaje
        GameTextForPlayer(jugadorid, infoTutorial[numeroTutorial[jugadorid]][tut_info], infoTutorial[numeroTutorial[jugadorid]][tut_ms], 3);

        //Crea el tiempo para pasar a la siguiente
        KillTimer(tiempoTutorial[jugadorid]);
        tiempoTutorial[jugadorid] = SetTimerEx("callbackTutorial", infoTutorial[numeroTutorial[jugadorid]][tut_ms], false, "i", jugadorid);
       
        return 1;
    }
}

public OnPlayerConnect(playerid)
{
    //Dice que esta en el principio del tutorial
    numeroTutorial[playerid] = 0;
   
    //Dice que no esta en el tutorial
    jTutorial[playerid] = false;
   
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    //Si esta en el tutorial y se desconecta, elimina el tiempo
    if(enTutorial(playerid)) KillTimer(tiempoTutorial[playerid]);
   
    return 1;
}
Te explico basicamente como hacerlo.

pawn Код:
forward callbackTutorialInicio(jugadorid);
forward callbackTutorialTermino(jugadorid);
Esas 2 callbacks tienen un nombre obvio no crees?

pawn Код:
#define TUTORIAL_TIEMPO 12000 //Milisegundos que demorarб en pasar al otro tutorial
#define TUTORIAL_MAX_TAM 256 //Mбximo tamaсo de las cadenas que se mostrarбn
La primera linea es el tiempo por defecto de todas las informaciones, aunque cada una debe tener una propia.
La segunda es el tamaсo mбximo de la informaciуn que pondrбs, yo puse 256 para prevenir.


pawn Код:
new infoTutorial[][EnumInfoTutorial] =
{
    {   0, TUTORIAL_TIEMPO, "Primera parte del tutorial", {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}      },
    {   1, TUTORIAL_TIEMPO, "Segunda parte del tutorial", {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}      }
};
1.- ID; te recomiendo que lo utilizes de buena forma, no afecta en nada el nъmero que uses ahн pero es mejor que mantengas un orden siempre.
2.- Milisegundos; este es el tiempo en milisegundos que demorarб o se mostrarб el mensaje en la pantalla.
3.- Mensaje; obviamente, el mensaje que se mostrarб.
4.- Camara; la posiciуn de la cбmara.
5.- MCamara; donde mirarб la cбmara, ademбs de la posiciуn donde estarб el jugador mientras esta en esta parte del tutorial.

Para agregar mas simplemente agrega mas lineas, como una simple variable.


pawn Код:
native iniciarTutorial(jugadorid, desdeID = 0);
native bool:enTutorial(jugadorid);
La primera es para iniciar el tutorial, retornarб 2 si el jugador ya estaba en el tutorial y 1 si se iniciу correctamente.
La segunda es para saber si esta en el tutorial o nу.
Reply
#7

Quote:
Originally Posted by DesingMyCry
Посмотреть сообщение
Utiliza esto, es bastante fбcil de configurar.

pawn Код:
#include <a_samp>
/*
#undef MAX_PLAYERS
#define MAX_PLAYERS 1
*/


/*||        Demas globales                  ||*/
forward callbackTutorial(jugadorid);
forward callbackTutorialInicio(jugadorid);
forward callbackTutorialTermino(jugadorid);
#define TUTORIAL_TIEMPO 12000 //Milisegundos que demorarб en pasar al otro tutorial
#define TUTORIAL_MAX_TAM 256 //Mбximo tamaсo de las cadenas que se mostrarбn

/*||        Variables                       ||*/
new bool:jTutorial[MAX_PLAYERS]; //Dice si el jugador esta en tutorial o nу
new numeroTutorial[MAX_PLAYERS]; //El ID del tutorial en el que esta
new tiempoTutorial[MAX_PLAYERS]; //Para usar con SetTimer y SetTimerEx
enum EnumInfoTutorial
{
    tut_id,
    tut_ms,
    tut_info[TUTORIAL_MAX_TAM],
    Float:tut_posCamara[3],
    Float:tut_posJugador[3]
}
new infoTutorial[][EnumInfoTutorial] =
{
    {   0, TUTORIAL_TIEMPO, "Primera parte del tutorial", {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}      },
    {   1, TUTORIAL_TIEMPO, "Segunda parte del tutorial", {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}      }
};

/*||        Funciones principales           ||*/
        //Iniciar el tutorial
stock iniciarTutorial(jugadorid, desdeID = 0)
{
    //Si ya esta en el tutorial
    if(jTutorial[jugadorid] == true) return 2;
   
    //Dice que esta en el tutorial
    jTutorial[jugadorid] = true;
   
    //Congela al jugador
    TogglePlayerControllable(jugadorid, false);
   
    //Dice que inicia el tutorial desde el punto "desdeID" (por defecto, el principio)
    numeroTutorial[jugadorid] = desdeID;
   
    //Posiciona la cбmara del jugador
    SetPlayerCameraPos(jugadorid, infoTutorial[numeroTutorial[jugadorid]][tut_posCamara][0], infoTutorial[numeroTutorial[jugadorid]][tut_posCamara][1], infoTutorial[numeroTutorial[jugadorid]][tut_posCamara][2]);
    SetPlayerCameraLookAt(jugadorid, infoTutorial[numeroTutorial[jugadorid]][tut_posJugador][0], infoTutorial[numeroTutorial[jugadorid]][tut_posJugador][1], infoTutorial[numeroTutorial[jugadorid]][tut_posJugador][2]);

    //Lleva al jugador a la posiciуn
    SetPlayerPos(jugadorid, infoTutorial[numeroTutorial[jugadorid]][tut_posJugador][0], infoTutorial[numeroTutorial[jugadorid]][tut_posJugador][1], infoTutorial[numeroTutorial[jugadorid]][tut_posJugador][2]);

    //Envia el mensaje
    GameTextForPlayer(jugadorid, infoTutorial[numeroTutorial[jugadorid]][tut_info], infoTutorial[numeroTutorial[jugadorid]][tut_ms], 3);
   
    //Crea el tiempo para pasar a la siguiente
    KillTimer(tiempoTutorial[jugadorid]);
    tiempoTutorial[jugadorid] = SetTimerEx("callbackTutorial", infoTutorial[numeroTutorial[jugadorid]][tut_ms], false, "i", jugadorid);
   
    //Llama a la callback
    CallLocalFunction("callbackTutorialInicio", "i", jugadorid);
   
    return 1;
}
        //Saber si un jugador esta en el tutorial o nу
stock bool:enTutorial(jugadorid) return jTutorial[jugadorid];

public callbackTutorial(jugadorid)
{
    //Aumenta la informaciуn
    ++numeroTutorial[jugadorid];

    if(numeroTutorial[jugadorid] >= sizeof(infoTutorial))
    {
        //Terminу el tutorial
       
        //Descongela al jugador
        TogglePlayerControllable(jugadorid, true);
       
        //Cбmara
        SetCameraBehindPlayer(jugadorid);
       
        //Dice que no esta en el tutorial
        jTutorial[jugadorid] = false;
       
        //Llama a la callback
        CallLocalFunction("callbackTutorialTermino", "i", jugadorid);
       
        return 1;
    }
    else
    {
        //Aun no termina el tutorial
       
        //Posiciona la cбmara del jugador
        SetPlayerCameraPos(jugadorid, infoTutorial[numeroTutorial[jugadorid]][tut_posCamara][0], infoTutorial[numeroTutorial[jugadorid]][tut_posCamara][1], infoTutorial[numeroTutorial[jugadorid]][tut_posCamara][2]);
        SetPlayerCameraLookAt(jugadorid, infoTutorial[numeroTutorial[jugadorid]][tut_posJugador][0], infoTutorial[numeroTutorial[jugadorid]][tut_posJugador][1], infoTutorial[numeroTutorial[jugadorid]][tut_posJugador][2]);

        //Lleva al jugador a la posiciуn
        SetPlayerPos(jugadorid, infoTutorial[numeroTutorial[jugadorid]][tut_posJugador][0], infoTutorial[numeroTutorial[jugadorid]][tut_posJugador][1], infoTutorial[numeroTutorial[jugadorid]][tut_posJugador][2]);

        //Envia el mensaje
        GameTextForPlayer(jugadorid, infoTutorial[numeroTutorial[jugadorid]][tut_info], infoTutorial[numeroTutorial[jugadorid]][tut_ms], 3);

        //Crea el tiempo para pasar a la siguiente
        KillTimer(tiempoTutorial[jugadorid]);
        tiempoTutorial[jugadorid] = SetTimerEx("callbackTutorial", infoTutorial[numeroTutorial[jugadorid]][tut_ms], false, "i", jugadorid);
       
        return 1;
    }
}

public OnPlayerConnect(playerid)
{
    //Dice que esta en el principio del tutorial
    numeroTutorial[playerid] = 0;
   
    //Dice que no esta en el tutorial
    jTutorial[playerid] = false;
   
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    //Si esta en el tutorial y se desconecta, elimina el tiempo
    if(enTutorial(playerid)) KillTimer(tiempoTutorial[playerid]);
   
    return 1;
}
Te explico basicamente como hacerlo.

pawn Код:
forward callbackTutorialInicio(jugadorid);
forward callbackTutorialTermino(jugadorid);
Esas 2 callbacks tienen un nombre obvio no crees?

pawn Код:
#define TUTORIAL_TIEMPO 12000 //Milisegundos que demorarб en pasar al otro tutorial
#define TUTORIAL_MAX_TAM 256 //Mбximo tamaсo de las cadenas que se mostrarбn
La primera linea es el tiempo por defecto de todas las informaciones, aunque cada una debe tener una propia.
La segunda es el tamaсo mбximo de la informaciуn que pondrбs, yo puse 256 para prevenir.


pawn Код:
new infoTutorial[][EnumInfoTutorial] =
{
    {   0, TUTORIAL_TIEMPO, "Primera parte del tutorial", {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}      },
    {   1, TUTORIAL_TIEMPO, "Segunda parte del tutorial", {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}      }
};
1.- ID; te recomiendo que lo utilizes de buena forma, no afecta en nada el nъmero que uses ahн pero es mejor que mantengas un orden siempre.
2.- Milisegundos; este es el tiempo en milisegundos que demorarб o se mostrarб el mensaje en la pantalla.
3.- Mensaje; obviamente, el mensaje que se mostrarб.
4.- Camara; la posiciуn de la cбmara.
5.- MCamara; donde mirarб la cбmara, ademбs de la posiciуn donde estarб el jugador mientras esta en esta parte del tutorial.

Para agregar mas simplemente agrega mas lineas, como una simple variable.


pawn Код:
native iniciarTutorial(jugadorid, desdeID = 0);
native bool:enTutorial(jugadorid);
La primera es para iniciar el tutorial, retornarб 2 si el jugador ya estaba en el tutorial y 1 si se iniciу correctamente.
La segunda es para saber si esta en el tutorial o nу.
le dara un infarto xDD. tendra ke leer mucho.
Reply
#8

Es una forma mas optimizada de usar, ademбs es fбcil de agregar. Simplemente que se concentre en la variable que agrega puntos de informaciуn.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)