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;
}
//Variбvel global
new TempoTutorial[playerid];
//No if(response) do dialog 904
if(response) {
PlayerPlaySound(playerid, 1039, 0.0, 0.0, 0.0);
XXAirBreak[playerid] += 3;
TempoTutorial[playerid] = GetTickCount() + 40000;
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);
}
//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
}
}
@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 |
//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
}
}
Vocк continua nгo checando como lhe disse.
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;
}
}
PHP код:
|