SA-MP Forums Archive
A little problem (not) - 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: A little problem (not) (/showthread.php?tid=112909)



A little problem (not) - Razvann - 11.12.2009

Well, I made 46 houses but when I enter in house 4 and when I type /exit it 'teleports' me to another enter house with the same interior.

#sorry for my bad English, I'm from Romania.


Re: A little problem (not) - Wulffe - 11.12.2009

Quote:
Originally Posted by Razvann
Well, I made 46 houses but when I enter in house 4 and when I type /exit it 'teleports' me to another enter house with the same interior.

#sorry for my bad English, I'm from Romania.
You need to tell us some more.

What GM do you use, or do you have a dynamic house system, mabye post some lines.


Re: A little problem (not) - Razvann - 11.12.2009

I'm using Godfather and Godfather House System, I don't have any errors..


Re: A little problem (not) - Jason_Gregory - 11.12.2009

Please post your /exit and your /enter Command
I think you replaced a var from the Function


Re: A little problem (not) - Razvann - 11.12.2009

Ok, here is it:
For /enter:
Код:
	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]);
						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);
					}
				}
			}
	and more lines..
and for /exit:
Код:
	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;
					PlayerInfo[playerid][pLocal] = 255;
					if(HouseInfo[i][hHel] == 1)
					{
						new Float:tempheal;
						GetPlayerHealth(playerid,tempheal);
						if(tempheal < 100.0)
						{
							SetPlayerHealth(playerid,100.0);
						}
					}
				}
			}
and more lines..



Re: A little problem (not) - Razvann - 12.12.2009

Quote:
Originally Posted by Razvann
Well, I made 46 houses but when I enter in house 4 and when I type /exit it 'teleports' me to another enter house with the same interior.

#sorry for my bad English, I'm from Romania.
Does anyone know?

@sorry 4 double..


Re: A little problem (not) - Razvann - 17.12.2009

bump