08.06.2013, 23:22
I have two dialog scripts that show up at the same time so you only get to see one and i was wondering how can i add a timer to one of them here are the different scripts
pawn Код:
new stringa[500];
if(dialogid == DIALOGCLAN)
{
if(response)
{
if(!strlen(inputtext))
{
new nome[24];
GetPlayerName(playerid, nome, 24);
format(stringa, sizeof stringa, "{FF4444}Error:{FFFFFF} Insert a password.\n\n{FFFFFF}Welcome {FF4444}%s{FFFFFF}!\nYou must confirm the clan password {FF4444}%s{FFFFFF}.\n{FFFFFF}Enter the clan password and confirm.", nome);
ShowPlayerDialog(playerid, DIALOGCLAN, DIALOG_STYLE_INPUT, "{33AA33}Account:", stringa, "Confirm", "Exit");
return 0;
}
if(!strcmp(inputtext, PASSWORDCLAN, false))
{
new nome[24];
GetPlayerName(playerid, nome, 24);
format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} has confirmed to be part of the clan.", nome);
SendClientMessageToAll(BLU_CHIARO, stringa);
SendClientMessage(playerid, BLU_CHIARO, "You have confirmed to be part of the clan!");
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
return 1;
}
else
{
new nome[24];
GetPlayerName(playerid, nome, 24);
format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} has been kicked from the Server. [Reason: {FFFFFF}Failed login attempt in the clan{00BFFF}]", nome);
SendClientMessageToAll(BLU_CHIARO, stringa);
SendClientMessage(playerid, ROSA, "*** {FFFFFF}You have been kicked. Reason: {FF66FF}Failed login attempt in the clan{FFFFFF}.");
Kick(playerid);
}
}
else if(!response)
{
new nome[24];
GetPlayerName(playerid, nome, 24);
SendClientMessage(playerid, ROSA, "*** {FFFFFF}You have been kicked. Reason: {FF66FF}Failed login attempt in the clan{FFFFFF}.");
format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} has been kicked from the Server. [Reason: {FFFFFF}Failed login attempt in the clan{00BFFF}]", nome);
SendClientMessageToAll(BLU_CHIARO, stringa);
Kick(playerid);
PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
}
}
}
pawn Код:
if(!strcmp(tmp,tmp2,true)) {
GameTextForPlayer(playerid,"~r~Before you can play, you must login!",4000,3);
ShowPlayerDialog(playerid, DIALOGID0+2, DIALOG_STYLE_INPUT,"~~~~~~Login Password~~~~~~", " ", "OK", "Quit");
format(string,sizeof(string),"Welcome back, %s. Please login or you will be disconnected in 60 seconds!",PlayerName);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SendClientMessage(playerid, COLOR_BRIGHTRED, "-----------------------------------------------------------------------------------------------------------------------");
PlayerInfo[playerid][LoggedIn] = 0;}}