[Ajuda] Nгo estб pegando o tempo no tutorial
#1

Entгo nгo quer pegar quando clica pra pular/avanзar o tutorial pula normalmente pois й em Dialog por que o tempo nгo quer pegar tipo q o player precisa esperar tantos seg para poder avanзar






pawn Код:
if(dialogid == 904)
    {
        if(response == 1)
        {
            PlayerPlaySound(playerid, 1039,  0.0, 0.0, 0.0);
            new DialogInfoorg[1500];
            XXAirBreak[playerid] += 3;
            TempoTutorial[playerid] = SetTimerEx("Tutorial", 40000, false, "i", playerid);
            GameTextForPlayer(playerid, "~y~Inicio", 40000, 6);
            format(string,sizeof(string),"Olб %s, Seja muito bem vindo ao Brasil PlayFaster RPG\n",PlayerName(playerid));
            strcat(DialogInfoorg,string);
            format(string,sizeof(string),"\nPreste muita atenзгo neste tutorial para que nгo tome futuras puniзхes\n");
            strcat(DialogInfoorg,string);
            format(string,sizeof(string),"\nLembrando que esta serб a ultima vez que vocк verб este tutorial no jogo\n");
            strcat(DialogInfoorg,string);
            format(string,sizeof(string),"\nIntгo preste o maximo de atenзгo pois й muito importante ler todo o tutorial\n");
            strcat(DialogInfoorg,string);
            format(string,sizeof(string),"\nEste tutorial tambem te ajudarб a a entender melhor a jogabilidade do servidor\n");
            strcat(DialogInfoorg,string);
            format(string,sizeof(string),"\nE nгo pule o tutorial rapidamente por favor, e seja atento em tudo que ler neste tutorial\n");
            strcat(DialogInfoorg,string);
            ShowPlayerDialog(playerid, 905, DIALOG_STYLE_MSGBOX, "Inicio:", DialogInfoorg, "Avanзar", "Cancelar");
            SetPlayerCameraPos( playerid, -2864.7883, 264.9134, 23.1133 );
            SetPlayerCameraLookAt( playerid, -2864.4394, 254.9195, 20.8638 );
            XXAirBreak[playerid] += 3;SetPlayerPos(playerid, -2870.0090,272.1401,5.6831);
            SetPlayerInterior(playerid, 0);
            return 0;
        }
        else if(response == 0)
        {
            Kick(playerid);
            return 0;
        }
        return 0;
    }
Reply
#2

PHP код:
//Variбvel global
new TempoTutorial[playerid];

//No if(response) do dialog 904
if(response) {
    
PlayerPlaySound(playerid1039,  0.00.00.0);

    
XXAirBreak[playerid] += 3;
    
TempoTutorial[playerid] = GetTickCount() + 40000;
    
GameTextForPlayer(playerid"~y~Inicio"400006);

    
format(string,sizeof(string),"Olб %s, Seja muito bem vindo ao Brasil PlayFaster RPG\n",PlayerName(playerid));
    
strcat(DialogInfoorg,string);
    
format(string,sizeof(string),"\nPreste muita atenзгo neste tutorial para que nгo tome futuras puniзхes\n");
    
strcat(DialogInfoorg,string);
    
format(string,sizeof(string),"\nLembrando que esta serб a ultima vez que vocк verб este tutorial no jogo\n");
    
strcat(DialogInfoorg,string);
    
format(string,sizeof(string),"\nIntгo preste o maximo de atenзгo pois й muito importante ler todo o tutorial\n");
    
strcat(DialogInfoorg,string);
    
format(string,sizeof(string),"\nEste tutorial tambem te ajudarб a a entender melhor a jogabilidade do servidor\n");
    
strcat(DialogInfoorg,string);
    
format(string,sizeof(string),"\nE nгo pule o tutorial rapidamente por favor, e seja atento em tudo que ler neste tutorial\n");
    
strcat(DialogInfoorg,string);
    
ShowPlayerDialog(playerid905DIALOG_STYLE_MSGBOX"Inicio:"DialogInfoorg"Avanзar""Cancelar");

    
SetPlayerCameraPosplayerid, -2864.7883264.913423.1133 );
    
SetPlayerCameraLookAtplayerid, -2864.4394254.919520.8638 );
    
XXAirBreak[playerid] += 3;SetPlayerPos(playerid, -2870.0090,272.1401,5.6831);
    
SetPlayerInterior(playerid0);
}

//No if(response) do dialog 905
if(response) {
    if(
TempoTutorial[playerid] > GetTickCount()) {
        
//Mensagem dizendo que o jogador nгo esperou tempo necessбrio
        //Mostre o dialog 905 novamente
    
}    

Reply
#3

@Lуs , lуs poderia olhar a MP que enviei a ti por favor

#Edit,
Fiz como o Lуs disse (talvez eu tenha feito errado) , mais deu erro , tou tentando aqui se alguйm poder olhar o cуdigo ver o que estб acontecendo agradeзo

Aqui o cуdigo que eu fiz de exemplo (nгo sei se estб certo): http://pastebin.com/r49BgiSX

Aqui o cуdigo original sem modificaзхes: http://pastebin.com/23jUwkeJ
Reply
#4

Quote:
Originally Posted by ScripterInicianteBR
Посмотреть сообщение
@Lуs , lуs poderia olhar a MP que enviei a ti por favor

#Edit,
Fiz como o Lуs disse (talvez eu tenha feito errado) , mais deu erro , tou tentando aqui se alguйm poder olhar o cуdigo ver o que estб acontecendo agradeзo

Aqui o cуdigo que eu fiz de exemplo (nгo sei se estб certo): http://pastebin.com/r49BgiSX

Aqui o cуdigo original sem modificaзхes: http://pastebin.com/23jUwkeJ
Vocк continua nгo checando como lhe disse.

PHP код:
//No if(response) do dialog 905
if(response) {
    if(
TempoTutorial[playerid] > GetTickCount()) {
        
//Mensagem dizendo que o jogador nгo esperou tempo necessбrio
        //Mostre o dialog 905 novamente
    
}    

Reply
#5

Quote:
Originally Posted by Lуs
Посмотреть сообщение
Vocк continua nгo checando como lhe disse.

PHP код:
//No if(response) do dialog 905
if(response) {
    if(
TempoTutorial[playerid] > GetTickCount()) {
        
//Mensagem dizendo que o jogador nгo esperou tempo necessбrio
        //Mostre o dialog 905 novamente
    
}    

no "//mostre o dialog" seria o dialog 905 ?
Reply
#6

Quote:
Originally Posted by ScripterInicianteBR
Посмотреть сообщение
no "//mostre o dialog" seria o dialog 905 ?
Nгo! Perdгo. Neste caso й o anterior.
Reply
#7

Quote:
Originally Posted by Lуs
Посмотреть сообщение
Nгo! Perdгo. Neste caso й o anterior.
Nгo entendi
Reply
#8

PHP код:
switch(dialogid)
{
    case 
904: {
        if(!
response)
            return 
Kick(playerid);
        
        
//Cуdigo do dialogo 904
        
TempoTutorial[playerid] = GetTickCount() + 40000;
        return 
1;
    }
    case 
905: {
        if(!
response)
            return 
Kick(playerid);
            
        if(
TempoTutorial[playerid] > GetTickCount()) { 
            
//Mensagem dizendo que o jogador nгo esperou tempo necessбrio 
            //Mostre o dialog 904 novamente 
            
TempoTutorial[playerid] = GetTickCount() + 40000;
        }
        
        
//Cуdigo do dialogo 905
        
TempoTutorial[playerid] = GetTickCount() + 40000;
        return 
1;
    }

Reply
#9

Quote:
Originally Posted by Lуs
Посмотреть сообщение
PHP код:
switch(dialogid)
{
    case 
904: {
        if(!
response)
            return 
Kick(playerid);
        
        
//Cуdigo do dialogo 904
        
TempoTutorial[playerid] = GetTickCount() + 40000;
        return 
1;
    }
    case 
905: {
        if(!
response)
            return 
Kick(playerid);
            
        if(
TempoTutorial[playerid] > GetTickCount()) { 
            
//Mensagem dizendo que o jogador nгo esperou tempo necessбrio 
            //Mostre o dialog 904 novamente 
            
TempoTutorial[playerid] = GetTickCount() + 40000;
        }
        
        
//Cуdigo do dialogo 905
        
TempoTutorial[playerid] = GetTickCount() + 40000;
        return 
1;
    }

Obrigado depois irei tentar pois nгo entendi muito bem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)