[Ajuda] Interior bugado!
#1

Tipo assim, eu criei duas orgs com o mesmo interior, mais eu quero fazer assim, quando ele entrar num interior ele sai em um local, e no outro interior, em outro local. Й que assim, sгo duas orgs "ROTAM-SF" e "ROTAM-LS". Daн quando for em ROTAM-SF ele sair em SF e quando for ROTAM-LS ele sai em LS.

A ROTAM SF

Quote:

if (PlayerToPoint(2, playerid,-1755.0914,962.3484,24.882)
{
//ROTAM-SF entrada

XXAirBreak[playerid] += 3;
XXAirBreak[playerid] += 3;SetPlayerPos(playerid,288.745971,169.350997,1007 .171875);
GameTextForPlayer(playerid, "~y~HQ ROTAM-SF", 5000, 1);
PlayerInfo[playerid][pInt] = 3;
SetPlayerInterior(playerid,3);
storeexit[playerid] = 15;
}
if (PlayerToPoint(2, playerid,238.8815,139.5029,1003.0234))
{
//ROTAM-SF saida

XXAirBreak[playerid] += 3;
XXAirBreak[playerid] += 3;SetPlayerPos(playerid,-1755.0914,962.3484,24.882;
GameTextForPlayer(playerid, "~y~SAN FIERRO", 5000, 1);
PlayerInfo[playerid][pInt] = 0;
SetPlayerInterior(playerid,0);
storeexit[playerid] = 15;
}

A ROTAM LS

Quote:

else if (PlayerToPoint(3, playerid,328.0614,-1512.2689,36.0325))
{//Rotam LS entrada

XXAirBreak[playerid] += 3;
XXAirBreak[playerid] += 3;SetPlayerPos(playerid, 238.7194,141.7792,1003.0234);
GameTextForPlayer(playerid, "~w~DP Rotam-LS",5000,1);
SetPlayerInterior(playerid,3);
SetPlayerFacingAngle(playerid, 0);
//localizardppc[playerid] = 1;
PlayerInfo[playerid][pInt] = 3;
SetPlayerVirtualWorld(playerid, 1);
storeexit[playerid] = 2;
}
else if (PlayerToPoint(3, playerid,238.5649,139.3974,1003.0234))
{//ROTAM LS SAIDA
XXAirBreak[playerid] += 3;
XXAirBreak[playerid] += 3;SetPlayerPos(playerid,329.1469,-1512.7855,36.0391);
GameTextForPlayer(playerid, "~r~Los Santos",5000,1);
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid,0);
storeexit[playerid] = 0;
}

Reply
#2

Por favor, alguйm que me ajudar com isto. +Rep
Reply
#3

Use Virtual World.
https://sampwiki.blast.hk/wiki/SetPlayerVirtualWorld
Reply
#4

Muito obrigada mano, nгo sabia que era no Virtual Word. +Rep
Reply
#5

Problema continua, fiz tudo certinho com os:

Код:
SetPlayerVirtualWorld
Reply
#6

Poderia postar o cуdigo para eu ver como vocк fez.

Vo fazer aqui e logo edito.

@Edit

Testa ai, nem compilei, pode ter algum erro.

Код:
if (PlayerToPoint(2, playerid,-1755.0914,962.3484,24.882)//ROTAM-SF entrada
{
	SetPlayerVirtualWorld(playerid, 1); //Se ele entrou na de SF, o Virtual World vai ser 1
	XXAirBreak[playerid] += 3;
	XXAirBreak[playerid] += 3;
	SetPlayerPos(playerid,288.745971,169.350997,1007.171875);
	GameTextForPlayer(playerid, "~y~HQ ROTAM-SF", 5000, 1);
	PlayerInfo[playerid][pInt] = 3;
	SetPlayerInterior(playerid,3);
	storeexit[playerid] = 15;
}

if (PlayerToPoint(3, playerid,328.0614,-1512.2689,36.0325))//Rotam LS entrada
{
    SetPlayerVirtualWorld(playerid, 2); //Se ele entrou na de LS, o Virtual World vai ser 2
	XXAirBreak[playerid] += 3;
	XXAirBreak[playerid] += 3;
	SetPlayerPos(playerid, 238.7194,141.7792,1003.0234);
	GameTextForPlayer(playerid, "~w~DP Rotam-LS",5000,1);
	SetPlayerInterior(playerid,3);
	SetPlayerFacingAngle(playerid, 0);
	//localizardppc[playerid] = 1;
	PlayerInfo[playerid][pInt] = 3;
	storeexit[playerid] = 2;
}

if (PlayerToPoint(3, playerid,238.5649,139.3974,1003.0234))//Saida SF/LS
{
	XXAirBreak[playerid] += 3;
	XXAirBreak[playerid] += 3;
	
	if(GetPlayerVirtualWorld(playerid) == 1) //Caso o Virtual World for 1(SF)
	{
		SetPlayerPos(playerid,-1755.0914,962.3484,24.882);//Teleporta para a saida de SF
		GameTextForPlayer(playerid, "~y~SAN FIERRO", 5000, 1);
	}
	else //Se nгo for 1, й 2, entгo teleporta para LS
	{
	    SetPlayerPos(playerid,,329.1469,-1512.7855,36.0391);
	    GameTextForPlayer(playerid, "~r~Los Santos",5000,1);
	}
	SetPlayerVirtualWorld(playerid, 0); //Bota o Virtual World normal denovo
	SetPlayerInterior(playerid,0);
	SetPlayerFacingAngle(playerid,0);
	PlayerInfo[playerid][pInt] = 0;
	storeexit[playerid] = 0;
}
Reply
#7

Vou postar os interiores de entrada e saнda.

ORG 1:

ENTRADA:

Код:
            else if (PlayerToPoint(3, playerid,328.0614,-1512.2689,36.0325))
            {
                XXAirBreak[playerid] += 3;
                XXAirBreak[playerid] += 3;SetPlayerPos(playerid, 238.6608,139.4667,1003.0234);
                GameTextForPlayer(playerid, "~w~DP Rotam-LS",5000,1);
                SetPlayerInterior(playerid,3);
                SetPlayerFacingAngle(playerid, 0);
                PlayerInfo[playerid][pInt] = 3;
                SetPlayerVirtualWorld(playerid, 0);
                storeexit[playerid] = 1;
           }
SAНDA:

Код:
           else if(PlayerToPoint(2.0, playerid,238.5649,139.3974,1003.0234))
           {
                XXAirBreak[playerid] += 3;
		        XXAirBreak[playerid] += 3;SetPlayerPos(playerid,329.1469,-1512.7855,36.0391);
		        GameTextForPlayer(playerid, "~r~Los Santos",5000,1);
		        SetPlayerInterior(playerid,0);
		        SetPlayerFacingAngle(playerid,0);
		        PlayerInfo[playerid][pInt] = 0;
		        SetPlayerVirtualWorld(playerid,0);
		        storeexit[playerid] = 0;
	       }
ORG 2:

ENTRADA:

Код:
           else if (PlayerToPoint(3, playerid,-2454.0352,503.9203,30.0793))
			{

				XXAirBreak[playerid] += 3;
                XXAirBreak[playerid] += 3;SetPlayerPos(playerid, 238.7194,141.7792,1003.0234);
                GameTextForPlayer(playerid, "~w~DP Policia Federal",5000,1);
                SetPlayerInterior(playerid,3);
                SetPlayerFacingAngle(playerid, 0);
                //localizardppc[playerid] = 1;
                PlayerInfo[playerid][pInt] = 3;
                SetPlayerVirtualWorld(playerid, 1);
                storeexit[playerid] = 2;
            }
SAНDA:

Код:
            else if (PlayerToPoint(3, playerid,-2454.0352,503.9203,30.0793))
			{

				XXAirBreak[playerid] += 3;
                XXAirBreak[playerid] += 3;SetPlayerPos(playerid, 322.0765,303.8634,999.1484);
                GameTextForPlayer(playerid, "~w~San Fierro",5000,1);
                SetPlayerInterior(playerid,5);
                //localizardppf[playerid] = 1;
                SetPlayerFacingAngle(playerid, 0);
                PlayerInfo[playerid][pInt] = 5;
                SetPlayerVirtualWorld(playerid, 0);
            }
ORG 3:

ENTRADA:

Код:
            if (PlayerToPoint(2, playerid,-1755.0914,962.3484,24.8828))
			{
				XXAirBreak[playerid] += 3;
				XXAirBreak[playerid] += 3;SetPlayerPos(playerid,238.4989,139.8923,1003.0234);
				GameTextForPlayer(playerid, "~y~DP ROTAM-SF", 5000, 1);
				PlayerInfo[playerid][pInt] = 3;
				SetPlayerInterior(playerid,3);
				SetPlayerVirtualWorld(playerid,2);
				storeexit[playerid] = 3;
			}
SAНDA:

Quote:

if (PlayerToPoint(2, playerid,238.8815,139.5029,1003.0234))
{
XXAirBreak[playerid] += 3;
XXAirBreak[playerid] += 3;SetPlayerPos(playerid,-1755.0914,962.3484,24.882;
GameTextForPlayer(playerid, "~y~SAN FIERRO", 5000, 1);
PlayerInfo[playerid][pInt] = 0;
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
storeexit[playerid] = 0;
}

Reply
#8

Testa ai:

Obs: As 3 entradas estгo separadas, mas as saнdas, botei todas juntas.
Код:
if(PlayerToPoint(2, playerid,-1755.0914,962.3484,24.882)//ROTAM-SF entrada
{
	SetPlayerVirtualWorld(playerid, 1); //Se ele entrou na de SF, o Virtual World vai ser 1
	XXAirBreak[playerid] += 3;
	XXAirBreak[playerid] += 3;
	SetPlayerPos(playerid,288.745971,169.350997,1007.171875);
	GameTextForPlayer(playerid, "~y~HQ ROTAM-SF", 5000, 1);
	PlayerInfo[playerid][pInt] = 3;
	SetPlayerInterior(playerid,3);
	storeexit[playerid] = 15;
}

if(PlayerToPoint(3, playerid,328.0614,-1512.2689,36.0325))//Rotam LS entrada
{
    SetPlayerVirtualWorld(playerid, 2); //Se ele entrou na de LS, o Virtual World vai ser 2
	XXAirBreak[playerid] += 3;
	XXAirBreak[playerid] += 3;
	SetPlayerPos(playerid, 238.7194,141.7792,1003.0234);
	GameTextForPlayer(playerid, "~w~DP Rotam-LS",5000,1);
	SetPlayerInterior(playerid,3);
	SetPlayerFacingAngle(playerid, 0);
	//localizardppc[playerid] = 1;
	PlayerInfo[playerid][pInt] = 3;
	storeexit[playerid] = 2;
}

if(PlayerToPoint(3, playerid,-2454.0352,503.9203,30.0793))
{
    SetPlayerVirtualWorld(playerid, 3); //Se ele entrou na PF, o Virtual World 3
	XXAirBreak[playerid] += 3;
	XXAirBreak[playerid] += 3;SetPlayerPos(playerid, 238.7194,141.7792,1003.0234);
	GameTextForPlayer(playerid, "~w~DP Policia Federal",5000,1);
	SetPlayerInterior(playerid,3);
	SetPlayerFacingAngle(playerid, 0);
	//localizardppc[playerid] = 1;
	PlayerInfo[playerid][pInt] = 3;
	SetPlayerVirtualWorld(playerid, 1);
	storeexit[playerid] = 2;
}

if(PlayerToPoint(3, playerid,238.5649,139.3974,1003.0234))//Saida SF/LS
{
	XXAirBreak[playerid] += 3;
	XXAirBreak[playerid] += 3;
	
	if(GetPlayerVirtualWorld(playerid) == 1) //Caso o Virtual World for 1(SF)
	{
		SetPlayerPos(playerid,-1755.0914,962.3484,24.882);//Teleporta para a saida de SF
		GameTextForPlayer(playerid, "~y~SAN FIERRO", 5000, 1);
	}
	if(GetPlayerVirtualWorld(playerid) == 2) //Caso o Virtual World for 2(LS)
	{
	    SetPlayerPos(playerid,,329.1469,-1512.7855,36.0391);
	    GameTextForPlayer(playerid, "~r~Los Santos",5000,1);
	}
	if(GetPlayerVirtualWorld(playerid) == 3) //Caso o Virtual World for 3(Saida da PF)
	{
	    SetPlayerPos(playerid, 322.0765,303.8634,999.1484);
     	GameTextForPlayer(playerid, "~w~San Fierro",5000,1);
	}
	SetPlayerVirtualWorld(playerid, 0); //Bota o Virtual World normal denovo
	SetPlayerInterior(playerid,0);
	SetPlayerFacingAngle(playerid,0);
	PlayerInfo[playerid][pInt] = 0;
	storeexit[playerid] = 0;
}
Reply
#9

Copilando aqui, +Rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)