Problem exiting houses
#1

Well... I add houses, but then, when I exit a house with the same interior as the other one, I end at a diffrent house exit, help? Please.
Reply
#2

use virtual worlds.
Reply
#3

Quote:
Originally Posted by Pandabeer1337
use virtual worlds.
i use v-worlds but the same Problem
Reply
#4

Use Virtual Worlds correctly (keyword).
Reply
#5

Hello guys i have the same problem this is how i have done it but if anyone can help me with this to get it working that would be great you can see how im trying to do it i just need help with it

regards kry

Код:
	if(strcmp(cmd, "/enter", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
		{
			for(new i = 0; i < sizeof(HouseInfo); i++)
			{
				if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
				{
					//printf("Found House :%d",i);
					if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0)
					{
						if(HouseInfo[i][hLevel] = 1)
						{
							SetPlayerInterior(playerid,HouseInfo[i][hInt]);
							SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
							GameTextForPlayer(playerid, "~w~Welcome Home", 5000, 1);
							PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
							PlayerInfo[playerid][pLocal] = i;
						}
						else
						{
						  SetPlayerVirtualWorld(playerid, 7);
							SetPlayerInterior(playerid,HouseInfo[i][hInt]);
							SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
							GameTextForPlayer(playerid, "~w~Welcome Home", 5000, 1);
							PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
							PlayerInfo[playerid][pLocal] = i;
						}
					}
					else
					{
						GameTextForPlayer(playerid, "~r~Locked", 5000, 1);
					}
				}
			}
Код:
	if(strcmp(cmd, "/exit", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
		{
			for(new i = 0; i < sizeof(HouseInfo); i++)
			{
				//printf("House :%d",i);
				if (PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
				{
					SetPlayerInterior(playerid,0);
					SetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
					PlayerInfo[playerid][pInt] = 0;
					SetPlayerVirtualWorld(playerid,0);
					PlayerInfo[playerid][pLocal] = 255;
					if(HouseInfo[i][hHel] == 1)
					{
						new Float:tempheal;
						GetPlayerHealth(playerid,tempheal);
						if(tempheal < 100.0)
						{
							SetPlayerHealth(playerid,100.0);
						}
					}
				}
			}
Код:
	if(house !=255)
		{
		  if(SpawnChange[playerid]) //If 1, then you get to your house, else spawn somewhere else
		  {
		  	if(HouseInfo[house][hLevel] <= 2)
		  	{
					SetPlayerToTeamColor(playerid);
					SetPlayerInterior(playerid,HouseInfo[house][hInt]);
					SetPlayerPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]); // Warp the player
					PlayerInfo[playerid][pLocal] = house;
					PlayerInfo[playerid][pInt] = HouseInfo[house][hInt];
					return 1;
				}
				else
				{
					SetPlayerToTeamColor(playerid);
					SetPlayerInterior(playerid,HouseInfo[house][hInt]);
					SetPlayerPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]); // Warp the player
					PlayerInfo[playerid][pLocal] = house;
					PlayerInfo[playerid][pInt] = HouseInfo[house][hInt];
					SetPlayerVirtualWorld(playerid, 7);
					return 1;
				}
			}
		}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)