Bank Pickup Help
#3

Quote:
Originally Posted by itsCody
Посмотреть сообщение
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(131811481.283813, -1770.43115218.795755, -1); // Bank 1
BankEnt[1] = CreatePickup(131812181.1257,2295.1389,10.8203, -1); // Bank 1
BankExt CreatePickup(131812304.675537, -16.03568626.742187, -1); // One pick up.
public OnPlayerPickUpPickup(playerid,pickupid)
{
    if(
pickupid == BankEnt[0])
    {
        
SetPlayerVirtualWorld(playerid1); // Putting them in virtual worlds.. WILL come in handy!
        
SetPlayerPos(playerid2313, -427);
        
SetCameraBehindPlayer(playerid);
        
SendClientMessage(playerid,COLOR_YELLOW,"/Bank to view the Bank Menu");
        return 
1;
    }
    if(
pickupid == BankEnt[1])
    {
        
SetPlayerVirtualWorld(playerid2); // Putting them in virtual worlds.. WILL come in handy!
        
SetPlayerPos(playerid2313, -427);
        
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(playerid0);
            
SetPlayerPos(playerid,1481.130371, -1763.40100018.795755);
            
SetPlayerFacingAngle(playerid0.0);
            
SetCameraBehindPlayer(playerid);
        }
        else if(
GetPlayerVirtualWorld(playerid) == 2)   // Getting their virtual world and spawning them at their respected location
        
{
            
SetPlayerVirtualWorld(playerid0);
            
SetPlayerPos(playerid2177.22952294.159210.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.
Thnx it Works !
(rep++)
Reply


Messages In This Thread
Bank Pickup Help - by Shaheen - 09.03.2016, 03:12
Re: Bank Pickup Help - by itsCody - 09.03.2016, 04:12
Re: Bank Pickup Help - by Shaheen - 09.03.2016, 06:02

Forum Jump:


Users browsing this thread: 1 Guest(s)