[Ajuda] interiores
#1

Bom, ao apertar o botгo direito do mouse em algum interior e como se setasse o interior 0 pra mim, ai comeзo a cair

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        if(PlayerInfo[playerid][pAdmin] == 2000 || PlayerInfo[playerid][pVip] == 1)
        {
            new nos = GetPlayerVehicleID(playerid);
            if(Nitro(nos) && (oldkeys & 1 || oldkeys & 4))
            {
                RemoveVehicleComponent(nos, 1010);
                AddVehicleComponent(nos, 1010);
            }
        }
    }
    if(newkeys == 16)
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 1154.2256, -1772.0620, 16.5992)) // entrada agencia
        {
            SetPlayerInterior(playerid, 0);
            SetPlayerPos(playerid, 2305.6873, -16.0981, 26.7496);
        }
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 2306.6128,-16.2236,26.7496)) // saida de dentro da agencia
        {
            SetPlayerInterior(playerid, 0);
            SetPlayerPos(playerid, 1154.2256, -1772.0620, 16.5992);
        }

        if (IsPlayerInRangeOfPoint(playerid, 2.0, 1554.9529, -1675.5452, 16.1953)) //DP Ls
        {
            SetPlayerInterior(playerid, 6);
            SetPlayerPos(playerid, 246.7995, 65.9249, 1003.6406); //DP Ls
        }

        if (IsPlayerInRangeOfPoint(playerid, 2.0, 246.9346, 62.4051, 1003.6406)) //DP Ls
        {
            SetPlayerInterior(playerid, 0);
            SetPlayerPos(playerid, 1549.9392, -1676.1322, 15.1908); //DP Ls
        }
        if (IsPlayerInRangeOfPoint(playerid, 2.0, 1480.8795, -1771.4631, 18.7958)) //Prefeitura Ls
        {
            SetPlayerInterior(playerid, 3);
            SetPlayerPos(playerid, 385.4674, 173.9319, 1008.3828); //Prefeitura Ls
        }
        if (IsPlayerInRangeOfPoint(playerid, 2.0, 389.0495, 173.6506, 1008.3828)) //Prefeitura Ls
        {
            SetPlayerInterior(playerid, 0);
            SetPlayerPos(playerid, 1480.6866, -1768.7736, 18.7958); //Prefeitura Ls
        }
    }
    return 1;
}
Reply
#2

Estou vendo em alguns if...

pawn Код:
SetPlayerInterior(playerid,0);
Mude para o id correto do interior isso que esta causando o bug.
Prefeitura = 3. ja a agencia nгo sei a qual vocк se refere...
Reply
#3

sim mais no caso e so com a Letra F para entrar ou sair dos interiores

Nao sei por que esta funcionando a o botгo direito do mouse
Reply
#4

Quote:
Originally Posted by Murilo_sousa
Посмотреть сообщение
sim mais no caso e so com a Letra F para entrar ou sair dos interiores

Nao sei por que esta funcionando a o botгo direito do mouse
pawn Код:
if(newkeys == KEY_SECONDARY_ATTACK)
Reply
#5

so uma duvida entгo a

pawn Код:
if(newkeys == 16)
e a mesma coisa que
pawn Код:
if(newkeys == KEY_SECONDARY_ATTACK)
pois so tem a newkeys 16
Reply
#6

Olha na Wiki.


Edit:

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

Nao sei se vai resolver mais coloquei uma if assim

pawn Код:
//
    if(newkeys == KEY_SECONDARY_ATTACK)
    {
        return 0;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)