[HELP] Interior Problem
#1

Hey All
I Decided to make some interiors for my server. everything was fine but i realised that the enter and exit works only on the top Of OnPlayerCommandText
Here Is An Example

Код:
//-------------------------------enter triad HQ--------------------------------------------------------------------------
if(strcmp(cmdtext, "/enter", true, 6) == 0)
	{
		if(PlayerToPoint(3, playerid, 483.956726,-1114.680542,82.359375)) //enterance
		{
		  SetPlayerInterior(playerid, 1); // This is important! This sets player to interior id 3!
      SetPlayerPos(playerid, -794.8006396,491.686614,1376.194946); // these are coordinates where he'll spawn (PD INT)
		  return 1;
		}
        return 1;
    }
//-------------------------------exit triad HQ--------------------------------------------------------------------------
if(strcmp(cmdtext, "/exit", true, 6) == 0)
	{
		if(PlayerToPoint(3, playerid, -794.8006396,491.686614,1376.194946)) //enterance
		{
		  SetPlayerInterior(playerid, 0); // This is important! This sets player to interior id 3!
      SetPlayerPos(playerid, 483.956726,-1114.680542,82.359375); // these are coordinates where he'll spawn (PD INT)
		  return 1;
		}
        return 1;
    }
//-------------------------------enter exit--------------------------------------------------------------------------
if(strcmp(cmdtext, "/enter", true, 6) == 0)
	{
		if(PlayerToPoint(3, playerid, 953.071350,-910.406311,45.515625)) //enterance
		{
		  SetPlayerInterior(playerid, 2); // This is important! This sets player to interior id 3!
      SetPlayerPos(playerid, 2567.52,-1294.59,1063.25); // these are coordinates where he'll spawn (PD INT)
		  return 1;
		}
        return 1;
    }
//-------------------------------enter exit--------------------------------------------------------------------------
if(strcmp(cmdtext, "/exit", true, 6) == 0)
	{
		if(PlayerToPoint(3, playerid, 2567.52,-1294.59,1063.25)) //enterance
		{
		  SetPlayerInterior(playerid, 0); // This is important! This sets player to interior id 3!
      SetPlayerPos(playerid, 953.071350,-910.406311,45.515625); // these are coordinates where he'll spawn (PD INT)
		  return 1;
		}
        return 1;
    }
//-------------------------------enter exit--------------------------------------------------------------------------
if (strcmp(cmdtext, "/exitmayormansion", true, 5) == 0)
{
      if(PlayerToPoint(3, playerid, 1299.14,-794.77,1084.00)) // Police enterance
	  {
	    SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
	    SetPlayerPos(playerid, -1953.965576,1341.966187,7.687500); // this is where player will stand...
	    return 1;
	  }
      return 1;
}
//-------------------------------enter exit--------------------------------------------------------------------------
if (strcmp(cmdtext, "/exitmayormansion", true, 5) == 0)
{
      if(PlayerToPoint(3, playerid, 1299.14,-794.77,1084.00)) // Police enterance
	  {
	    SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
	    SetPlayerPos(playerid, -1953.965576,1341.966187,7.687500); // this is where player will stand...
	    return 1;
	  }
      return 1;
}
//-------------------------------enter exit--------------------------------------------------------------------------
if(strcmp(cmdtext, "/enter", true, 6) == 0)
	{
		if(PlayerToPoint(3, playerid, 1555.132690,-1675.558838,15.945313)) // Police enterance
		{
		  SetPlayerInterior(playerid, 3); // This is important! This sets player to interior id 3!
		  SetPlayerPos(playerid, 238.6620,141.0520,1003.0234); // these are coordinates where he'll spawn (PD INT)
		  return 1;
		}
   return 1;
}
//-------------------------------enter exit--------------------------------------------------------------------------
if (strcmp(cmdtext, "/exit", true, 5) == 0)
{
      if(PlayerToPoint(3, playerid, 238.6620,141.0520,1003.0234)) // Police enterance
	  {
	    SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
	    SetPlayerPos(playerid, 1555.132690,-1675.558838,15.945313); // this is where player will stand...
	    return 1;
	  }
    return 1;
}
And Only Enter Triad Hq And Exit Triad HQ works the other enter exit things doesnt work. If I pUt one of them on the top the enter triad exit triad wont work but the enter exit which is on the top will work. Please Help I want to fix it
Reply
#2

use 1 command with if() and else statements.
Reply
#3

ok but than are the other House enters and other will work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)