13.04.2014, 13:01
(
Последний раз редактировалось mrkiller90; 14.04.2014 в 11:27.
)
So, basically I am doing a roleplay gamemode from scretch and Im trying to make a house system using Y_ini , I can save correctly the problem is that when I run the server it doesn't load the files.ini , I don't know if ParseFile is reading the floats I hope get some help.
Here is the code:
When I join the server the pickup is not created please help me I have tried so many things I've read lots of tutorials and I cant understand whats wrong :S (it prints correctly "House 0 Loaded" "House 1 Loaded"...)
Here is the code:
pawn Код:
forward LoadHouse_data(name[],value[]);
public LoadHouse_data(name[],value[])
{
for(new i = 0; i < MAX_HOUSES; i++)
{
INI_Int("ID",HouseInfo[i][hID]);
INI_Int("Name",HouseInfo[i][hName]);
INI_Float("EntX",HouseInfo[i][hEntX]);
INI_Float("EntY",HouseInfo[i][hEntY]);
INI_Float("EntZ",HouseInfo[i][hEntZ]);
INI_Int("Locked",HouseInfo[i][hLocked]);
INI_Int("Int",HouseInfo[i][hInt]);
INI_Int("Price",HouseInfo[i][hPrice]);
}
return 1;
}
stock LoadHouses()
{
for(new i = 0; i < MAX_HOUSES; i++)
{
if(fexist(HousePath(i)))
{
INI_ParseFile(HousePath(i),"LoadHouse_%d");
CreatePickup(1273,1,HouseInfo[i][hEntX],HouseInfo[i][hEntY],HouseInfo[i][hEntZ],-1);
printf("House %d Loaded", i);
}
}
}