fbienter = CreatePickup(1239,1,914.4413,-1004.5359,37.9813);
fbiexit = CreatePickup(1239,1,288.7802,166.9836,1007.1719,5);
else if(pickupid == fbienter)
{
new mesage1[1148];
new dialog[1148];
format(mesage1,sizeof(mesage1),"{FFFFFF}FBI Enter\n\n{FFFFFF}Click {00C0FF}Enter {FFFFFF}to enter the base or {F3FF02}Quit{FFFFFF}!");
format(dialog,713,"%s",mesage1);
ShowPlayerDialog(playerid,115,DIALOG_STYLE_MSGBOX,"{00C0FF}Enter",dialog,"Enter","Quit");
}
else if(pickupid == fbiexit)
{
new mesage1[1148];
new dialog[1148];
format(mesage1,sizeof(mesage1),"{FFFFFF}FBI Exit\n\n{FFFFFF}Click {00C0FF}Exit {FFFFFF}or {F3FF02}Quit {FFFFFF}!");
format(dialog,713,"%s",mesage1);
ShowPlayerDialog(playerid,116,DIALOG_STYLE_MSGBOX,"{00C0FF}Exit",dialog,"Exit","Quit");
}
else if(pickupid == fbienter)
{
new mesage1[1148];
format(mesage1,sizeof(mesage1),"{FFFFFF}FBI Enter\n\n{FFFFFF}Click {00C0FF}Enter {FFFFFF}to enter the base or {F3FF02}Quit{FFFFFF}!");
ShowPlayerDialog(playerid,115,DIALOG_STYLE_MSGBOX,"{00C0FF}Enter",mesage1,"Enter","Quit");
}
else if(pickupid == fbiexit)
{
new mesage1[1148];
format(mesage1,sizeof(mesage1),"{FFFFFF}FBI Exit\n\n{FFFFFF}Click {00C0FF}Exit {FFFFFF}or {F3FF02}Quit {FFFFFF}!");
ShowPlayerDialog(playerid,116,DIALOG_STYLE_MSGBOX,"{00C0FF}Exit",mesage1,"Exit","Quit");
}
if(dialogid == 115)
{
if(response)
{
if(PlayerInfo[playerid][Member] == 2 || PlayerInfo[playerid][Leader] == 2)
{
SetPlayerInterior(playerid,3);
SetPlayerPos(playerid,288.7802,166.9836,1007.1719);
SetPlayerVirtualWorld(playerid,5);
}
else
{
GameTextForPlayer(playerid,"~r~locked!",5000,1);
}
}
}
if(dialogid == 116)
{
if(response)
{
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerPos(playerid,914.4413,-1004.5359,37.9813);
}
}
ShowPlayerDialog(playerid,115,DIALOG_STYLE_MSGBOX,"{00C0FF}Enter","{FFFFFF}FBI Enter\n\n{FFFFFF}Click {00C0FF}Enter {FFFFFF}to enter the base or {F3FF02}Quit{FFFFFF}!","Enter","Quit");
new mesage1[] = "{FFFFFF}FBI Enter\n\n{FFFFFF}Click {00C0FF}Enter {FFFFFF}to enter the base or {F3FF02}Quit{FFFFFF}!";
ShowPlayerDialog(playerid,115,DIALOG_STYLE_MSGBOX,"{00C0FF}Enter",mesage1,"Enter","Quit");
how can I make when I enter in the base I wait for five seconds and then I get dialog for exit. Thanks
|
if(dialogid == 115)
{
if(response)
{
if(PlayerInfo[playerid][Member] == 2 || PlayerInfo[playerid][Leader] == 2)
{
SetPlayerInterior(playerid,3);
SetPlayerPos(playerid,288.7802,166.9836,1007.1719);
SetPlayerVirtualWorld(playerid,5);
SetTimerEx("DoYouWannaLeave", 5*1000/*5 seconds*/, false", "i", playerid);
}
else
{
GameTextForPlayer(playerid,"~r~locked!",5000,1);
}
}
}
forward DoYouWannaLeave(playerid);
public DoYouWannaLeave(player)
{
ShowPlayerDialog(playerid,116,DIALOG_STYLE_MSGBOX,"{00C0FF}Exit","{FFFFFF}FBI Exit\n\n{FFFFFF}Click {00C0FF}Exit {FFFFFF}or {F3FF02}Quit {FFFFFF}!","Exit","Quit");
return 1;
}