SA-MP Forums Archive
InteriorChange.. Need help - 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: InteriorChange.. Need help (/showthread.php?tid=171081)



InteriorChange.. Need help - DyDy - 25.08.2010

Hello, I'm doing house system and I stuck on doing exit from house. I need to do when player enter yellow entrance marker in house that it would be next to the house he was before entering. Here is a code

Код:
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
if(GetPVarInt(playerid, "InHouse") == 1)
	{
	    new House = GetPVarInt(playerid, "CurrentHouse");
	    SetPlayerVirtualWorld(playerid, 0);
	    SetPlayerInterior(playerid, 0);
	    SetPlayerPos(playerid, hInfo[House][OutsideX], hInfo[House][OutsideY], hInfo[House][OutsideZ]);
	    SetPlayerFacingAngle(playerid, hInfo[House][OutsideA]);
	    SetPVarInt(playerid, "InHouse", 0);
	    SetPVarInt(playerid, "CurrentHouse", 0);
	}
return 1;
}
Here works only virtual world, but player exit somewhere else.. Can anyone help me?


Re: InteriorChange.. Need help - Voldemort - 25.08.2010

Its because these yellow markers is SA Game thing, disable them with DisableInteriorEnterExits or make exit point in interiors not so close to doors