Loads houses that are not even made.
#9

What if you try this? (Response to your first post)

pawn Код:
stock LoadHouses()
{
    new name[128], value[128];
    new FileName[128];
    for(new i = 0; i < MAX_HOUSES; i++)
    {
        format(FileName, sizeof(FileName), "Houses/House_%d.ini", i);
        if(fexist(FileName))
        {
            INI_Int("InteriorID", HouseVar[i][hInteriorID]);
            INI_Float("InteriorX", HouseVar[i][hInteriorX]);
            INI_Float("InteriorY", HouseVar[i][hInteriorY]);
            INI_Float("InteriorZ", HouseVar[i][hInteriorZ]);

            INI_Int("HousePrice", HouseVar[i][HousePrice]);

            INI_Int("ExteriorID", HouseVar[i][hExteriorID]);
            INI_Float("ExteriorX", HouseVar[i][hExteriorX]);
            INI_Float("ExteriorY", HouseVar[i][hExteriorY]);
            INI_Float("ExteriorZ", HouseVar[i][hExteriorZ]);

            INI_Int("Owner", HouseVar[i][hOwner]);

            INI_Int("LockStatus", HouseVar[i][LockStatus]);
 
           
    if(strcmp(HouseVar[i][hOwner], "Nobody", true) == 0)
    {
        HouseVar[i][LockStatus] = 0;
        HouseVar[i][HPickupID] = CreateDynamicPickup(1273, 23, HouseVar[i][hExteriorX], HouseVar[i][hExteriorY], HouseVar[i][hExteriorZ], 0, -1, -1, 150.0);
    }
    else
    {
        HouseVar[i][HPickupID] = CreateDynamicPickup(1272, 23, HouseVar[i][hExteriorX], HouseVar[i][hExteriorY], HouseVar[i][hExteriorZ], 0, -1, -1, 150.0);
    }

            printf("["ServerName"] House %d spawned.", i);
            SpawnedHouses++;
       }
}
    return 1;
}
Fix the indentation, I did it on the forums.
Reply


Messages In This Thread
Loads houses that are not even made. - by Kestro - 16.04.2013, 16:26
Re: Loads houses that are not even made. - by robdint - 16.04.2013, 17:28
Re: Loads houses that are not even made. - by Knappen - 16.04.2013, 18:33
Re: Loads houses that are not even made. - by jessejanssen - 16.04.2013, 18:43
Re: Loads houses that are not even made. - by RajatPawar - 16.04.2013, 18:54
Re: Loads houses that are not even made. - by Knappen - 16.04.2013, 19:20
Re: Loads houses that are not even made. - by Kestro - 16.04.2013, 19:36
Re: Loads houses that are not even made. - by Knappen - 16.04.2013, 20:14
Re: Loads houses that are not even made. - by Shoulen - 16.04.2013, 21:04

Forum Jump:


Users browsing this thread: 1 Guest(s)