28.06.2014, 10:59
(
Последний раз редактировалось AroseKhanNiazi; 28.06.2014 в 20:15.
)
pawn Код:
#define HPath "/Houses/%d.ini"
stock SaveHouse(houseid)
{
new INI:ini = INI_Open(HousePath(houseid));
INI_WriteFloat(ini,"EnterX",HouseInfo[houseid][hEnterX]);
INI_WriteFloat(ini,"EnterY",HouseInfo[houseid][hEnterY]);
INI_WriteFloat(ini,"EnterZ",HouseInfo[houseid][hEnterZ]);
INI_WriteFloat(ini,"ExitX",HouseInfo[houseid][hExitX]);
INI_WriteFloat(ini,"ExitY",HouseInfo[houseid][hExitY]);
INI_WriteFloat(ini,"ExitZ",HouseInfo[houseid][hExitZ]);
INI_WriteFloat(ini,"InX",HouseInfo[houseid][hInX]);
INI_WriteFloat(ini,"InY",HouseInfo[houseid][hInY]);
INI_WriteFloat(ini,"InZ",HouseInfo[houseid][hInZ]);
INI_WriteFloat(ini,"OutX",HouseInfo[houseid][hOutX]);
INI_WriteFloat(ini,"OutY",HouseInfo[houseid][hOutY]);
INI_WriteFloat(ini,"OutZ",HouseInfo[houseid][hOutZ]);
INI_WriteInt(ini,"InsideInt",HouseInfo[houseid][hInsideInt]);
INI_WriteInt(ini,"InsideVir",HouseInfo[houseid][hInsideVir]);
INI_WriteInt(ini,"OutsideInt",HouseInfo[houseid][hOutsideInt]);
INI_WriteInt(ini,"OutsideVir",HouseInfo[houseid][hOutsideVir]);
INI_WriteBool(ini,"Owned",HouseInfo[houseid][hOwned]);
INI_WriteString(ini,"Owner",HouseInfo[houseid][hOwner]);
INI_WriteInt(ini,"InCheckpoint",HouseInfo[houseid][hInCheckpoint]);
INI_WriteInt(ini,"OutCheckpoint",HouseInfo[houseid][hOutCheckpoint]);
INI_WriteFloat(ini,"InAngle",HouseInfo[houseid][hInAngle]);
INI_WriteFloat(ini,"OutAngle",HouseInfo[houseid][hOutAngle]);
INI_WriteInt(ini,"Price",HouseInfo[houseid][hPrice]);
return 1;
}
stock HousePath(houseid)
{
new str[10];
format(str,sizeof(str),HPath,houseid);
return str;
}
result