SA-MP Forums Archive
Interior Enter/Exit - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Interior Enter/Exit (/showthread.php?tid=137006)



Interior Enter/Exit - Brian_Furios - 27.03.2010

Hi everyone.

How to make an interior with 2 positions.

exemple:

the first entrace:

pawn Code:
if(PlayerToPointStripped(1, playerid,1554.9537,-1675.6584,16.1953, cx,cy,cz))
        {//LSPD Entrance
        GameTextForPlayer(playerid, "~w~Police Department", 5000, 1);
        SetPlayerInterior(playerid, 6);
        SetPlayerPos(playerid,246.7079,66.2239,1003.6406);
        PlayerInfo[playerid][pInt] = 6;
        }
second entrace:
pawn Code:
if(PlayerToPointStripped(1, playerid,488.2531,-82.7632,998.7578, cx,cy,cz))
    {//LSPD Entrance
        GameTextForPlayer(playerid, "~w~Police Department", 5000, 1);
        SetPlayerInterior(playerid, 6);
        SetPlayerPos(playerid,246.7079,66.2239,1003.6406);
        PlayerInfo[playerid][pInt] = 6;
    }
when i exit... (first postion)

pawn Code:
if(PlayerToPointStripped(1, playerid,246.7079,66.2239,1003.6406, cx,cy,cz)) //
    {//LSPD Entrance
        GameTextForPlayer(playerid, "~w~Los Santos", 5000, 1);
        SetPlayerInterior(playerid, 6);
        SetPlayerPos(playerid,488.2531,-82.7632,998.7578);
        PlayerInfo[playerid][pInt] = 6;
    }
The interiors are identical, and teleports to me in the same place. how do I?



Re: Interior Enter/Exit - Brian_Furios - 27.03.2010

anyone please?


Re: Interior Enter/Exit - MadeMan - 27.03.2010

pawn Code:
new Location[MAX_PLAYERS];
pawn Code:
Location[playerid] = 1;
pawn Code:
Location[playerid] = 2;
pawn Code:
if(Location[playerid] == 1)
{

}
else if(Location[playerid] == 2)
{

}



Re: Interior Enter/Exit - Brian_Furios - 27.03.2010

Quote:
Originally Posted by MadeMan
pawn Code:
new Location[MAX_PLAYERS];
pawn Code:
Location[playerid] = 1;
pawn Code:
Location[playerid] = 2;
pawn Code:
if(Location[playerid] == 1)
{

}
else if(Location[playerid] == 2)
{

}
Thanks i try it