new pInfo[MAX_PLAYERS][PLAYER_MAIN];
new GetinBank;
new GetinBan;
new GetoutBan;
new GetoutBank;
GetinBank = CreatePickup(1318, 1, 1481.283813, -1770.431152, 18.795755, 0);
GetoutBank = CreatePickup(1318, 1, 2304.675537, -16.035686, 26.742187, 0);
GetinBan = CreatePickup(1318, 1, 2181.1257,2295.1389,10.8203, 0);
GetoutBan = CreatePickup(1318, 1,2304.675537, -16.035686, 26.742187, 0);
public OnPlayerPickUpPickup(playerid,pickupid)
{
if(pickupid == GetinBank)
{
GetoutBank = CreatePickup(1318, 1, 2304.675537, -16.035686, 26.742187, 0);
DestroyPickup(GetoutBan);
SetPlayerPos(playerid,2313,-4, 27);
SendClientMessage(playerid,COLOR_YELLOW,"/Bank to view the Bank Menu");
SetCameraBehindPlayer(playerid);
return 1;
}
if(pickupid == GetinBan)
{
GetoutBan = CreatePickup(1318, 1, 2304.675537, -16.035686, 26.742187, 0);
DestroyPickup(GetoutBank);
SetPlayerPos(playerid,2313,-4, 27);
SendClientMessage(playerid,COLOR_YELLOW,"/Bank to view the Bank Menu");
SetCameraBehindPlayer(playerid);
return 1;
}
if(pickupid == GetoutBan)
{
SetPlayerPos(playerid,2177.2295,2294.1592,10.8125);
SetPlayerFacingAngle(playerid,0.0);
SetCameraBehindPlayer(playerid);
return 1;
}
if(pickupid == GetoutBank)
{
SetPlayerPos(playerid,1481.130371,-1763.401000, 18.795755);
SetPlayerFacingAngle(playerid,0.0);
SetCameraBehindPlayer(playerid);
return 1;
}
return 1;
}
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;
}
|
1) You don't really need all of those vars, and you only need one exit var.
PHP код:
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. |