25.08.2010, 08:49
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
Here works only virtual world, but player exit somewhere else.. Can anyone help me?
Код:
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;
}

