stock LoadHouses()
{
new file[50], labelstring[144], stringlabel[144];
for(new i = 0; i < MAX_HOUSES; i++)
{
format(file, sizeof(file), "Houses/%d.ini", i);
if(fexist(file))
{
CasaInfo[i][CasaDono] = DOF2_GetInt(file, "Owned");
CasaInfo[i][CasaValor] = DOF2_GetInt(file, "Price");
CasaInfo[i][CasaInterior] = DOF2_GetInt(file, "Interior");
CasaInfo[i][hX] = DOF2_GetFloat(file, "Position X");
CasaInfo[i][hY] = DOF2_GetFloat(file, "Position Y");
CasaInfo[i][hZ] = DOF2_GetFloat(file, "Position Z");
CasaInfo[i][hEnterX] = DOF2_GetFloat(file, "Enter X");
CasaInfo[i][hEnterY] = DOF2_GetFloat(file, "Enter Y");
CasaInfo[i][hEnterZ] = DOF2_GetFloat(file, "Enter Z");
strmid(CasaInfo[i][CasaProprietario], DOF2_GetString(file, "Owner"), false, strlen(DOF2_GetString(file, "Owner")), MAX_PLAYER_NAME);
format(labelstring, sizeof(labelstring), "{15FF00}Casa ID: {FFFFFF}%d\n{15FF00}Status: {FFFFFF}A venda\n{15FF00}Price: {FFFFFF}%d", i, CasaInfo[i][CasaValor]);
format(stringlabel, sizeof(stringlabel), "{15FF00}Casa ID: {FFFFFF}%d\n{15FF00}Proprietбrio: {FFFFFF}%s\n{15FF00}Preзo: {FFFFFF}%d", i, CasaInfo[i][CasaProprietario], CasaInfo[i][CasaValor]);
if(CasaInfo[i][CasaDono] == 0)
{
CasasDisponiveis[casaid] = CreateDynamicMapIcon(CasaInfo[i][hX], CasaInfo[i][hY], CasaInfo[i][hZ], 31, -1, -1, 0, -1, 100.0);
CasaInfo[i][CasaPickup] = CreatePickup(1273, 1, CasaInfo[i][hX], CasaInfo[i][hY], CasaInfo[i][hZ]);
CasaInfo[i][CasaTexto] = Create3DTextLabel(labelstring, 0xFFFFFFFF, CasaInfo[i][hX], CasaInfo[i][hY], CasaInfo[i][hZ], 30.0, 0, 0);
}
else if(CasaInfo[i][CasaDono] == 1)
{
CasasCompradas[casaid] = CreateDynamicMapIcon(CasaInfo[i][hX], CasaInfo[i][hY], CasaInfo[i][hZ], 32, -1, -1, 0, -1, 100.0);
CasaInfo[i][CasaPickup] = CreatePickup(1272, 1, CasaInfo[i][hX], CasaInfo[i][hY], CasaInfo[i][hZ]);
CasaInfo[i][CasaTexto] = Create3DTextLabel(stringlabel, 0xFFFFFFFF, CasaInfo[i][hX], CasaInfo[i][hY], CasaInfo[i][hZ], 30.0, 0, 0);
}
casaid++;
}
}
CasasDisponiveis |
CasasCompradas |
OnGameModeInit()