[Ajuda] CreateDynamic nao esta funcionado
#1

Alguem me ajuda por favor...

pawn Code:
LoadCasas()
{
    for(new c = 1; c != MAX_DYNAMIC_HOUSES; ++c) if(c < MAX_DYNAMIC_HOUSES)
    {
        new file[50];

        format(file, 50, "/BORP/Casas/House%d.ini", c);

        if(DOF2_FileExists(file))
        {
            HOUSE_INFO[c][ID_CASA] = DOF2_GetInt(file, "ID CASA");
            HOUSE_INFO[c][EXISTE_CASA] = DOF2_GetBool(file, "EXISTE CASA");
            HOUSE_INFO[c][DONO] = DOF2_GetInt(file, "POSSUI PROPRIETARIO");
            format(HOUSE_INFO[c][PROPRIETARIO], 24, DOF2_GetString(file, "PROPRIETARIO"));
            format(HOUSE_INFO[c][ULTIMA_DATA], 15, DOF2_GetString(file, "ULTIMA DATA"));
            format(HOUSE_INFO[c][ULTIMA_HORA], 15, DOF2_GetString(file, "ULTIMA HORA"));
            HOUSE_INFO[c][CASA_POS][0] = DOF2_GetFloat(file, "POSICAO X");
            HOUSE_INFO[c][CASA_POS][1] = DOF2_GetFloat(file, "POSICAO Y");
            HOUSE_INFO[c][CASA_POS][2] = DOF2_GetFloat(file, "POSICAO Z");
            HOUSE_INFO[c][CASA_INTERIOR][0] = DOF2_GetFloat(file, "INTERIOR X");
            HOUSE_INFO[c][CASA_INTERIOR][1] = DOF2_GetFloat(file, "INTERIOR Y");
            HOUSE_INFO[c][CASA_INTERIOR][2] = DOF2_GetFloat(file, "INTERIOR Z");
            HOUSE_INFO[c][INTERIOR] = DOF2_GetInt(file, "INTERIOR DA CASA");
            HOUSE_INFO[c][VALOR_CASA] = DOF2_GetInt(file, "VALOR DA CASA");
            HOUSE_INFO[c][COFRE] = DOF2_GetInt(file, "COFRE DA CASA");
            HOUSE_INFO[c][CASA_TRANCADA] = DOF2_GetInt(file, "CASA TRANCADA");
            HOUSE_INFO[c][CASA_WORLD] = DOF2_GetInt(file, "CASA WORLD");
            new Float: X = HOUSE_INFO[c][CASA_POS][0];
            new Float: Y = HOUSE_INFO[c][CASA_POS][1];
            new Float: Z = HOUSE_INFO[c][CASA_POS][2];
            HOUSE_INFO[c][MAP_ICON] = CreateDynamicMapIcon(X, Y, Z, HOUSE_INFO[c][DONO] == 1 ? 32 : 31, 0, -1, -1, -1, 20.0);
            format(String, sizeof(String), "{C4C4C4}Casa Numero: %i\n{%s}%s\n{C4C4C4}Valor:{00FF40}%s.",c, HOUSE_INFO[c][DONO] == 1 ? ("FF8080") : ("00FF40"), HOUSE_INFO[c][DONO] == 1 ? ("Possui Proprietario") : ("A Venda"), FormatarNumero(HOUSE_INFO[c][VALOR_CASA]));
            HOUSE_INFO[c][LABEL] = CreateDynamic3DTextLabel(String, -1, X, Y, Z, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0);
            HOUSE_INFO[c][PICKUP] = CreateDynamicPickup(HOUSE_INFO[c][DONO] == 1 ? PICKUP_CASA_COMPRADA : PICKUP_CASA_VENDA, 23, X, Y, Z, -1);
        }
    }
}
Reply
#2

Me ajuda tambйm

Qual CreateDynamic nгo estб "funcionando"? Todos?
Reply
#3

Todos des do mapa ate o pickup
Reply
#4

Estб dando algum erro ao compilar? Nгo aparece nada no servidor? Explique melhor o que estб ocorrendo...

PS: Vocк tem o streamer plugin instalado corretamente, nй?
Reply
#5

Quote:
Originally Posted by MaddDogg
View Post
Estб dando algum erro ao compilar? Nгo aparece nada no servidor? Explique melhor o que estб ocorrendo...

PS: Vocк tem o streamer plugin instalado corretamente, nй?
Instalei o plugin, Compila e liga o servidor de boa so nгo aparece os pickups e tals!
Reply
#6

Posso estar enganado, mas, tente trocar:

Quote:

for(new c = 1; c != MAX_DYNAMIC_HOUSES; ++c) if(c < MAX_DYNAMIC_HOUSES)

por:

Quote:

for(new c = 1; c <= MAX_DYNAMIC_HOUSES; ++c)

Reply
#7

Quote:
Originally Posted by MaddDogg
View Post
Posso estar enganado, mas, tente trocar:



por:
Nao foi
Reply
#8

Alterei o codigo da pickup porйm nгo testei.
PHP Code:
if(DOF2_FileExists(file))
        {
            
HOUSE_INFO[c][ID_CASA] = DOF2_GetInt(file"ID CASA");
            
HOUSE_INFO[c][EXISTE_CASA] = DOF2_GetBool(file"EXISTE CASA");
            
HOUSE_INFO[c][DONO] = DOF2_GetInt(file"POSSUI PROPRIETARIO");
            
format(HOUSE_INFO[c][PROPRIETARIO], 24DOF2_GetString(file"PROPRIETARIO"));
            
format(HOUSE_INFO[c][ULTIMA_DATA], 15DOF2_GetString(file"ULTIMA DATA"));
            
format(HOUSE_INFO[c][ULTIMA_HORA], 15DOF2_GetString(file"ULTIMA HORA"));
            
HOUSE_INFO[c][CASA_POS][0] = DOF2_GetFloat(file"POSICAO X");
            
HOUSE_INFO[c][CASA_POS][1] = DOF2_GetFloat(file"POSICAO Y");
            
HOUSE_INFO[c][CASA_POS][2] = DOF2_GetFloat(file"POSICAO Z");
            
HOUSE_INFO[c][CASA_INTERIOR][0] = DOF2_GetFloat(file"INTERIOR X");
            
HOUSE_INFO[c][CASA_INTERIOR][1] = DOF2_GetFloat(file"INTERIOR Y");
            
HOUSE_INFO[c][CASA_INTERIOR][2] = DOF2_GetFloat(file"INTERIOR Z");
            
HOUSE_INFO[c][INTERIOR] = DOF2_GetInt(file"INTERIOR DA CASA");
            
HOUSE_INFO[c][VALOR_CASA] = DOF2_GetInt(file"VALOR DA CASA");
            
HOUSE_INFO[c][COFRE] = DOF2_GetInt(file"COFRE DA CASA");
            
HOUSE_INFO[c][CASA_TRANCADA] = DOF2_GetInt(file"CASA TRANCADA");
            
HOUSE_INFO[c][CASA_WORLD] = DOF2_GetInt(file"CASA WORLD");
            new 
FloatHOUSE_INFO[c][CASA_POS][0];
            new 
FloatHOUSE_INFO[c][CASA_POS][1];
            new 
FloatHOUSE_INFO[c][CASA_POS][2];
            
HOUSE_INFO[c][MAP_ICON] = CreateDynamicMapIcon(XYZHOUSE_INFO[c][DONO] == 32 310, -1, -1, -120.0);
            
format(Stringsizeof(String), "{C4C4C4}Casa Numero: %i\n{%s}%s\n{C4C4C4}Valor:{00FF40}%s.",cHOUSE_INFO[c][DONO] == ? ("FF8080") : ("00FF40"), HOUSE_INFO[c][DONO] == ? ("Possui Proprietario") : ("A Venda"), FormatarNumero(HOUSE_INFO[c][VALOR_CASA]));
            
HOUSE_INFO[c][LABEL] = CreateDynamic3DTextLabel(String, -1XYZ20.0INVALID_PLAYER_IDINVALID_VEHICLE_ID0);
            if(
HOUSE_INFO[c][DONO])
            {
                
HOUSE_INFO[c][PICKUP] = CreateDynamicPickup(PICKUP_CASA_COMPRADA23XYZ, -1);
            }
            else
            {
                
HOUSE_INFO[c][PICKUP] = CreateDynamicPickup(PICKUP_CASA_VENDA23XYZ, -1);
            }
        } 
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)