1) You don't really need all of those vars, and you only need one exit var.
PHP код:
new pInfo[MAX_PLAYERS][PLAYER_MAIN];
new BankEnt[2], BankExt;
BankEnt[0] = CreatePickup(1318, 1, 1481.283813, -1770.431152, 18.795755, -1); // Bank 1
BankEnt[1] = CreatePickup(1318, 1, 2181.1257,2295.1389,10.8203, -1); // Bank 1
BankExt = CreatePickup(1318, 1, 2304.675537, -16.035686, 26.742187, -1); // One pick up.
public OnPlayerPickUpPickup(playerid,pickupid)
{
if(pickupid == BankEnt[0])
{
SetPlayerVirtualWorld(playerid, 1); // Putting them in virtual worlds.. WILL come in handy!
SetPlayerPos(playerid, 2313, -4, 27);
SetCameraBehindPlayer(playerid);
SendClientMessage(playerid,COLOR_YELLOW,"/Bank to view the Bank Menu");
return 1;
}
if(pickupid == BankEnt[1])
{
SetPlayerVirtualWorld(playerid, 2); // Putting them in virtual worlds.. WILL come in handy!
SetPlayerPos(playerid, 2313, -4, 27);
SetCameraBehindPlayer(playerid);
SendClientMessage(playerid,COLOR_YELLOW,"/Bank to view the Bank Menu");
return 1;
}
if(pickupid == BankExt)
{
if(GetPlayerVirtualWorld(playerid) == 1) // Getting their virtual world and spawning them at their respected location
{
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid,1481.130371, -1763.401000, 18.795755);
SetPlayerFacingAngle(playerid, 0.0);
SetCameraBehindPlayer(playerid);
}
else if(GetPlayerVirtualWorld(playerid) == 2) // Getting their virtual world and spawning them at their respected location
{
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 2177.2295, 2294.1592, 10.8125);
SetPlayerFacingAngle(playerid,0.0);
SetCameraBehindPlayer(playerid);
}
// else if(...)
}
return 1;
}
And you just have to place them into virtual worlds for future banks, and edit the exit one.
If the coords don't match up correctly then switch them around because I got confused lol.
As for the dialogs, you're sending a message.
You'll have to post the command for this dialog.