[HELP] Scripting probleme with interiors
#1

Hellow, I scripted some interiors and everything works, but now when I try to enter a Biz or House the /enter command doesn't work for them. here is what I scripted.


pawn Код:
//-------------------------------[Factions HQ /enter /exit]----------------------------------------------------
  if(strcmp(cmdtext, "/enter", true, 6) == 0)
    {
    if(PlayerToPoint(1, playerid, 1462.7317,-1013.0073,26.8438)) // LS Bank Enter
        {
      GameTextForPlayer(playerid, "~w~Welcome to the LS Bank", 5000, 1);
            SetPlayerInterior(playerid, 1); // This is important! This sets player to interior id 1!
          SetPlayerPos(playerid, 2315.952880,-1.618174,26.742187); // these are coordinates where he'll spawn (Bank)
          return 1;
        }
        if(PlayerToPoint(14, playerid, 1309.959,-1367.895,13.5417)) // Damned City RP Stadium Enter
        {
      GameTextForPlayer(playerid, "~w~Welcome to the Damned City RP Stadium", 5000, 1);
            SetPlayerInterior(playerid, 14); // This is important! This sets player to interior id 1!
          SetPlayerPos(playerid, -1486.861816,1642.145996,1060.671875); // these are coordinates where he'll spawn (OLD PaintBal)
          return 1;
        }
        if(PlayerToPoint(3, playerid, 914.5668,-1003.775,37.99654)) // Goverment Meetings Place Enter
        {
      GameTextForPlayer(playerid, "~w~Welcome to the Goverments Meetings Place", 5000, 1);
            SetPlayerInterior(playerid, 3); // This is important! This sets player to interior id 1!
          SetPlayerPos(playerid, 940.921997,-17.006999,1001.179992); // these are coordinates where he'll spawn (Near Yakuza)
          return 1;
        }
        if(PlayerToPoint(7, playerid, 1833.406,-1125.584,24.67208)) // Shootas Enter
        {
      GameTextForPlayer(playerid, "~w~Welcome to Shootas", 5000, 1);
            SetPlayerInterior(playerid, 7); // This is important! This sets player to interior id 1!
          SetPlayerPos(playerid, 773.579956,-77.096694,1000.687988); // these are coordinates where he'll spawn (LS Parking Near Bank)
          return 1;
        }
        if(PlayerToPoint(17, playerid, 1752.978,-1903.254,13.56323)) // Taxi HQ Enter
        {
      GameTextForPlayer(playerid, "~w~Welcome to the Taxi Company HQ", 5000, 1);
            SetPlayerInterior(playerid, 17); // This is important! This sets player to interior id 1!
          SetPlayerPos(playerid, 377.098999,-192.439987,1000.643981); // these are coordinates where he'll spawn (LS Train Station)
          return 1;
        }
        if(PlayerToPoint(10, playerid, 1568.792,-1689.992,6.21875)) // Police Armoury Enter
        {
      GameTextForPlayer(playerid, "~w~Welcome to the Police Armoury", 5000, 1);
            SetPlayerInterior(playerid, 10); // This is important! This sets player to interior id 1!
          SetPlayerPos(playerid, 246.375991,109.245994,1003.279968); // these are coordinates where he'll spawn (LSPD Garage)
          return 1;
        }
        if(PlayerToPoint(3.0, playerid, -314.6053,1774.1354,43.6406)) // Hitmen HQ Enter
        {
      GameTextForPlayer(playerid, "~w~Welcome to the Hitman HQ", 5000, 1);
            SetPlayerInterior(playerid, 7); // This is important! This sets player to interior id 1!
          SetPlayerPos(playerid, 225.630997,1022.479980,1084.069946); // these are coordinates where he'll spawn (CityHall)
          return 1;
        }
        if(PlayerToPoint(3.0, playerid, 1480.9673,-1772.0413,18.7958)) // Goverment Enter
        {
      GameTextForPlayer(playerid, "~w~Welcome to the Government Building", 5000, 1);
            SetPlayerInterior(playerid, 3); // This is important! This sets player to interior id 1!
          SetPlayerPos(playerid, 387.7978,173.8582,1008.3828); // these are coordinates where he'll spawn (CityHall)
          return 1;
        }
        if(PlayerToPoint(1, playerid, 691.2493,-1275.848,13.5605)) // Yakuza HQ Enter
        {
      GameTextForPlayer(playerid, "~w~Welcome to the Yakuza HQ", 5000, 1);
            SetPlayerInterior(playerid, 1); // This is important! This sets player to interior id 1!
          SetPlayerPos(playerid, -794.8006396,491.686614,1376.194946); // these are coordinates where he'll spawn (Marco's Bistro)
          return 1;
        }
        if(PlayerToPoint(2, playerid, 2522.911,-1679.307,15.497)) // HQ Enter
        {
      GameTextForPlayer(playerid, "~w~Welcome to the Green Street Elite HQ", 5000, 1);
            SetPlayerInterior(playerid, 2); // This is important! This sets player to interior id 1!
          SetPlayerPos(playerid, 2451.77,-1699.80,1013.51); // these are coordinates where he'll spawn (Sweets House)
          return 1;
        }
        if(PlayerToPoint(3, playerid, 1654.5575,-1656.2457,22.5156)) // HQ Enter
        {
      GameTextForPlayer(playerid, "~w~Welcome to the FBI HQ", 5000, 1);
            SetPlayerInterior(playerid, 3); // This is important! This sets player to interior id 1!
          SetPlayerPos(playerid, 238.6620,141.0520,1003.0234); // these are coordinates where he'll spawn (LVPD)
          return 1;
        }
      if(PlayerToPoint(12, playerid, 1123.722,-2037.338,69.8861)) // Mayors House HQ Enter
        {
      GameTextForPlayer(playerid, "~w~Welcome to the Mayors House", 5000, 1);
            SetPlayerInterior(playerid, 12); // This is important! This sets player to interior id 1!
          SetPlayerPos(playerid, 2324.33, -1144.79, 1050.71); // these are coordinates where he'll spawn (Unused House)
          return 1;
        }
        return 1;
  }
  if (strcmp(cmdtext, "/exit", true, 5) == 0)
  {
        if(PlayerToPoint(1, playerid, 2315.952880,-1.618174,26.742187)) // LS Bank Exit
      {
        SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
        SetPlayerPos(playerid, 1462.7317,-1013.0073,26.8438); // this is where player will stand...
        return 1;
      }
        if(PlayerToPoint(14, playerid, -1486.861816,1642.145996,1060.671875)) // Damned City RP Stadium Exit
      {
        SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
        SetPlayerPos(playerid, 1309.959,-1367.895,13.5417); // this is where player will stand...
        return 1;
      }
        if(PlayerToPoint(3, playerid, 940.921997,-17.006999,1001.179992)) // Goverments Meetings Place Exit
      {
        SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
        SetPlayerPos(playerid, 914.5668,-1003.775,37.99654); // this is where player will stand...
        return 1;
      }
        if(PlayerToPoint(7, playerid, 773.579956,-77.096694,1000.687988)) // Shootas Exit
      {
        SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
        SetPlayerPos(playerid, 1833.406,-1125.584,24.67208); // this is where player will stand...
        return 1;
      }
        if(PlayerToPoint(17, playerid, 377.098999,-192.439987,1000.643981)) // Taxi HQ Exit
      {
        SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
        SetPlayerPos(playerid, 1752.978,-1903.254,13.56323); // this is where player will stand...
        return 1;
      }
        if(PlayerToPoint(10, playerid, 246.375991,109.245994,1003.279968)) // Police Armoury Exit
      {
        SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
        SetPlayerPos(playerid, 1568.792,-1689.992,6.21875); // this is where player will stand...
        return 1;
      }
        if(PlayerToPoint(7, playerid, 225.630997,1022.479980,1084.069946)) // Hitmen HQ Exit
      {
        SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
        SetPlayerPos(playerid, -314.6053,1774.1354,43.6406); // this is where player will stand...
        return 1;
      }
        if(PlayerToPoint(3, playerid, 387.7978,173.8582,1008.3828)) // Goverment Exit
      {
        SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
        SetPlayerPos(playerid, 1480.9673,-1772.0413,18.7958); // this is where player will stand...
        return 1;
      }
        if(PlayerToPoint(1, playerid, -794.8006396,491.686614,1376.194946)) // Yakuza HQ Exit
      {
        SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
        SetPlayerPos(playerid, 691.2493,-1275.848,13.5605); // this is where player will stand...
        return 1;
      }
    if(PlayerToPoint(2, playerid, 2451.77,-1699.80,1013.51)) // HQ Exit
      {
        SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
        SetPlayerPos(playerid, 2522.911,-1679.307,15.497); // this is where player will stand...
        return 1;
      }
    if(PlayerToPoint(3, playerid, 238.6620,141.0520,1003.0234)) // HQ Exit
      {
        SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
        SetPlayerPos(playerid, 1654.5575,-1656.2457,22.5156); // this is where player will stand...
        return 1;
      }
    if(PlayerToPoint(12, playerid, 2324.33, -1144.79, 1050.71)) // HQ Exit
      {
        SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
        SetPlayerPos(playerid, 1123.722,-2037.338,69.8861); // this is where player will stand...
        return 1;
      }
    return 1;
  }
I putted that under OnPlayerCommandText


What can I do about it cause now my players can't go in to the bank or other bizz.

Greats Delow
Reply
#2

as someone will say too - use [pawn] tags...
Reply
#3

Fixed it.
Reply
#4

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if(strcmp(cmdtext, "/enter", true, 6) == 0)
    {
    if(PlayerToPoint(1, playerid, 1462.7317,-1013.0073,26.8438)) // LS Bank Enter
      {
        GameTextForPlayer(playerid, "~w~Welcome to the LS Bank", 5000, 1);
        SetPlayerInterior(playerid, 1); // This is important! This sets player to interior id 1!
        SetPlayerPos(playerid, 2315.952880,-1.618174,26.742187); // these are coordinates where he'll spawn (Bank)
        return 1;
      }
    if(PlayerToPoint(14, playerid, 1309.959,-1367.895,13.5417)) // Damned City RP Stadium Enter
      {
        GameTextForPlayer(playerid, "~w~Welcome to the Damned City RP Stadium", 5000, 1);
        SetPlayerInterior(playerid, 14); // This is important! This sets player to interior id 1!
        SetPlayerPos(playerid, -1486.861816,1642.145996,1060.671875); // these are coordinates where he'll spawn (OLD PaintBal)
        return 1;
      }
    if(PlayerToPoint(3, playerid, 914.5668,-1003.775,37.99654)) // Goverment Meetings Place Enter
      {
        GameTextForPlayer(playerid, "~w~Welcome to the Goverments Meetings Place", 5000, 1);
        SetPlayerInterior(playerid, 3); // This is important! This sets player to interior id 1!
        SetPlayerPos(playerid, 940.921997,-17.006999,1001.179992); // these are coordinates where he'll spawn (Near Yakuza)
        return 1;
      }
    if(PlayerToPoint(7, playerid, 1833.406,-1125.584,24.67208)) // Shootas Enter
      {
        GameTextForPlayer(playerid, "~w~Welcome to Shootas", 5000, 1);
        SetPlayerInterior(playerid, 7); // This is important! This sets player to interior id 1!
        SetPlayerPos(playerid, 773.579956,-77.096694,1000.687988); // these are coordinates where he'll spawn (LS Parking Near Bank)
        return 1;
      }
    if(PlayerToPoint(17, playerid, 1752.978,-1903.254,13.56323)) // Taxi HQ Enter
      {
        GameTextForPlayer(playerid, "~w~Welcome to the Taxi Company HQ", 5000, 1);
        SetPlayerInterior(playerid, 17); // This is important! This sets player to interior id 1!
        SetPlayerPos(playerid, 377.098999,-192.439987,1000.643981); // these are coordinates where he'll spawn (LS Train Station)
        return 1;
      }
    if(PlayerToPoint(10, playerid, 1568.792,-1689.992,6.21875)) // Police Armoury Enter
      {
        GameTextForPlayer(playerid, "~w~Welcome to the Police Armoury", 5000, 1);
        SetPlayerInterior(playerid, 10); // This is important! This sets player to interior id 1!
        SetPlayerPos(playerid, 246.375991,109.245994,1003.279968); // these are coordinates where he'll spawn (LSPD Garage)
        return 1;
      }
    if(PlayerToPoint(3.0, playerid, -314.6053,1774.1354,43.6406)) // Hitmen HQ Enter
      {
        GameTextForPlayer(playerid, "~w~Welcome to the Hitman HQ", 5000, 1);
        SetPlayerInterior(playerid, 7); // This is important! This sets player to interior id 1!
        SetPlayerPos(playerid, 225.630997,1022.479980,1084.069946); // these are coordinates where he'll spawn (CityHall)
        return 1;
      }
    if(PlayerToPoint(3.0, playerid, 1480.9673,-1772.0413,18.7958)) // Goverment Enter
      {
        GameTextForPlayer(playerid, "~w~Welcome to the Government Building", 5000, 1);
        SetPlayerInterior(playerid, 3); // This is important! This sets player to interior id 1!
        SetPlayerPos(playerid, 387.7978,173.8582,1008.3828); // these are coordinates where he'll spawn (CityHall)
        return 1;
      }
    if(PlayerToPoint(1, playerid, 691.2493,-1275.848,13.5605)) // Yakuza HQ Enter
      {
        GameTextForPlayer(playerid, "~w~Welcome to the Yakuza HQ", 5000, 1);
        SetPlayerInterior(playerid, 1); // This is important! This sets player to interior id 1!
        SetPlayerPos(playerid, -794.8006396,491.686614,1376.194946); // these are coordinates where he'll spawn (Marco's Bistro)
        return 1;
      }
    if(PlayerToPoint(2, playerid, 2522.911,-1679.307,15.497)) // HQ Enter
      {
        GameTextForPlayer(playerid, "~w~Welcome to the Green Street Elite HQ", 5000, 1);
        SetPlayerInterior(playerid, 2); // This is important! This sets player to interior id 1!
        SetPlayerPos(playerid, 2451.77,-1699.80,1013.51); // these are coordinates where he'll spawn (Sweets House)
        return 1;
      }
    if(PlayerToPoint(3, playerid, 1654.5575,-1656.2457,22.5156)) // HQ Enter
      {
        GameTextForPlayer(playerid, "~w~Welcome to the FBI HQ", 5000, 1);
        SetPlayerInterior(playerid, 3); // This is important! This sets player to interior id 1!
        SetPlayerPos(playerid, 238.6620,141.0520,1003.0234); // these are coordinates where he'll spawn (LVPD)
        return 1;
      }
    if(PlayerToPoint(12, playerid, 1123.722,-2037.338,69.8861)) // Mayors House HQ Enter
      {
        GameTextForPlayer(playerid, "~w~Welcome to the Mayors House", 5000, 1);
        SetPlayerInterior(playerid, 12); // This is important! This sets player to interior id 1!
        SetPlayerPos(playerid, 2324.33, -1144.79, 1050.71); // these are coordinates where he'll spawn (Unused House)
        return 1;
      }
    }

  if (strcmp(cmdtext, "/exit", true, 5) == 0)
    {
    if(PlayerToPoint(1, playerid, 2315.952880,-1.618174,26.742187)) // LS Bank Exit
      {
        SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
        SetPlayerPos(playerid, 1462.7317,-1013.0073,26.8438); // this is where player will stand...
        return 1;
      }
    if(PlayerToPoint(14, playerid, -1486.861816,1642.145996,1060.671875)) // Damned City RP Stadium Exit
      {
        SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
        SetPlayerPos(playerid, 1309.959,-1367.895,13.5417); // this is where player will stand...
        return 1;
      }
    if(PlayerToPoint(3, playerid, 940.921997,-17.006999,1001.179992)) // Goverments Meetings Place Exit
      {
        SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
        SetPlayerPos(playerid, 914.5668,-1003.775,37.99654); // this is where player will stand...
        return 1;
      }
    if(PlayerToPoint(7, playerid, 773.579956,-77.096694,1000.687988)) // Shootas Exit
      {
        SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
        SetPlayerPos(playerid, 1833.406,-1125.584,24.67208); // this is where player will stand...
        return 1;
      }
    if(PlayerToPoint(17, playerid, 377.098999,-192.439987,1000.643981)) // Taxi HQ Exit
      {
        SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
        SetPlayerPos(playerid, 1752.978,-1903.254,13.56323); // this is where player will stand...
        return 1;
      }
    if(PlayerToPoint(10, playerid, 246.375991,109.245994,1003.279968)) // Police Armoury Exit
      {
        SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
        SetPlayerPos(playerid, 1568.792,-1689.992,6.21875); // this is where player will stand...
        return 1;
      }
    if(PlayerToPoint(7, playerid, 225.630997,1022.479980,1084.069946)) // Hitmen HQ Exit
      {
        SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
        SetPlayerPos(playerid, -314.6053,1774.1354,43.6406); // this is where player will stand...
        return 1;
      }
    if(PlayerToPoint(3, playerid, 387.7978,173.8582,1008.3828)) // Goverment Exit
      {
        SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
        SetPlayerPos(playerid, 1480.9673,-1772.0413,18.7958); // this is where player will stand...
        return 1;
      }
    if(PlayerToPoint(1, playerid, -794.8006396,491.686614,1376.194946)) // Yakuza HQ Exit
      {
        SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
        SetPlayerPos(playerid, 691.2493,-1275.848,13.5605); // this is where player will stand...
        return 1;
      }
    if(PlayerToPoint(2, playerid, 2451.77,-1699.80,1013.51)) // HQ Exit
      {
        SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
        SetPlayerPos(playerid, 2522.911,-1679.307,15.497); // this is where player will stand...
        return 1;
      }
    if(PlayerToPoint(3, playerid, 238.6620,141.0520,1003.0234)) // HQ Exit
      {
        SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
        SetPlayerPos(playerid, 1654.5575,-1656.2457,22.5156); // this is where player will stand...
        return 1;
      }
    if(PlayerToPoint(12, playerid, 2324.33, -1144.79, 1050.71)) // HQ Exit
      {
        SetPlayerInterior(playerid, 0); // this is important..interior 0 is outside...
        SetPlayerPos(playerid, 1123.722,-2037.338,69.8861); // this is where player will stand...
        return 1;
      }
    }
  return 0;
}
I was doing this when you posted. Then you added pawn tags so I do not know if you where commenting on pawn tags.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)