SA-MP Forums Archive
[Ajuda] 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] Interiores (/showthread.php?tid=268706)



[Ajuda] Interiores - Pedro_Giacomelli - 13.07.2011

Pessoal, eu queria colocar vбrios interiores iguais para entradas e saidas diferentes, quando eu digito o comando de entrar ele entra certinho e com vw diferente. Quando eu digito o comando de sair, ele sai sempre no mesmo local.... o que tenho que fazer para mover a pessoa para o mesmo interior, sem elas se verem e movendo para saidas em locais diferentes?


Re: [Ajuda] Interiores - ASDF - 13.07.2011

Posta o comando de entrar e sair dos interiores...


Re: [Ajuda] Interiores - Gabriel Duarte - 13.07.2011

Tem que mudar o VW de saida tbb, eu acho.


Re: [Ajuda] Interiores - Pedro_Giacomelli - 13.07.2011

pawn Код:
if(strcmp(cmd, "/dpsair", true) == 0)
    {
        if(IsAPDMember(playerid) || IsAFreecop(playerid))
        {

// Police Station Ganton

           if(IsPlayerInRangeOfPoint(playerid,3.0,322.197998,302.497985,999.148437))
           {
            SetPlayerInterior(playerid,0);
            SetPlayerVirtualWorld(playerid, 0);
            SetPlayerPos(playerid,2495.83032227,-1759.26220703,13.19610023);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }
// Police Station El Corona

           if(IsPlayerInRangeOfPoint(playerid,3.0,322.197998,302.497985,999.148437))
           {
            SetPlayerInterior(playerid,0);
            SetPlayerVirtualWorld(playerid, 0);
            SetPlayerPos(playerid,1935.74462891,-2086.46948242,13.22142220);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }

// Police Station East Los Santos

           if(IsPlayerInRangeOfPoint(playerid,3.0,322.197998,302.497985,999.148437))
           {
            SetPlayerInterior(playerid,0);
            SetPlayerVirtualWorld(playerid, 0);
            SetPlayerPos(playerid,2522.33886719,-1343.66760254,30.47849655);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }

// Police Station Rodeo

           if(IsPlayerInRangeOfPoint(playerid,3.0,322.197998,302.497985,999.148437))
           {
            SetPlayerInterior(playerid,0);
            SetPlayerVirtualWorld(playerid, 0);
            SetPlayerPos(playerid,617.58319092,-1330.05078125,13.29710579);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }

// Police Station Verona Beach

           if(IsPlayerInRangeOfPoint(playerid,3.0,322.197998,302.497985,999.148437))
           {
            SetPlayerInterior(playerid,0);
            SetPlayerVirtualWorld(playerid, 0);
            SetPlayerPos(playerid,1026.92041016,-1582.93005371,13.19610023);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }


        }
    }

    if(strcmp(cmd, "/dpentrar", true) == 0)
    {
        if(IsAPDMember(playerid) || IsAFreecop(playerid))
        {



// Police Station Ganton

           if(IsPlayerInRangeOfPoint(playerid,3.0,2495.83032227,-1759.26220703,13.19610023))
           {
            SetPlayerInterior(playerid,5);
            SetPlayerVirtualWorld(playerid, 2);
            SetPlayerPos(playerid,322.197998,302.497985,999.148437);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }
// Police Station El Corona

           if(IsPlayerInRangeOfPoint(playerid,3.0,1935.74462891,-2086.46948242,13.22142220))
           {
            SetPlayerInterior(playerid,5);
            SetPlayerVirtualWorld(playerid, 3);
            SetPlayerPos(playerid,322.197998,302.497985,999.148437);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }
           
// Police Station East Los Santos

           if(IsPlayerInRangeOfPoint(playerid,3.0,2522.33886719,-1343.66760254,30.47849655))
           {
            SetPlayerInterior(playerid,5);
            SetPlayerVirtualWorld(playerid, 4);
            SetPlayerPos(playerid,322.197998,302.497985,999.148437);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }

// Police Station Rodeo

           if(IsPlayerInRangeOfPoint(playerid,3.0,617.58319092,-1330.05078125,13.29710579))
           {
            SetPlayerInterior(playerid,5);
            SetPlayerVirtualWorld(playerid, 5);
            SetPlayerPos(playerid,322.197998,302.497985,999.148437);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }
           
// Police Station Verona Beach

           if(IsPlayerInRangeOfPoint(playerid,3.0,1026.92041016,-1582.93005371,13.19610023))
           {
            SetPlayerInterior(playerid,5);
            SetPlayerVirtualWorld(playerid, 6);
            SetPlayerPos(playerid,322.197998,302.497985,999.148437);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }



        }
    }



Re: [Ajuda] Interiores - Gabriel Duarte - 13.07.2011

Tente ai :
pawn Код:
if(strcmp(cmd, "/dpsair", true) == 0)
    {
        if(IsAPDMember(playerid) || IsAFreecop(playerid))
        {

// Police Station Ganton

           if(IsPlayerInRangeOfPoint(playerid,3.0,322.197998,302.497985,999.148437))
           {
            SetPlayerInterior(playerid,0);
            SetPlayerVirtualWorld(playerid, 2);
            SetPlayerPos(playerid,2495.83032227,-1759.26220703,13.19610023);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }
// Police Station El Corona

           if(IsPlayerInRangeOfPoint(playerid,3.0,322.197998,302.497985,999.148437))
           {
            SetPlayerInterior(playerid,0);
            SetPlayerVirtualWorld(playerid, 3);
            SetPlayerPos(playerid,1935.74462891,-2086.46948242,13.22142220);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }

// Police Station East Los Santos

           if(IsPlayerInRangeOfPoint(playerid,3.0,322.197998,302.497985,999.148437))
           {
            SetPlayerInterior(playerid,0);
            SetPlayerVirtualWorld(playerid, 4);
            SetPlayerPos(playerid,2522.33886719,-1343.66760254,30.47849655);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }

// Police Station Rodeo

           if(IsPlayerInRangeOfPoint(playerid,3.0,322.197998,302.497985,999.148437))
           {
            SetPlayerInterior(playerid,0);
            SetPlayerVirtualWorld(playerid, 5);
            SetPlayerPos(playerid,617.58319092,-1330.05078125,13.29710579);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }

// Police Station Verona Beach

           if(IsPlayerInRangeOfPoint(playerid,3.0,322.197998,302.497985,999.148437))
           {
            SetPlayerInterior(playerid,0);
            SetPlayerVirtualWorld(playerid, 6);
            SetPlayerPos(playerid,1026.92041016,-1582.93005371,13.19610023);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }


        }
    }
 if(strcmp(cmd, "/dpentrar", true) == 0)
    {
        if(IsAPDMember(playerid) || IsAFreecop(playerid))
        {



// Police Station Ganton

           if(IsPlayerInRangeOfPoint(playerid,3.0,2495.83032227,-1759.26220703,13.19610023))
           {
            SetPlayerInterior(playerid,5);
            SetPlayerVirtualWorld(playerid, 2);
            SetPlayerPos(playerid,322.197998,302.497985,999.148437);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }
// Police Station El Corona

           if(IsPlayerInRangeOfPoint(playerid,3.0,1935.74462891,-2086.46948242,13.22142220))
           {
            SetPlayerInterior(playerid,5);
            SetPlayerVirtualWorld(playerid, 3);
            SetPlayerPos(playerid,322.197998,302.497985,999.148437);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }
           
// Police Station East Los Santos

           if(IsPlayerInRangeOfPoint(playerid,3.0,2522.33886719,-1343.66760254,30.47849655))
           {
            SetPlayerInterior(playerid,5);
            SetPlayerVirtualWorld(playerid, 4);
            SetPlayerPos(playerid,322.197998,302.497985,999.148437);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }

// Police Station Rodeo

           if(IsPlayerInRangeOfPoint(playerid,3.0,617.58319092,-1330.05078125,13.29710579))
           {
            SetPlayerInterior(playerid,5);
            SetPlayerVirtualWorld(playerid, 5);
            SetPlayerPos(playerid,322.197998,302.497985,999.148437);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }
           
// Police Station Verona Beach

           if(IsPlayerInRangeOfPoint(playerid,3.0,1026.92041016,-1582.93005371,13.19610023))
           {
            SetPlayerInterior(playerid,5);
            SetPlayerVirtualWorld(playerid, 6);
            SetPlayerPos(playerid,322.197998,302.497985,999.148437);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }



        }
    }
ai fala o que deu


Re: [Ajuda] Interiores - Macintosh - 13.07.2011

pawn Код:
SetPlayerVirtualWorld(playerid, World); // Mude o World pra o nъmero que deseja setar o Virtual World dele.
https://sampwiki.blast.hk/wiki/SetPlayerVirtualWorld


Re: [Ajuda] Interiores - Pedro_Giacomelli - 13.07.2011

Quote:
Originally Posted by Shickcard
Посмотреть сообщение
pawn Код:
SetPlayerVirtualWorld(playerid, World); // Mude o World pra o nъmero que deseja setar o Virtual World dele.
https://sampwiki.blast.hk/wiki/SetPlayerVirtualWorld
Jб estou usando isso :S o problema й ao digitar /sair

Quote:
Originally Posted by Gabriel Duarte
Посмотреть сообщение
Tente ai :
pawn Код:
if(strcmp(cmd, "/dpsair", true) == 0)
    {
        if(IsAPDMember(playerid) || IsAFreecop(playerid))
        {

// Police Station Ganton

           if(IsPlayerInRangeOfPoint(playerid,3.0,322.197998,302.497985,999.148437))
           {
            SetPlayerInterior(playerid,0);
            SetPlayerVirtualWorld(playerid, 2);
            SetPlayerPos(playerid,2495.83032227,-1759.26220703,13.19610023);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }
// Police Station El Corona

           if(IsPlayerInRangeOfPoint(playerid,3.0,322.197998,302.497985,999.148437))
           {
            SetPlayerInterior(playerid,0);
            SetPlayerVirtualWorld(playerid, 3);
            SetPlayerPos(playerid,1935.74462891,-2086.46948242,13.22142220);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }

// Police Station East Los Santos

           if(IsPlayerInRangeOfPoint(playerid,3.0,322.197998,302.497985,999.148437))
           {
            SetPlayerInterior(playerid,0);
            SetPlayerVirtualWorld(playerid, 4);
            SetPlayerPos(playerid,2522.33886719,-1343.66760254,30.47849655);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }

// Police Station Rodeo

           if(IsPlayerInRangeOfPoint(playerid,3.0,322.197998,302.497985,999.148437))
           {
            SetPlayerInterior(playerid,0);
            SetPlayerVirtualWorld(playerid, 5);
            SetPlayerPos(playerid,617.58319092,-1330.05078125,13.29710579);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }

// Police Station Verona Beach

           if(IsPlayerInRangeOfPoint(playerid,3.0,322.197998,302.497985,999.148437))
           {
            SetPlayerInterior(playerid,0);
            SetPlayerVirtualWorld(playerid, 6);
            SetPlayerPos(playerid,1026.92041016,-1582.93005371,13.19610023);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }


        }
    }
 if(strcmp(cmd, "/dpentrar", true) == 0)
    {
        if(IsAPDMember(playerid) || IsAFreecop(playerid))
        {



// Police Station Ganton

           if(IsPlayerInRangeOfPoint(playerid,3.0,2495.83032227,-1759.26220703,13.19610023))
           {
            SetPlayerInterior(playerid,5);
            SetPlayerVirtualWorld(playerid, 2);
            SetPlayerPos(playerid,322.197998,302.497985,999.148437);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }
// Police Station El Corona

           if(IsPlayerInRangeOfPoint(playerid,3.0,1935.74462891,-2086.46948242,13.22142220))
           {
            SetPlayerInterior(playerid,5);
            SetPlayerVirtualWorld(playerid, 3);
            SetPlayerPos(playerid,322.197998,302.497985,999.148437);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }
           
// Police Station East Los Santos

           if(IsPlayerInRangeOfPoint(playerid,3.0,2522.33886719,-1343.66760254,30.47849655))
           {
            SetPlayerInterior(playerid,5);
            SetPlayerVirtualWorld(playerid, 4);
            SetPlayerPos(playerid,322.197998,302.497985,999.148437);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }

// Police Station Rodeo

           if(IsPlayerInRangeOfPoint(playerid,3.0,617.58319092,-1330.05078125,13.29710579))
           {
            SetPlayerInterior(playerid,5);
            SetPlayerVirtualWorld(playerid, 5);
            SetPlayerPos(playerid,322.197998,302.497985,999.148437);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }
           
// Police Station Verona Beach

           if(IsPlayerInRangeOfPoint(playerid,3.0,1026.92041016,-1582.93005371,13.19610023))
           {
            SetPlayerInterior(playerid,5);
            SetPlayerVirtualWorld(playerid, 6);
            SetPlayerPos(playerid,322.197998,302.497985,999.148437);
            GameTextForPlayer(playerid, "~w~Police Station", 5000, 1);
            return 1;
            }



        }
    }
ai fala o que deu
Nгo funcionou :S eu continuo saindo em outro local :S


Re: [Ajuda] Interiores - Pedro_Giacomelli - 14.07.2011

Alguem pode me ajudar?


Re: [Ajuda] Interiores - Macintosh - 14.07.2011

Quando ele sair seta o virtual world dele pra 0.


Re: [Ajuda] Interiores - pr0bscur3 - 14.07.2011

vc faz uma variavel pra ve onde ele entrou, exemplo:
pawn Код:
new entrou[MAX_PLAYERS];
ai la no comando entrar vamo super que ele entro no lugar 1 ai seta junto no comando
pawn Код:
entrou[playerid] = 1;
ai na hora do /sair

usa

pawn Код:
if(entrou[playerid] == 1)
{
SETA A POSIЗГO DO LUGAR 1
}
else if(entrou[playerid] == 2)
{
SETA A POSIЗГO DO LUGAR 2
}
e assim vai