SA-MP Forums Archive
[Ajuda] Entrada Interior Sem Comando - 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] Entrada Interior Sem Comando (/showthread.php?tid=469283)



Entrada Interior Sem Comando - Alisson Silva Alves - 12.10.2013

Como Entrada/Saida de Interiores Apertando F


Sem Comando Tipo Um Code Para Vбrios Interiores

Ex:

pawn Код:
//Prefeitura
                SetPlayerInterior(playerid,3);
                SetPlayerVirtualWorld(playerid, 0);
                SetPlayerPos(playerid,387.7978,173.8582,1008.3828);
                GameTextForPlayer(playerid, "~w~Bem vindo a ~n~~b~Prefeitura !", 5000, 1);
                PlayerInfo[playerid][pInt] = 3;
                PlayerInfo[playerid][pLocal] = 241;
            }



Re: Entrada Interior Sem Comando - Juniiro3 - 12.10.2013

Vocк vai criar o comando normalmente em OnPlayerCommandText. Apуs criб-lo, na OnPlayerKeyStateChange vocк ira verificar se a tecla digitada й 'F'. Caso for, coloque:

pawn Код:
OnPlayerCommandText ( playerid , "/SeuComando" );



Re: Entrada Interior Sem Comando - arakuta - 12.10.2013

https://sampforum.blast.hk/showthread.php?tid=259611


Re: Entrada Interior Sem Comando - Zivo - 12.10.2013

coloque isso na public OnPlayerKeyStateChange
pawn Код:
if(newkeys == KEY_SECONDARY_ATTACK)
{
     Seus paranauкs...
}
===================================

Outra forma:

Crie um comando para /entrar e /sair
entгo na public OnPlayerKeyStateChange
pawn Код:
if(newkeys == KEY_SECONDARY_ATTACK)
{
     OnPlayerCommandText(playerid, "/Entrar");
     OnPlayerCommandText(playerid, "/Sair");
}



Re: Entrada Interior Sem Comando - Alisson Silva Alves - 12.10.2013

Sem Comando irei ter que criar varios comandos quero cria 1 so para varias entradas tipo assim


pawn Код:
//Prefeitura
                SetPlayerInterior(playerid,3);
                SetPlayerVirtualWorld(playerid, 0);
                SetPlayerPos(playerid,387.7978,173.8582,1008.3828);
                GameTextForPlayer(playerid, "~w~Bem vindo a ~n~~b~Prefeitura !", 5000, 1);
                PlayerInfo[playerid][pInt] = 3;
                PlayerInfo[playerid][pLocal] = 241;
            }
            else if (PlayerToPoint(3, playerid,1570.3828,-1333.8882,16.4844))
            {
                SetPlayerPos(playerid, 1545.0068,-1366.5094,327.2868);
            }
            else if(PlayerToPoint(3.0, playerid,1554.9537,-1675.6584,16.1953))
            {//Departamento de Policia Los Santos
                GameTextForPlayer(playerid, "~w~Departamento de Policia", 5000, 1);
                SetPlayerInterior(playerid, 6);
                SetPlayerPos(playerid,246.5878,62.7877,1003.6406);
                PlayerInfo[playerid][pInt] = 6;
            }
            else if(PlayerToPoint(4.0, playerid,2244.3423,-1665.5542,15.4766))
            {//Entrada Binco
                GameTextForPlayer(playerid, "~w~Binco", 5000, 1);
                SetPlayerVirtualWorld(playerid, 0);
                SendClientMessage(playerid, COLOR_WHITE, "DICA: Use /meuskin para mudar sua roupa");
                SetPlayerInterior(playerid, 15);
                SetPlayerPos(playerid,207.7336,-108.6231,1005.1328);
                PlayerInfo[playerid][pInt] = 15;
            }



Re: Entrada Interior Sem Comando - arakuta - 12.10.2013

Vocк mesmo jб postou o comando em sн, estб utilizando condiзхes para definir qual interior entrar.

Basta fazer como jб foi dito neste tуpico.


Re: Entrada Interior Sem Comando - Zivo - 12.10.2013

Quote:
Originally Posted by Alisson Silva Alves
Посмотреть сообщение
Sem Comando irei ter que criar varios comandos quero cria 1 so para varias entradas tipo assim


pawn Код:
//Prefeitura
                SetPlayerInterior(playerid,3);
                SetPlayerVirtualWorld(playerid, 0);
                SetPlayerPos(playerid,387.7978,173.8582,1008.3828);
                GameTextForPlayer(playerid, "~w~Bem vindo a ~n~~b~Prefeitura !", 5000, 1);
                PlayerInfo[playerid][pInt] = 3;
                PlayerInfo[playerid][pLocal] = 241;
            }
            else if (PlayerToPoint(3, playerid,1570.3828,-1333.8882,16.4844))
            {
                SetPlayerPos(playerid, 1545.0068,-1366.5094,327.2868);
            }
            else if(PlayerToPoint(3.0, playerid,1554.9537,-1675.6584,16.1953))
            {//Departamento de Policia Los Santos
                GameTextForPlayer(playerid, "~w~Departamento de Policia", 5000, 1);
                SetPlayerInterior(playerid, 6);
                SetPlayerPos(playerid,246.5878,62.7877,1003.6406);
                PlayerInfo[playerid][pInt] = 6;
            }
            else if(PlayerToPoint(4.0, playerid,2244.3423,-1665.5542,15.4766))
            {//Entrada Binco
                GameTextForPlayer(playerid, "~w~Binco", 5000, 1);
                SetPlayerVirtualWorld(playerid, 0);
                SendClientMessage(playerid, COLOR_WHITE, "DICA: Use /meuskin para mudar sua roupa");
                SetPlayerInterior(playerid, 15);
                SetPlayerPos(playerid,207.7336,-108.6231,1005.1328);
                PlayerInfo[playerid][pInt] = 15;
            }
Eu jб te respondi

Cria UM comando ъnico para todas estas funзхes

e depois й sу ir em OnPlayerKeyStateChange

pawn Код:
if(newkeys == KEY_SECONDARY_ATTACK)
{
     OnPlayerCommandText(playerid, "/Comando");
}
E pronto


Re: Entrada Interior Sem Comando - Alisson Silva Alves - 12.10.2013

Aeee
Deu Certo


Re: Entrada Interior Sem Comando - Zivo - 12.10.2013

De nada -q


Respuesta: Entrada Interior Sem Comando - DanDRT - 12.10.2013

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_SECONDARY_ATTACK)
    {
        // Seu codigo
    }
    return 1;
}

@Edit:
Nгo tinha visto que ele ja tinha resolvido.