10.12.2011, 19:29
Hey,
Sorry to bother you guys but I am having trouble with the saving of my houses
I save them as such..
I have the folder I save the houses and I goto the folder and nothing...
Thanks Snowman
Sorry to bother you guys but I am having trouble with the saving of my houses
I save them as such..
pawn Код:
#define HOUSE_PATH "/Houses/%s.ini"
stock HousePath()
{
new string[128], houseid = HouseCount;
format(string,sizeof(string),HOUSE_PATH, houseid);
return string;
}
forward SaveHouses();
public SaveHouses()
{
for(new i=0;i<MAX_HOUSES;i++)
{
new INI:File = INI_Open(HousePath());
INI_SetTag(File, "Main");
INI_WriteInt(File, "Price", HouseInfo[i][hPrice]);
INI_WriteString(File, "Owner", HouseInfo[i][hOwner]);
INI_WriteFloat(File, "EnterX", HouseInfo[i][hEnterX]);
INI_WriteFloat(File, "EnterY", HouseInfo[i][hEnterY]);
INI_WriteFloat(File, "EnterZ", HouseInfo[i][hEnterZ]);
INI_WriteFloat(File, "ExitX", HouseInfo[i][hExitX]);
INI_WriteFloat(File, "ExitY", HouseInfo[i][hExitY]);
INI_WriteFloat(File, "ExitZ", HouseInfo[i][hExitZ]);
INI_WriteInt(File, "Interior", HouseInfo[i][hInt]);
INI_Close(File);
}
}
Thanks Snowman