Trender
26.05.2014, 01:01
Суть.
Я создаю бизнес допустим.
case 183:
{
if(response)
{
TOTALBIZZ++;
strmid(BizzInfo[TOTALBIZZ][bOwner], "The_State", 0, strlen("The_State"), MAX_PLAYER_NAME);
strmid(BizzInfo[TOTALBIZZ][bName], BizzInfo[totalbizz[playerid]][bName], 0, strlen(BizzInfo[totalbizz[playerid]][bName]), 32);
BizzInfo[TOTALBIZZ][bID] = TOTALBIZZ;
BizzInfo[TOTALBIZZ][bType] = 3;
BizzInfo[TOTALBIZZ][bLock] = 1;
BizzInfo[TOTALBIZZ][bValue] = strval(inputtext);
BizzInfo[TOTALBIZZ][bOwned] = 0;
BizzInfo[TOTALBIZZ][bTakings] = 0;
BizzInfo[TOTALBIZZ][bProduct] = 0;
BizzInfo[TOTALBIZZ][bPriceProd] = 0;
BizzInfo[TOTALBIZZ][bTax] = 0;
BizzInfo[TOTALBIZZ][bVirtWorld] = TOTALBIZZ+100;
BizzInfo[TOTALBIZZ][bEnterX] = BizzInfo[totalbizz[playerid]][bEnterX];
BizzInfo[TOTALBIZZ][bEnterY] = BizzInfo[totalbizz[playerid]][bEnterY];
BizzInfo[TOTALBIZZ][bEnterZ] = BizzInfo[totalbizz[playerid]][bEnterZ];
BizzInfo[TOTALBIZZ][bExitX] = 377.2674;
BizzInfo[TOTALBIZZ][bExitY] = -193.0148;
BizzInfo[TOTALBIZZ][bExitZ] = 1000.6401;
format(query, sizeof(query), "INSERT INTO "TABLE_BIZZ" (`ID`,`EX`,`EY`,`EZ`,`Name`,`Owner`,`Value`,`VirtWorld`,`Type`,`Open`,`Tax`) VALUE ('%i', '%f', '%f', '%f', '%s', '%s', '%i', '%i', '%i', '%i', '%i')",
BizzInfo[TOTALBIZZ][bID],BizzInfo[TOTALBIZZ][bEnterX],BizzInfo[TOTALBIZZ][bEnterY],BizzInfo[TOTALBIZZ][bEnterZ],BizzInfo[TOTALBIZZ][bName],BizzInfo[TOTALBIZZ][bOwner],BizzInfo[TOTALBIZZ][bValue],BizzInfo[TOTALBIZZ][bVirtWorld],BizzInfo[TOTALBIZZ][bType],BizzInfo[TOTALBIZZ][bLock],BizzInfo[TOTALBIZZ][bTax]);
mysql_query(query);
format(string, sizeof(string), "Закусочная № %d созданa!",TOTALBIZZ);
SCM(playerid, COLOR_GREY,string);
new b = TOTALBIZZ;
format(dtring, sizeof(dtring),"Tex text text",BizzInfo[b][bName],BizzInfo[b][bValue],BizzInfo[b][bID]);
BizzLabel[b] = Create3DTextLabel(dtring, 0xFF0000FF, BizzInfo[b][bEnterX],BizzInfo[b][bEnterY],BizzInfo[b][bEnterZ],30.0,0);
BizzInfo[b][bPickup] = CreatePickupAC(1318, 23, BizzInfo[b][bEnterX],BizzInfo[b][bEnterY],BizzInfo[b][bEnterZ]);
BizzInfo[b][bPickupExit] = CreatePickupAC(1318, 23, BizzInfo[b][bExitX],BizzInfo[b][bExitY],BizzInfo[b][bExitZ],BizzInfo[b][bVirtWorld]);
CreateDynamicMapIcon(BizzInfo[b][bEnterX],BizzInfo[b][bEnterY],BizzInfo[b][bEnterZ], 50, COLOR_GREY, 0, -1, -1, 400.0);
BizzInfo[b][bPickupInfo] = CreatePickupAC(19132, 19, 379.3227,-190.4464,1000.6328,BizzInfo[b][bVirtWorld]);
totalbizz[playerid] = 0;
DeletePVar(playerid, "BizzPrice");
return 1;
}
else
{
totalbizz[playerid] = 0;
DeletePVar(playerid, "BizzPrice");
SCM(playerid,COLOR_GREY,"Создание бизнеса отменено!");
}
}
Вроде бы всё создалось, но после рестарта сервера всё пропадает....
В чём вся суть?
Я создаю бизнес допустим.
case 183:
{
if(response)
{
TOTALBIZZ++;
strmid(BizzInfo[TOTALBIZZ][bOwner], "The_State", 0, strlen("The_State"), MAX_PLAYER_NAME);
strmid(BizzInfo[TOTALBIZZ][bName], BizzInfo[totalbizz[playerid]][bName], 0, strlen(BizzInfo[totalbizz[playerid]][bName]), 32);
BizzInfo[TOTALBIZZ][bID] = TOTALBIZZ;
BizzInfo[TOTALBIZZ][bType] = 3;
BizzInfo[TOTALBIZZ][bLock] = 1;
BizzInfo[TOTALBIZZ][bValue] = strval(inputtext);
BizzInfo[TOTALBIZZ][bOwned] = 0;
BizzInfo[TOTALBIZZ][bTakings] = 0;
BizzInfo[TOTALBIZZ][bProduct] = 0;
BizzInfo[TOTALBIZZ][bPriceProd] = 0;
BizzInfo[TOTALBIZZ][bTax] = 0;
BizzInfo[TOTALBIZZ][bVirtWorld] = TOTALBIZZ+100;
BizzInfo[TOTALBIZZ][bEnterX] = BizzInfo[totalbizz[playerid]][bEnterX];
BizzInfo[TOTALBIZZ][bEnterY] = BizzInfo[totalbizz[playerid]][bEnterY];
BizzInfo[TOTALBIZZ][bEnterZ] = BizzInfo[totalbizz[playerid]][bEnterZ];
BizzInfo[TOTALBIZZ][bExitX] = 377.2674;
BizzInfo[TOTALBIZZ][bExitY] = -193.0148;
BizzInfo[TOTALBIZZ][bExitZ] = 1000.6401;
format(query, sizeof(query), "INSERT INTO "TABLE_BIZZ" (`ID`,`EX`,`EY`,`EZ`,`Name`,`Owner`,`Value`,`VirtWorld`,`Type`,`Open`,`Tax`) VALUE ('%i', '%f', '%f', '%f', '%s', '%s', '%i', '%i', '%i', '%i', '%i')",
BizzInfo[TOTALBIZZ][bID],BizzInfo[TOTALBIZZ][bEnterX],BizzInfo[TOTALBIZZ][bEnterY],BizzInfo[TOTALBIZZ][bEnterZ],BizzInfo[TOTALBIZZ][bName],BizzInfo[TOTALBIZZ][bOwner],BizzInfo[TOTALBIZZ][bValue],BizzInfo[TOTALBIZZ][bVirtWorld],BizzInfo[TOTALBIZZ][bType],BizzInfo[TOTALBIZZ][bLock],BizzInfo[TOTALBIZZ][bTax]);
mysql_query(query);
format(string, sizeof(string), "Закусочная № %d созданa!",TOTALBIZZ);
SCM(playerid, COLOR_GREY,string);
new b = TOTALBIZZ;
format(dtring, sizeof(dtring),"Tex text text",BizzInfo[b][bName],BizzInfo[b][bValue],BizzInfo[b][bID]);
BizzLabel[b] = Create3DTextLabel(dtring, 0xFF0000FF, BizzInfo[b][bEnterX],BizzInfo[b][bEnterY],BizzInfo[b][bEnterZ],30.0,0);
BizzInfo[b][bPickup] = CreatePickupAC(1318, 23, BizzInfo[b][bEnterX],BizzInfo[b][bEnterY],BizzInfo[b][bEnterZ]);
BizzInfo[b][bPickupExit] = CreatePickupAC(1318, 23, BizzInfo[b][bExitX],BizzInfo[b][bExitY],BizzInfo[b][bExitZ],BizzInfo[b][bVirtWorld]);
CreateDynamicMapIcon(BizzInfo[b][bEnterX],BizzInfo[b][bEnterY],BizzInfo[b][bEnterZ], 50, COLOR_GREY, 0, -1, -1, 400.0);
BizzInfo[b][bPickupInfo] = CreatePickupAC(19132, 19, 379.3227,-190.4464,1000.6328,BizzInfo[b][bVirtWorld]);
totalbizz[playerid] = 0;
DeletePVar(playerid, "BizzPrice");
return 1;
}
else
{
totalbizz[playerid] = 0;
DeletePVar(playerid, "BizzPrice");
SCM(playerid,COLOR_GREY,"Создание бизнеса отменено!");
}
}
Вроде бы всё создалось, но после рестарта сервера всё пропадает....
В чём вся суть?