Entrances and Exits.
#1

Look guys, i have problem. I'm use one way that i found in this forum to create entrances. Everything ok. But with exits is 1 problem. My code:
Код:
	if (strcmp(cmdtext,"/enter", true) == 0)
	{
		if(PlayerToPoint(1,playerid,1367.3289,248.4043,19.5669)) // Montgomery The Well Stacked Pizza Co.
		{
			SetPlayerInterior(playerid,5);
			SetPlayerPos(playerid,372.3423,-132.4538,1001.4922);
			return 1;
		}
    if(PlayerToPoint(1,playerid,2303.4319,-16.1811,26.4844)) // Palomino Creek Bank.
		{
			SetPlayerInterior(playerid,0);
			SetPlayerPos(playerid,2306.4138,-16.1093,26.7496);
			return 1;
		}
		if(PlayerToPoint(1,playerid,2257.5413,-70.9972,31.6016)) // Small Room.
		{
			SetPlayerInterior(playerid,1);
			SetPlayerPos(playerid,2131.507812,1600.818481,1008.359375);
			return 1;
		}
		if(PlayerToPoint(1,playerid,1374.7698,469.0051,20.1883)) // Gasstation.
		{
			SetPlayerInterior(playerid,17);
			SetPlayerPos(playerid,381.169189,-188.803024,1000.632812);
			return 1;
		}
		//=== Exits ===
		if(strcmp(cmdtext,"/exit", true) == 0)
		{
		if(PlayerToPoint(1,playerid,372.3423,-132.4538,1001.4922)) // Montgomery The Well Stacked Pizza Co.
		{
			SetPlayerInterior(playerid,0);
			SetPlayerPos(playerid,1367.3610,248.4501,19.5669);
			return 1;
		}
    if(PlayerToPoint(1,playerid,2306.4138,-16.1093,26.7496)) // Palomino Creek Bank.
		{
			SetPlayerInterior(playerid,0);
			SetPlayerPos(playerid,2303.4319,-16.1811,26.4844);
			return 1;
		}
		if(PlayerToPoint(1,playerid,2257.5413,-70.9972,31.6016)) // Small room.
		{
			SetPlayerInterior(playerid,0);
			SetPlayerPos(playerid,2131.507812,1600.818481,1008.359375);
			return 1;
		}
		if(PlayerToPoint(1,playerid,381.169189,-188.803024,1000.632812)) // Gasstation.
		{
			SetPlayerInterior(playerid,0);
			SetPlayerPos(playerid,1374.7698,469.0051,20.1883);
			return 1;
		}
	}
	}
When i type /exit, server say that command like that are not.
Reply
#2

Theres a missing closing bracket before "//=== Exits ==="
Reply
#3

Код:
if(strcmp(cmdtext,"/enter", true) == 0)
{
	if(PlayerToPoint(1,playerid,1367.3289,248.4043,19.5669)) // Montgomery The Well Stacked Pizza Co.
	{
		SetPlayerInterior(playerid,5);
		SetPlayerPos(playerid,372.3423,-132.4538,1001.4922);
		return 1;
	}
 	else if(PlayerToPoint(1,playerid,2303.4319,-16.1811,26.4844)) // Palomino Creek Bank.
	{
		SetPlayerInterior(playerid,0);
		SetPlayerPos(playerid,2306.4138,-16.1093,26.7496);
		return 1;
	}
	else if(PlayerToPoint(1,playerid,2257.5413,-70.9972,31.6016)) // Small Room.
	{
		SetPlayerInterior(playerid,1);
		SetPlayerPos(playerid,2131.507812,1600.818481,1008.359375);
		return 1;
	}
	else if(PlayerToPoint(1,playerid,1374.7698,469.0051,20.1883)) // Gasstation.
	{
		SetPlayerInterior(playerid,17);
		SetPlayerPos(playerid,381.169189,-188.803024,1000.632812);
		return 1;
	}
	return 1;
}
	//=== Exits ===
if(strcmp(cmdtext,"/exit", true) == 0)
{
	if(PlayerToPoint(1,playerid,372.3423,-132.4538,1001.4922)) // Montgomery The Well Stacked Pizza Co.
	{
		SetPlayerInterior(playerid,0);
		SetPlayerPos(playerid,1367.3610,248.4501,19.5669);
		return 1;
	}
 	else if(PlayerToPoint(1,playerid,2306.4138,-16.1093,26.7496)) // Palomino Creek Bank.
	{
		SetPlayerInterior(playerid,0);
		SetPlayerPos(playerid,2303.4319,-16.1811,26.4844);
		return 1;
	}
	else if(PlayerToPoint(1,playerid,2257.5413,-70.9972,31.6016)) // Small room.
	{
		SetPlayerInterior(playerid,0);
		SetPlayerPos(playerid,2131.507812,1600.818481,1008.359375);
		return 1;
	}
	else if(PlayerToPoint(1,playerid,381.169189,-188.803024,1000.632812)) // Gasstation.
	{
		SetPlayerInterior(playerid,0);
		SetPlayerPos(playerid,1374.7698,469.0051,20.1883);
		return 1;
	}
	return 1;
}
Reply
#4

Quote:
Originally Posted by Blantas ;P*~
Код:
if(strcmp(cmdtext,"/enter", true) == 0)
{
	if(PlayerToPoint(1,playerid,1367.3289,248.4043,19.5669)) // Montgomery The Well Stacked Pizza Co.
	{
		SetPlayerInterior(playerid,5);
		SetPlayerPos(playerid,372.3423,-132.4538,1001.4922);
		return 1;
	}
 	else if(PlayerToPoint(1,playerid,2303.4319,-16.1811,26.4844)) // Palomino Creek Bank.
	{
		SetPlayerInterior(playerid,0);
		SetPlayerPos(playerid,2306.4138,-16.1093,26.7496);
		return 1;
	}
	else if(PlayerToPoint(1,playerid,2257.5413,-70.9972,31.6016)) // Small Room.
	{
		SetPlayerInterior(playerid,1);
		SetPlayerPos(playerid,2131.507812,1600.818481,1008.359375);
		return 1;
	}
	else if(PlayerToPoint(1,playerid,1374.7698,469.0051,20.1883)) // Gasstation.
	{
		SetPlayerInterior(playerid,17);
		SetPlayerPos(playerid,381.169189,-188.803024,1000.632812);
		return 1;
	}
}
	//=== Exits ===
if(strcmp(cmdtext,"/exit", true) == 0)
{
	if(PlayerToPoint(1,playerid,372.3423,-132.4538,1001.4922)) // Montgomery The Well Stacked Pizza Co.
	{
		SetPlayerInterior(playerid,0);
		SetPlayerPos(playerid,1367.3610,248.4501,19.5669);
		return 1;
	}
 	else if(PlayerToPoint(1,playerid,2306.4138,-16.1093,26.7496)) // Palomino Creek Bank.
	{
		SetPlayerInterior(playerid,0);
		SetPlayerPos(playerid,2303.4319,-16.1811,26.4844);
		return 1;
	}
	else if(PlayerToPoint(1,playerid,2257.5413,-70.9972,31.6016)) // Small room.
	{
		SetPlayerInterior(playerid,0);
		SetPlayerPos(playerid,2131.507812,1600.818481,1008.359375);
		return 1;
	}
	else if(PlayerToPoint(1,playerid,381.169189,-188.803024,1000.632812)) // Gasstation.
	{
		SetPlayerInterior(playerid,0);
		SetPlayerPos(playerid,1374.7698,469.0051,20.1883);
		return 1;
	}
}
Thanks. Now going to test it.
P.S. It works. Again thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)