LoadHouses()
{
new id = GetHouses();
for(new i = 0; i < MAX_HOUSES; i++)
{
new file[80], msg[200];
format(file, sizeof(file), CASAS, i);
if(DOF2_FileExists(file))
format(HouseInfo[i][Owner], 200, "%s", DOF2_GetString(file, "Owner"));
format(HouseInfo[i][Adress], 200, "%s", DOF2_GetString(file, "Adress"));
HouseInfo[i][Owned] = DOF2_GetInt(file, "Owned");
HouseInfo[i][Price] = DOF2_GetInt(file, "Price");
HouseInfo[i][EnterX] = DOF2_GetFloat(file, "EnterX");
HouseInfo[i][EnterY] = DOF2_GetFloat(file, "EnterY");
HouseInfo[i][EnterZ] = DOF2_GetFloat(file, "EnterZ");
HouseInfo[i][EnterA] = DOF2_GetFloat(file, "EnterA");
HouseInfo[i][ExitX] = DOF2_GetFloat(file, "ExitX");
HouseInfo[i][ExitY] = DOF2_GetFloat(file, "ExitY");
HouseInfo[i][ExitZ] = DOF2_GetFloat(file, "ExitZ");
HouseInfo[i][ExitA] = DOF2_GetFloat(file, "ExitA");
HouseInfo[i][EnterInt] = DOF2_GetInt(file, "EnterInt");
HouseInfo[i][EnterVW] = DOF2_GetInt(file, "EnterVW");
HouseInfo[i][ExitInt] = DOF2_GetInt(file, "ExitInt");
HouseInfo[i][ExitVW] = DOF2_GetInt(file, "ExitVW");
HouseInfo[i][Locked] = DOF2_GetInt(file, "Locked");
if(HouseInfo[i][Owned] == 1)
{
format(msg, sizeof(msg), "{B33C3C}[TRANCADA]{FFFFFF}\nProprietбrio: %s\nEndereзo Residencial: %s", HouseInfo[i][Owner], HouseInfo[i][Adress]);
HouseInfo[i][PickupID] = CreatePickup(1272, 1, HouseInfo[i][ExitX], HouseInfo[i][ExitY], HouseInfo[i][ExitZ], 0);
HouseInfo[i][Label] = Create3DTextLabel(msg, COLOR_WHITE, HouseInfo[i][ExitX], HouseInfo[i][ExitY], HouseInfo[i][ExitZ], 10.0, 0, 0);
}
else if(HouseInfo[i][Owned] == 0)
{
format(msg, sizeof(msg), "{6FA828}[A VENDA]{FFFFFF}\nProprietбrio: %s\nEndereзo Residencial: %s", HouseInfo[i][Owner], HouseInfo[i][Adress]);
HouseInfo[i][PickupID] = CreatePickup(1273, 1, HouseInfo[i][ExitX], HouseInfo[i][ExitY], HouseInfo[i][ExitZ], 0);
HouseInfo[i][Label] = Create3DTextLabel(msg, COLOR_WHITE, HouseInfo[i][ExitX], HouseInfo[i][ExitY], HouseInfo[i][ExitZ], 10.0, 0, 0);
}
}
printf("FORT CARSON ROLEPLAY - CASAS CARREGADAS %d", id);
return 1;
}
O arquivo das casas estб 'bugado'... Todas as casas, agora, estгo na posiзгo zero; creio que foi um erro de carregamento que comprometeu o salvamento.
|
for(new i = 0; i < MAX_HOUSES; i++)
Ultimamente vocк mudou algo nesses cуdigos que vocк enviou?
|
new id = GetHouses();
for(new i = 0; i < MAX_HOUSES; i++)
new id = GetHouses();
for(new i = 0; i < id ; i++)