[Duvida] Se o codigo estб certo.
#5

Nгo ... Sу queria saber porque reparei e vi isto:
pawn Код:
if (newkeys == KEY_SECONDARY_ATTACK && IsPlayerInRangeOfPoint(playerid, 2.0, dini_Float(string, "PosX"), dini_Float(string, "PosY"), dini_Float(string, "PosZ")))
        {
            if (dini_Int(string, "Trancada") == 1)
            {
                if (strcmp(dini_Get(string, "Dono"), pname, true) == 0 || IsPlayerAdmin(playerid))
                {
                    format(STRX, sizeof(STRX), "/Interiores/int%d.ini", dini_Int(string, "Int"));
                    if (dini_Exists(STRX))
                    {
                        emcasa[playerid] = 1;
                        new Float: X,
                        Float: Y,
                        Float: Z;
                        GetPlayerPos(playerid, X, Y, Z);
                        CasaX[playerid] = X;
                        CasaY[playerid] = Y;
                        CasaZ[playerid] = Z;
                        SetPlayerVirtualWorld(playerid, c);
                        SetPlayerInterior(playerid, dini_Int(STRX, "Int"));
                        SetPlayerPos(playerid, dini_Float(STRX, "EX"), dini_Float(STRX, "EY"), dini_Float(STRX, "EZ"));
                        SendClientMessage(playerid, Vermelho, "(CASAS) Vocк entrou na casa!");
                    }
                }
            }
            else
            {
                format(STRX, sizeof(STRX), "/Interiores/int%d.ini", dini_Int(string, "Int"));
                if (dini_Exists(STRX))
                {
                    emcasa[playerid] = 1;
                    new Float: X,
                    Float: Y,
                    Float: Z;
                    GetPlayerPos(playerid, X, Y, Z);
                    CasaX[playerid] = X;
                    CasaY[playerid] = Y;
                    CasaZ[playerid] = Z;
                    SetPlayerVirtualWorld(playerid, c);
                    SetPlayerInterior(playerid, dini_Int(STRX, "Int"));
                    SetPlayerPos(playerid, dini_Float(STRX, "EX"), dini_Float(STRX, "EY"), dini_Float(STRX, "EZ"));
                    SendClientMessage(playerid, Vermelho, "(CASAS) Vocк entrou na casa!");
                }
            }
        }
        return 1;
    }
Dois cуdigos repetidos..




@Ops
Obrigado pela atenзгo
nгo reparei o
Trancado == 1
pois a 2є else vai ser == 0
Reply


Messages In This Thread
[Duvida] Se o codigo estб certo. - by dPlaYer_ - 04.05.2012, 19:17
Re: [Duvida] Se o codigo estб certo. - by Kan - 04.05.2012, 19:19
Re: [Duvida] Se o codigo estб certo. - by dPlaYer_ - 04.05.2012, 19:23
Re: [Duvida] Se o codigo estб certo. - by ViniBorn - 04.05.2012, 19:23
Re: [Duvida] Se o codigo estб certo. - by dPlaYer_ - 04.05.2012, 19:25
Re: [Duvida] Se o codigo estб certo. - by ViniBorn - 04.05.2012, 19:27

Forum Jump:


Users browsing this thread: 1 Guest(s)