SA-MP Forums Archive
Automatically enter interior - 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: Automatically enter interior (/showthread.php?tid=106422)



Automatically enter interior - [GTA] - 03.11.2009

Okay I need some help on how to put a icon at a random place and then when a player goes on that icon he is automatically enterd into the interior without typing /enter etc.

Ive got this for an example:
Код:
			if (PlayerToPoint(3.0, playerid,-1494.3143,920.1636,7.1875))
			{
			       SetPlayerInterior(playerid,3);
			       SetPlayerPos(playerid,387.7978,173.8582,1008.3828);
			       GameTextForPlayer(playerid, "~w~Welcome to City Hall", 5000, 1);
				PlayerInfo[playerid][pInt] = 3;
				PlayerInfo[playerid][pLocal] = 241;
			}
All i need to know is where to put this code.

THanks


Re: Automatically enter interior - Correlli - 03.11.2009

In a timer.


Re: Automatically enter interior - [GTA] - 03.11.2009

Quote:
Originally Posted by Don Correlli
In a timer.
Did not help one bit.


Re: Automatically enter interior - Abernethy - 03.11.2009

OnPlayerPickUpPickup?


Re: Automatically enter interior - [GTA] - 03.11.2009

Quote:
Originally Posted by Abernethy♥
OnPlayerPickUpPickup?
Ill give this a try thanks.

Okay works good but when i enter the interior it enters where the exit point is so it automatically exits me when i walk in. i cant really walk it just goes enter, exit, enter, exit.

Help thanks


Re: Automatically enter interior - Giacomand - 03.11.2009

Move the entrance point away from the exit.


Re: Automatically enter interior - [GTA] - 03.11.2009

Quote:
Originally Posted by Giacomand
Move the entrance point away from the exit.
that wouldnt make a difference, im going into the interior and either way its going to land on the exit of the interior


Re: Automatically enter interior - [GTA] - 15.11.2009

I've nearly worked out how to do it but if i have 2 cluckin bells and enter one then exit it spawns me at the exit of the second one. Then if go into the second one and exit it spawns me at the first one. Whats the problem here?

Thanks


Re: Automatically enter interior - dice7 - 15.11.2009

You have the wrong coords in a SetPlayerPos in OnPlayerPickUpPickup


Re: Automatically enter interior - [GTA] - 15.11.2009

Quote:
Originally Posted by dice7
You have the wrong coords in a SetPlayerPos in OnPlayerPickUpPickup
it happens with burgershot, cluckin bell and pizza because the same interior is used.