SA-MP Forums Archive
[Ajuda] Player se encontrando em Interiores?? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Player se encontrando em Interiores?? (/showthread.php?tid=642081)



Player se encontrando em Interiores?? - Poseidon4625 - 24.09.2017

Bom, vou dar um exemplo, eu to criando varias agencias no meu gm, o problema й que criei uma em sf e outra em ls e quando entro na agencia de sf eu consigo ir pra ls, como faзo pra quando o player entrar em sf ele с encontrar os player da agencia de ls??


Re: Player se encontrando em Interiores?? - DelK - 24.09.2017

Bom, vocк deve estar usando o mesmo interior das duas agкncias, se nгo for isso poste o cуdigo.


Re: Player se encontrando em Interiores?? - Poseidon4625 - 24.09.2017

aqui estб, eu estou fazendo entrada pra interiores com Pickup

Quote:

new entraragencials;
new sairagencials;
new entraragenciasf;
new sairagenciasf;

public OnGameMode

entraragencials = CreatePickup(1314, 1,1684.4460,-1343.2657,17.4371, -1);
sairagencials = CreatePickup(1239, 1,1494.4381,1303.5789,1093.2891, -1);
entraragenciasf = CreatePickup(1314, 1,-2586.4631,147.2466,4.3359, -1);
sairagenciasf = CreatePickup(1239, 1,1236.5945,231.5697,7.4321, -1);

OnPlayerPickupPickup

if(pickupid == entraragencials)
{
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 1494.325195,1304.942871,1093.289062);
}
if(pickupid == sairagencials)
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1688.5641,-1344.6888,17.4297);
}
if(pickupid == entraragenciasf)
{
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 1494.325195,1304.942871,1093.289062);
}
if(pickupid == sairagenciasf)
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1-2586.6809,151.3103,4.3355);
}




Re: Player se encontrando em Interiores?? - Poseidon4625 - 24.09.2017

Eu sу queria saber como faзo pros players que estiverem no mesmo interior sу que em um outro local nгo se encontrasse com os outros players que estivessem por exemplo lб em sf, eu sabia fazer sу que fiquei um tempo fora do samp e esqueci.


Re: Player se encontrando em Interiores?? - AuhMaru - 24.09.2017

Код:
SetPlayerVirtualWorld



Re: Player se encontrando em Interiores?? - Don_Speed - 24.09.2017

https://sampwiki.blast.hk/wiki/SetPlayerVirtualWorld_FR


Re: Player se encontrando em Interiores?? - powerths - 24.09.2017

EXEMPLO:

PHP код:
//TOPO
enum PlayerInfo
{
  
EntrouAgencia
};
public 
OnPlayerConnect(playerid)
{
   
pInfo[playerid][EntrouAgencia] = 0;
   return 
1;
}
//ENTRAR AGENCIA
        
if(IsPlayerInRangeOfPoint(playerid2.01310.4525,-1367.4639,13.4724)) // Agкncia LS
        
{
            
SetPlayerPos(playerid246.375991,109.245994,1003.218750);
            
SetPlayerFacingAngle(playerid359.6873);
            
SetPlayerInterior(playerid10);
            
pInfo[playerid][EntrouAgencia] = 1;//<<<
                    
SetPlayerVirtualWorld(playerid5);
            
SetCameraBehindPlayer(playerid);
            return 
1;
        }
        if(
IsPlayerInRangeOfPoint(playerid2.01310.4525,-1367.4639,13.4724)) // Agкncia SF
        
{
            
SetPlayerPos(playerid246.375991,109.245994,1003.218750);
            
SetPlayerFacingAngle(playerid359.6873);
            
SetPlayerInterior(playerid10);
            
pInfo[playerid][EntrouAgencia] = 2;//<<<
                    
SetPlayerVirtualWorld(playerid10);
            
SetCameraBehindPlayer(playerid);
            return 
1;
        }
        if(
IsPlayerInRangeOfPoint(playerid2.01310.4525,-1367.4639,13.4724)) // Agкncia LV
        
{
            
SetPlayerPos(playerid246.375991,109.245994,1003.218750);
            
SetPlayerFacingAngle(playerid359.6873);
            
SetPlayerInterior(playerid10);
            
pInfo[playerid][EntrouAgencia] = 3;//<<<
                    
SetPlayerVirtualWorld(playerid15);
            
SetCameraBehindPlayer(playerid);
            return 
1;
        }
//SAIR AGENCIA
              
if(IsPlayerInRangeOfPoint(playerid2.0246.4077107.60761003.2188)) // Agкncia
        
{
            if(
pInfo[playerid][EntrouAgencia] == 1)
            {
                
SetPlayerPos(playerid1310.3708,-1370.8752,13.5204); // LS
                
SetPlayerFacingAngle(playerid181.6691);
                
SetPlayerInterior(playerid0);
                
pInfo[playerid][EntrouAgencia] = 0;
                            
SetPlayerVirtualWorld(playerid0); 
                
GameTextForPlayer(playerid"~w~Los Santos"30001);
            }
            else if(
pInfo[playerid][EntrouAgencia] == 2)
            {
                
SetPlayerPos(playerid, -2650.2886376.03646.1563); // SF
                
SetPlayerPos(playerid, -2227.2854251.970035.3203);
                
SetPlayerFacingAngle(playerid317.8766);
                
SetPlayerInterior(playerid0);
                
pInfo[playerid][EntrouAgencia] = 0;
                            
SetPlayerVirtualWorld(playerid0); 
                
GameTextForPlayer(playerid"~w~San Fierro"30001);
            }
            else if(
pInfo[playerid][EntrouAgencia] == 3)
            {
                
SetPlayerPos(playerid1952.82141342.840315.3672); // LV
                
SetPlayerFacingAngle(playerid269.9011);
                
SetPlayerInterior(playerid0);
                
pInfo[playerid][EntrouAgencia] = 0;
                            
SetPlayerVirtualWorld(playerid0); 
                
GameTextForPlayer(playerid"~w~Las Venturas"30001);
            } 



Re: Player se encontrando em Interiores?? - C4rtm4n - 24.09.2017

Poseidon eu te expliquei pelk WhatsApp usa

Код:
SetPlayerVirtualWorld(playerid, 1); // na agencia de ls
dps na saida
SetPlayerVirtualWorld(playerid, 0);

na entrada de Sf

SetPlayerVirtualWorld(playerid, 2);

na saida de SF

SetPlayerVirtualWorld(playerid, 0);
simples.