22.01.2011, 23:45
I have made another command to make a House this time,
It does not work at all?
pawn Код:
command(createhouse, playerid, params[])
{
new file[128];
new h = MAX_HOUSES;
GetPlayerPos(playerid, HouseInfo[h][hEnterX], HouseInfo[h][hEnterY], HouseInfo[h][hEnterZ]);
format(file, sizeof(file), "Houses/%d.ini", h);
if(!dini_Exists(file))
{
dini_Create(file);
dini_FloatSet(file, "EnterX", HouseInfo[h][hEnterX]);
dini_FloatSet(file, "EnterY", HouseInfo[h][hEnterY]);
dini_FloatSet(file, "EnterZ", HouseInfo[h][hEnterZ]);
print("Test");
}
if(!fexist(file))
{
SendClientMessage(playerid, COLOR_YELLOW, "[HOUSE-INFO:] This House already Exists.");
}
return 1;
}