SA-MP Forums Archive
Exit and Interior Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Exit and Interior Problem (/showthread.php?tid=402501)



Exit and Interior Problem - Astrais - 26.12.2012

I am using AGnational Bank FS. He already added a bank and the exit location of it, I added 2 more banks called Bank2 and Bank3. When I exit either of them it brings me back to the location of the first one. And the interior of the bank is always a 24/7.
Here is the exit script part.

dcmd_exit(playerid,params[]) {
#pragma unused params
if(pBankInfo[playerid][PLAYER_INBANK] == 1) {
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,1274,23,1467.2456,-1011.0726); //location of first bank(my own first bank loc)
pBankInfo[playerid][PLAYER_INBANK] = 0;
}


Re: Exit and Interior Problem - Patrick - 26.12.2012

try to make it in different virtual worlds while you are making a another entrance and exit


Re: Exit and Interior Problem - Astrais - 26.12.2012

Quote:
Originally Posted by pds2012
Посмотреть сообщение
try to make it in different virtual worlds while you are making a another entrance and exit
I forgot to mention that I am completely new to scripting in Pawno. Could you please explain that, I dont understand.


Re: Exit and Interior Problem - Astrais - 27.12.2012

Anything?


Re : Exit and Interior Problem - [HRD]Mar1 - 27.12.2012

When player enter the bank1
pawn Код:
SetPlayerVirtualWorld(playerid,1);
When player enter the bank2
pawn Код:
SetPlayerVirtualWorld(playerid,2);
When player enter the bank3
pawn Код:
SetPlayerVirtualWorld(playerid,3);
And for every pickup set the apropriate virtual world don't use -1 for pickups


Re: Exit and Interior Problem - Astrais - 27.12.2012

Still have no idea. Sorry guys


Re: Exit and Interior Problem - Scott Zulkifli - 28.12.2012

NO.....
maybe that script /enter to bank
because it could be the same bank vitural.

Ex:
i use zcmd
pawn Код:
CMD:enter(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 2.0, /*X,Y,Z*/))// on exterior {
        SetPlayerPos(playerid, /*X,Y,Z*/);// to interior
        SetPlayerVirtualWorld(playerid, 1337);//dont same the vitural world

    }
    else if(IsPlayerInRangeOfPoint(playerid, 2.0, /*X,Y,Z*/))//on exterior {
        SetPlayerPos(playerid, /*X,Y,Z*/);// to interior
        SetPlayerVirtualWorld(playerid, 1338);

    }
     return 1;
}

CMD:exit(playerid,params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 2.0, /*X,Y,Z*/)) //on interior {
        SetPlayerPos(playerid, /*X,Y,Z*/);// to exterior
        SetPlayerVirtualWorld(playerid,0);

    }
    else if(IsPlayerInRangeOfPoint(playerid, 2.0, /*X,Y,Z*/))//on interior {
        SetPlayerPos(playerid, /*X,Y,Z*/); //to exterior
        SetPlayerVirtualWorld(playerid,0);

    }
     return 1;
}
i dont know too


Re: Exit and Interior Problem - Astrais - 28.12.2012

Here is the full script not mine, i did not make changes to it
http://www.mediafire.com/?3cjwg3nzjid