Exit interior script question
#1

I have managed to create an icon that teleports you into an interior. However, there is no way to exit. How, and or what can I add so when I type /exit, I go to a certain spot? Can Anyone help?
Reply
#2

Exit is basically the same as enter, it's just an invert operation. Instead of sending them into that interior pos, you send them to the pos that they were last at before entering the interior.
Reply
#3

see I used a pickup to teleport me into the interior.

and I cant figure out how to make it so I can exit
Reply
#4

Quote:
Originally Posted by MrXavier
see I used a pickup to teleport me into the interior.

and I cant figure out how to make it so I can exit
pawn Код:
if(PlayerToPoint(1, playerid, //exit pos))
            {
              SetPlayerInterior(playerid, 0);
  SetPlayerVirtualWorld(playerid, 0);
              SetPlayerPos(playerid, //old pos/enter pos);
            }
Reply
#5

how do I have the exit for this code, because thats what tp's me into the interior

Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
  if(pickupid == ARMORY) 
	SetPlayerPos(playerid,2324.419921,-1145.568359,1050.710083);
	SetPlayerInterior(playerid,12);
Reply
#6

Quote:
Originally Posted by MrXavier
how do I have the exit for this code, because thats what tp's me into the interior

Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
  if(pickupid == ARMORY) 
	SetPlayerPos(playerid,2324.419921,-1145.568359,1050.710083);
	SetPlayerInterior(playerid,12);
Make another pickup that teleports you outside.
Reply
#7

how could I put an "i" marker in an interior? and have it stay? try to show me via my code post.
Reply
#8

Now, I have added an opposite pickup, yet It now just teleports me into midair. Please help me. Here is the code.

Код:
new ENTER;
new EXIT;
Код:
ENTER = CreatePickup(1239,2,1675.5028,-1637.3276,14.2266);
EXIT = CreatePickup(1239,2,2316.19,-1144.39,1054.30,-1);
Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
  if(pickupid == ENTER)
	SetPlayerPos(playerid,2324.419921,-1145.568359,1050.710083);
	SetPlayerInterior(playerid,12);
	
	if(pickupid == EXIT)
	SetPlayerPos(playerid,1675.5028,-1637.3276,14.2266);
	SetPlayerInterior(playerid,0);
}
Reply
#9

Use wiki to search icon IDs.

www.wiki.sa-mp.com
Reply
#10

IGNORE THIS THREAD!

I got this to work after some messing around!

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)