SA-MP Forums Archive
/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)
+--- Thread: /enter /exit (/showthread.php?tid=414913)



/enter /exit - DeeCaay - 10.02.2013

So yeah, i scripted kind of ''apartments''.
I'm using the same Burnt Denise House interior and I have two different /enter points set and they work fine, but when you /exit it always sends you to the first enter point\
how can i use the same interior with two different enter and exit positions.



Re: /enter /exit - zDevon - 10.02.2013

Using SetPlayerVirtualWorld on /enter and GetPlayerVirtualWorld on /exit. Set the player to a different virtual world for each apartment enter point, and check that virtual world on /exit and send them to the respective coordinates.


Re: /enter /exit - Jay_ - 10.02.2013

I don't think virtual worlds are in anyway relevant to this problem or will make a difference.

Show us some of your code and we'll be happy to point out any obvious mistakes.


Re: /enter /exit - zDevon - 10.02.2013

Quote:
Originally Posted by Jay_
Посмотреть сообщение
I don't think virtual worlds are in anyway relevant to this problem or will make a difference.

Show us some of your code and we'll be happy to point out any obvious mistakes.
He is using the same interior for different apartment buildings, and this is causing problems since he is only checking the player's position on /exit. If he made use of virtual worlds he could determine which apartment building the player was in.

If the player enters apartment 1, set their virtual world to 1. If player enters apartment 2, set their virtual world to 2. On /exit, check the virtual world and if it is 1, send the player to apartment 1's door; if it is 2, send the player to apartment's 2 door. And so on.


Re: /enter /exit - DeeCaay - 10.02.2013

FIXED, Can be deleted.