SA-MP Forums Archive
Seperate locations using the same 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: Seperate locations using the same interior. (/showthread.php?tid=106941)



Seperate locations using the same interior. - [GTA] - 07.11.2009

Ive added my own interiors and pickups to automatically enter when your on the pickup but if i use burgershot in two differnt spots, it goes in fine but on exit it takes me to the other location i have to other burgershot. if i go back in and out then it takes me to where i was.

Help would be appreciated.


Re: Seperate locations using the same interior. - bigcomfycouch - 07.11.2009

Have the different locations set you to a different virtual world. Then, when exiting, check using GetPlayerVirtualWorld(playerid) to check their world, and teleport them to the location accordingly.


Re: Seperate locations using the same interior. - [GTA] - 07.11.2009

Quote:
Originally Posted by big comfy couch
Have the different locations set you to a different virtual world. Then, when exiting, check using GetPlayerVirtualWorld(playerid) to check their world, and teleport them to the location accordingly.
Okay so have it look like:
Код:
	if(pickupid == pizzaicon)
	{
		GetPlayerInterior(playerid);
		GetPlayerVirtualWorld(playerid);
		SetPlayerInterior(playerid, 5);
		SetPlayerPos(playerid, 373.825653,-117.270904,1001.499511);
	}
	if(pickupid == pizzaiconexit)
 	{
 		SetPlayerVirtualWorld(playerid, 0);
   	SetPlayerInterior(playerid,0);
   	SetPlayerPos(playerid, -1808.1265,945.3210,24.8906);
 	}



Re: Seperate locations using the same interior. - Infamous - 07.11.2009

When they pickup the pickups you want to SetPlayerVirtualWorld. Use differant worlds for each pickup.

Then when they leave check the virtual world they are leaving from and set their position to the relevant area.