TORETTO28
Компетентный
Ребята, решил добавить +1 бизнес.
Открыл файл Business, и добавил туда следующий код.
Открыл файл Business, и добавил туда следующий код.
PHP:
0|The State|Bar|No
one|1658.495971|2250.045166|11.070096|2015.956542|1017.261108|996.875000|500000|100|0|1|12|0|0|100|0|100|1139.720703|-3.160372|1000.671875|0|0|0|100|0|0|0|90.259101|0
Только не знаю что означает 90.259101 в конце кода.
Далее я в самом коде мода добавил к бизнесу +1
Далее я в самом коде мода добавил к бизнесу +1
Скомпилировал, захожу на сервер, а там просто стоят пикапы и нет мол бизнес продается или
какой то еще текст что это вообще бизнес.
какой то еще текст что это вообще бизнес.
Вот код самого сохранения бизнеса.
PHP:
stock LoadBizz()
{
new time = GetTickCount();
new arrCoords[32][64];
new strFromFile2[256];
new File: file = fopen("Files/Business.ini", io_read);
if (file)
{
new idx;
while (idx < sizeof(BizzInfo))
{
fread(file, strFromFile2);
split(strFromFile2, arrCoords, '|');
BizzInfo[idx][bOwned] = strval(arrCoords[0]);
strmid(BizzInfo[idx][bOwner], arrCoords[1], 0, strlen(arrCoords[1]), 255);
strmid(BizzInfo[idx][bMessage], arrCoords[2], 0, strlen(arrCoords[2]), 255);
strmid(BizzInfo[idx][bExtortion], arrCoords[3], 0, strlen(arrCoords[3]), 255);
BizzInfo[idx][bEntranceX] = floatstr(arrCoords[4]);
BizzInfo[idx][bEntranceY] = floatstr(arrCoords[5]);
BizzInfo[idx][bEntranceZ] = floatstr(arrCoords[6]);
BizzInfo[idx][bExitX] = floatstr(arrCoords[7]);
BizzInfo[idx][bExitY] = floatstr(arrCoords[8]);
BizzInfo[idx][bExitZ] = floatstr(arrCoords[9]);
BizzInfo[idx][bBuyPrice] = strval(arrCoords[10]);
BizzInfo[idx][bEntranceCost] = strval(arrCoords[11]);
BizzInfo[idx][bTill] = strval(arrCoords[12]);
BizzInfo[idx][bLocked] = strval(arrCoords[13]);
BizzInfo[idx][bInterior] = strval(arrCoords[14]);
BizzInfo[idx][bProducts] = strval(arrCoords[15]);
BizzInfo[idx][bClients] = strval(arrCoords[16]);
BizzInfo[idx][bPriceProd] = strval(arrCoords[17]);
BizzInfo[idx][b2Till] = strval(arrCoords[18]);
BizzInfo[idx][bCena] = strval(arrCoords[19]);
BizzInfo[idx][bBarX] = floatstr(arrCoords[20]);
BizzInfo[idx][bBarY] = floatstr(arrCoords[21]);
BizzInfo[idx][bBarZ] = floatstr(arrCoords[22]);
BizzInfo[idx][bMafia] = strval(arrCoords[23]);
BizzInfo[idx][bWorld] = strval(arrCoords[24]);
BizzInfo[idx][bChasi] = strval(arrCoords[25]);
BizzInfo[idx][bOplataEnerg] = strval(arrCoords[26]);
BizzInfo[idx][bLicenses] = strval(arrCoords[27]);
BizzInfo[idx][ProdZakaz] = strval(arrCoords[28]);
BizzInfo[idx][OplataProds] = strval(arrCoords[29]);
BizzInfo[idx][bAgle] = floatstr(arrCoords[30]);
BizzInfo[idx][bOnline] = strval(arrCoords[31]);
idx++;
}
fclose(file);
printf("- Бизнесы загружены за %i (ms)",GetTickCount() - time);
}
new string2[200];
for(new h = 0; h < sizeof(BizzInfo); h++)
{
BizzInfo[h][bOnline] = 0;
if(BizzInfo[h][bProducts] > 20000) { BizzInfo[h][bProducts] = 20000; }
Create3DTextLabel("{CCFF00}Вызвать меню:\n{FFFFFF}нажмите: 'F'",CYELLOW,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ],10.0,BizzInfo[h][bWorld],1);
if(BizzInfo[h][bOwned] == 0)
{
switch(h)
{
case 0,1,2,3,4,5,34,35,28,36: AddStaticPickup(19132, 23, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]);
default: AddStaticPickup(1318, 23, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]);
}
switch(h)
{
case 0,36,28,1,2,3,4,5,6,23: BizzInfo[h][bBuyPrice] = 500000;
case 7,8,9,10,11,16,17,18,19,20,21,22,24,25,26,27,29,30,31,32,33: BizzInfo[h][bBuyPrice] = 200000;
default: BizzInfo[h][bBuyPrice] = 300000;
}
format(string2, sizeof(string2), "{D5F026}Бизнес продаётся\n{8ACF30}%s\n{D5F026}Гос. Цена: %i\nКупить: /buybiz",BizzInfo[h][bMessage],BizzInfo[h][bBuyPrice]);
BizzInfo[h][bLabel] = Create3DTextLabel(string2,CYELLOW,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]+1.2,10.0,0,1);
BizzInfo[h][bLocked] = 1;
BizzInfo[h][bEntranceCost] = 100;
BizzInfo[h][bTill] = 0;
BizzInfo[h][bProducts] = 0;
BizzInfo[h][b2Till] = 0;
BizzInfo[h][bCena] = 100;
BizzInfo[h][bZahvat] = 0;
BizzInfo[h][bOplataEnerg] = 100;
BizzInfo[h][bLicenses] = 0;
BizzInfo[h][ProdZakaz] = 0;
BizzInfo[h][OplataProds] = 0;
BizzInfo[h][bMafia] = 0;
}
else if(BizzInfo[h][bOwned] == 1)
{
switch(h)
{
case 0,1,2,3,4,5,34,35: AddStaticPickup(19132, 23, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]);
default: AddStaticPickup(1318, 23, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]);
}
switch(h)
{
case 0,1,2,3,4,5,34,35,28: format(string2,sizeof(string2), "{CCFF00}%s\n{FFFFFF}Владелец:\n {F58B11}%s\n{E8FC0A}Вход: $%i", BizzInfo[h][bMessage], BizzInfo[h][bOwner],BizzInfo[h][bEntranceCost]);
default: format(string2,sizeof(string2), "{CCFF00}%s\n{FFFFFF}Владелец:\n {F58B11}%s\n{E8FC0A}Вход: Бесплатный", BizzInfo[h][bMessage], BizzInfo[h][bOwner]);
}
BizzInfo[h][bLabel] = Create3DTextLabel(string2,0x008080FF,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]+1.2,10.0,0,1);
}
}
return true;
}
После того как я захожу на сервер, код пропадает с файла Business
