help!!! can't exit and enter house
#1

After buying a house cannot exit I use admin cmd and i found out that cannot enter also help
sorry bad English I'm from Hong Kong
It's LARP
Reply
#2

please help me
Reply
#3

You use the command /exit and nothing happens?

Can you post your command?
Reply
#4

yes,is this the one you want?

EXIT COMMAND
Код:
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]))
				{
				    if(HouseEntered[playerid] == i)
				    {
						SetPlayerInterior(playerid,0);
						SetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
						PlayerInfo[playerid][pInt] = 0;
						PlayerInfo[playerid][pLocal] = 255;
						SetCameraBehindPlayer(playerid);
						SetPlayerVirtualWorld(playerid,0);
						HouseEntered[playerid] = 255;
						if(HouseInfo[i][hHel] == 1)
						{
							new Float:tempheal;
							GetPlayerHealth(playerid,tempheal);
							if(tempheal < 100.0)
							{
								SetPlayerHealth(playerid,100.0);
							}
						}
						return 1;
					}
				}
			}
ENTER COMMAND
Код:
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)
					{
						SetPlayerInterior(playerid,HouseInfo[i][hInt]);
						SetPlayerVirtualWorld(playerid,HouseInfo[i][hWorld]);
						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;
						HouseEntered[playerid] = i;
					}
					else
					{
						GameTextForPlayer(playerid, "~r~Locked", 5000, 1);
					}
				}
			}
Reply
#5

someone said that the problem come from 0.3b r2
sorry bad english
Reply
#6

HELP ME PLEASE
Reply
#7

triple posting, and bumping?

is the house set? like house entrance and exit?

pawn Код:
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]))
{
if(HouseEntered[playerid] == i)
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 255;
SetCameraBehindPlayer(playerid);
SetPlayerVirtualWorld(playerid,0);
HouseEntered[playerid] = 255;
if(HouseInfo[i][hHel] == 1)
{
new Float:tempheal;
GetPlayerHealth(playerid,tempheal);
if(tempheal < 100.0)
{
SetPlayerHealth(playerid,100.0);
}
}
return 1;
}
}
}
Reply
#8

yes the pwn code you post is same as mine
Reply
#9

Not complicate, Change the command for entrer adn exit and that will be OK
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)