[Ajuda] Player se encontrando em Interiores??
#1

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??
Reply
#2

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

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);
}

Reply
#4

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.
Reply
#5

Код:
SetPlayerVirtualWorld
Reply
#6

https://sampwiki.blast.hk/wiki/SetPlayerVirtualWorld_FR
Reply
#7

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);
            } 
Reply
#8

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)