Y_INI Houses Loading - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Y_INI Houses Loading (
/showthread.php?tid=633505)
Y_INI Houses Loading -
Hunud - 02.05.2017
Hi,
Includes and plugins are updated to new versions. Problem is when i create house it's there but when i restart server, houses are not loaded in game but they are all in folder
Loading
Код:
for(new h = 0; h < sizeof(StanInfo); h++)
{
new gFile[35], string[124];
format(gFile, 35, "/Stanovi/%d.ini" ,h);
INI_ParseFile(gFile, "LoadsInfo", .bExtra = true, .extra = h);
if(StanInfo[h][sPostavljen] == 1)
{
if(StanInfo[h][sPosjeduje] == 0)
{
format(string,sizeof(string),""ORANGE"[Na prodaju] \n[Adresa] - [%d] \n [Cijena] - [$%d]\n [Level] - [%d]\nDa kupiti /stan kupi", h, StanInfo[h][sCijena], StanInfo[h][sLevel]);
StanText[h] = CreateDynamic3DTextLabel(string ,0x00FF00AA, StanInfo[h][sEnterX], StanInfo[h][sEnterY], StanInfo[h][sEnterZ], 10);
StanPickup[h] = CreateDynamicPickup(19606, 1, StanInfo[h][sEnterX], StanInfo[h][sEnterY], StanInfo[h][sEnterZ]);
}
if(StanInfo[h][sPosjeduje] == 1)
{
format(string,sizeof(string),""ORANGE"[Vlasnik] - {FFFFFF}[%s] \n "ORANGE"[Adresa] - {FFFFFF}[%d] \n "ORANGE"[Level] - {FFFFFF}[%d]", StanInfo[h][sVlasnik], h, StanInfo[h][sLevel]);
StanText[h] = CreateDynamic3DTextLabel(string ,0x00FFFFAA, StanInfo[h][sEnterX], StanInfo[h][sEnterY], StanInfo[h][sEnterZ], 10);
StanPickup[h] = CreateDynamicPickup(19605, 1, StanInfo[h][sEnterX], StanInfo[h][sEnterY], StanInfo[h][sEnterZ]);
}
}
}
Saving
Код:
stock SnimiKucu(h)
{
new dFile[128];
format(dFile, sizeof(dFile),"/Kuce/%d.ini",h);
new
INI:File = INI_Open(dFile);
INI_WriteString(File, "Vlasnik", KucaInfo[h][kVlasnik]);
INI_WriteInt(File, "Posjedovana", KucaInfo[h][kPosjeduje]);
INI_WriteInt(File, "Zakljucana", KucaInfo[h][kZakljucana]);
INI_WriteInt(File, "Postavljena", KucaInfo[h][kPostavljena]);
INI_WriteInt(File, "Level", KucaInfo[h][kLevel]);
INI_WriteInt(File, "Cijena", KucaInfo[h][kCijena]);
INI_WriteInt(File, "Novac", KucaInfo[h][kNovac]);
INI_WriteInt(File, "Oruzije", KucaInfo[h][kOruzije]);
INI_WriteInt(File, "Metkovi", KucaInfo[h][kOruzijeMunicija]);
INI_WriteFloat(File, "UlazX", KucaInfo[h][hEnterX]);
INI_WriteFloat(File, "UlazY", KucaInfo[h][hEnterY]);
INI_WriteFloat(File, "UlazZ", KucaInfo[h][hEnterZ]);
INI_WriteInt(File, "Enterijer", KucaInfo[h][hInt]);
INI_WriteFloat(File, "IzlazX", KucaInfo[h][hExitX]);
INI_WriteFloat(File, "IzlazY", KucaInfo[h][hExitY]);
INI_WriteFloat(File, "IzlazZ", KucaInfo[h][hExitZ]);
INI_Close(File);
}
Re: Y_INI Houses Loading -
AndreiWow - 02.05.2017
Not sure about your issue, but why don't you use MySQL?
Re: Y_INI Houses Loading -
Hunud - 02.05.2017
Because I don't know each single shit of MYSQL! Won't discuss about that again