SHARE
TWEET

Untitled

a guest Aug 13th, 2017 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. stock LoadHouses()
  2. {
  3.     new file[200],string[128];
  4.     for(new i = 0; i < MAX_HOUSES; i++)
  5.     {
  6.         format(file,sizeof(file),"FHouse/houses/%i.ini",i);
  7.         INI_Open(file);
  8.         HInfo[i][x2] = INI_ReadInt("X");
  9.         HInfo[i][y2] = INI_ReadInt("Y");
  10.         HInfo[i][z2] = INI_ReadInt("Z");
  11.         HInfo[i][telex] = INI_ReadInt("Telex");
  12.         HInfo[i][teley] = INI_ReadInt("Teley");
  13.         HInfo[i][telez] = INI_ReadInt("Telez");
  14.         HInfo[i][owned] = INI_ReadInt("Owned");
  15.         HInfo[i][interior] = INI_ReadInt("Interior");
  16.         HInfo[i][price] = INI_ReadInt("Price");
  17.         HInfo[i][world] = INI_ReadInt("World");
  18.         HInfo[i][locked] = INI_ReadInt("Locked");
  19.         format(string,sizeof(string),"%s",INI_ReadString("Owner",HInfo[i][owner],255));
  20.         strmid(HInfo[i][owner],string,0,strlen(string),255);
  21.         if(HInfo[i][owned] == 1)
  22.         {
  23.             format(string,sizeof(string),"Owned by: %s \nHouse cost: %i \nID: %i",HInfo[i][price],housecount);
  24.             HInfo[i][label] = Create3DTextLabel(string,0x00FF40FF,HInfo[i][x2],HInfo[i][y2],HInfo[i][z2]+1,20.0,HInfo[i][world]);
  25.         }
  26.         else
  27.         {
  28.             format(string,sizeof(string),"House cost: %i \nID: %i",HInfo[i][price],housecount);
  29.             HInfo[i][label] = Create3DTextLabel(string,0x00FF40FF,HInfo[i][x2],HInfo[i][y2],HInfo[i][z2]+1,20.0,HInfo[i][world]);
  30.         }
  31.         Checkpoint[i] = CreateDynamicCP(HInfo[i][x2],HInfo[i][y2],HInfo[i][z2],1.5,HInfo[i][world],HInfo[i][interior],-1,cp_drawdistance);
  32.         INI_Close();
  33.         housecount++;
  34.         return 1;
  35.     }
  36.     return 1;
  37. }
RAW Paste Data
Top