- 0
Sign in to follow this
Followers
0
-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By def
arizona.pwn(23374) : error 012: invalid function call, not a valid address
arizona.pwn(23374) : error 001: expected token: ";", but found ")"
arizona.pwn(23374) : error 029: invalid expression, assumed zero
arizona.pwn(23374) : fatal error 107: too many error messages on one line
жалуется на данную строчку:
%s{cccccc}Для продолжения нажмите 'Далее'",PN(playerid),playerid,ItemsInfo[itemid][ItemName2],hours,cost*hours,Inventory[playerid][2][slot], AksColorName(Inventory[playerid][4][slot]), Inventory[playerid][5][slot] ? GetNameStripe(Inventory[playerid][5][slot]) : "");
-
Posted · Report post
Приветствую! У меня проблема со спавном в доме. Суть: при входе в дом или спавне в нем после авторизацию игрок появляется не в том интерьере, который указан в базе к определенному id дома (просто показывается открытая местность, но в стенки дома при попытке бежать куда-либо игрок упирается). При попытке изменить себе интерьер с помощью команды /int (пробовал с домом номер 155), я поставил значение 1 и интерьер показался, хотя в базе к этому дому стоит id интерьера номер 10. Уже какой час вожусь и не могу понять как это исправить, помогите пожалуйста. Ниже прикрепил таблицу с домами (формат txt, т.к форум не даёт грузить sql).
enum
enum hInfo
{
hID,
Float:hEntrancex,
Float:hEntrancey,
Float:hEntrancez,
Float:hExitx,
Float:hExity,
Float:hExitz,
Float:hCarx,
Float:hCary,
Float:hCarz,
Float:hCarc,
hOwner[24],
hValue,
hHel,
hInt,
hLock,
hOwned,
hTakings,
hKlass,
hVec,
hVcol1,
hVcol2,
hPickup,
hMIcon,
hVehSost,
hMats,
hStyle,
hSost,
};
new HouseInfo[2000][hInfo];
Загрузка базы с домами:
publics: LoadProperty()
{
static rows, fields;
cache_get_data(rows, fields);
new temp[64],idx=0;
if(rows)
{
for(new he = 0; he < rows; he++)
{
cache_get_row(he, 0, temp), HouseInfo[he][hID] = strval(temp);
cache_get_row(he, 1, temp), HouseInfo[he][hEntrancex] = floatstr(temp);
cache_get_row(he, 2, temp), HouseInfo[he][hEntrancey] = floatstr(temp);
cache_get_row(he, 3, temp), HouseInfo[he][hEntrancez] = floatstr(temp);
cache_get_row(he, 4, temp), HouseInfo[he][hExitx] = floatstr(temp);
cache_get_row(he, 5, temp), HouseInfo[he][hExity] = floatstr(temp);
cache_get_row(he, 6, temp), HouseInfo[he][hExitz] = floatstr(temp);
cache_get_row(he, 7, temp), strmid(HouseInfo[he][hOwner], temp, 0, strlen(temp), 255);
cache_get_row(he, 8, temp), HouseInfo[he][hValue] = strval(temp);
cache_get_row(he, 9, temp), HouseInfo[he][hHel] = strval(temp);
cache_get_row(he, 10, temp), HouseInfo[he][hInt] = strval(temp);
cache_get_row(he, 11, temp), HouseInfo[he][hLock] = strval(temp);
cache_get_row(he, 12, temp), HouseInfo[he][hOwned] = strval(temp);
cache_get_row(he, 13, temp), HouseInfo[he][hTakings] = strval(temp);
cache_get_row(he, 14, temp), HouseInfo[he][hVec] = strval(temp);
cache_get_row(he, 15, temp), HouseInfo[he][hKlass] = strval(temp);
cache_get_row(he, 16, temp), HouseInfo[he][hVehSost] = strval(temp);
cache_get_row(he, 17, temp), HouseInfo[he][hCarx] = floatstr(temp);
cache_get_row(he, 18, temp), HouseInfo[he][hCary] = floatstr(temp);
cache_get_row(he, 19, temp), HouseInfo[he][hCarz] = floatstr(temp);
cache_get_row(he, 20, temp), HouseInfo[he][hCarc] = floatstr(temp);
cache_get_row(he, 21, temp), HouseInfo[he][hNark] = strval(temp);
cache_get_row(he, 22, temp), HouseInfo[he][hMoney] = strval(temp);
cache_get_row(he, 23, temp), HouseInfo[he][hMatel] = strval(temp);
cache_get_row(he, 24, temp), HouseInfo[he][hduggl] = strval(temp);
cache_get_row(he, 25, temp), HouseInfo[he][hak47] = strval(temp);
cache_get_row(he, 26, temp), HouseInfo[he][hshotgun] = strval(temp);
cache_get_row(he, 27, temp), HouseInfo[he][hm4] = strval(temp);
cache_get_row(he, 28, temp), HouseInfo[he][hsdpist] = strval(temp);
cache_get_row(he, 29, temp), HouseInfo[he][hrifle] = strval(temp);
cache_get_row(he, 30, temp), HouseInfo[he][hsmg] = strval(temp);
cache_get_row(he, 31, temp), sscanf(temp, "a<i>[7]", HouseInfo[he][hdrugs]);
idx++;
HouseInfo[he][hRobhouse] = false;
HouseInfo[he][hSquare] = CreateDynamicSphere(HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez], 1.5, 0, 0, -1);
if(HouseInfo[he][hOwned] == 0)
{
HouseInfo[he][hPickup] = CreatePickup(1273, 23, HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez],0);
HouseInfo[he][hMIcon] = CreateDynamicMapIcon(HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez], 31, COLOR_WHITE, 0, -1, -1, 200.0);
}
if(HouseInfo[he][hOwned] == 1)
{
HouseInfo[he][hPickup] = CreatePickup(19522, 23, HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez],0);
HouseInfo[he][hMIcon] = CreateDynamicMapIcon(HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez], 32, COLOR_WHITE, 0, -1, -1, 200.0);
}
}
printf("[ %d ] Äîìà óñïåøíî çàãðóæåíû.",idx);
}
else printf("Äîìà íå çàãðóæåíû.");
for(new i; i != MAX_PAYNSPRAY; i++) {
PaynSpray = CreateDynamicSphere(paynspray[0],paynspray[1],paynspray[2],10.0);
}
AreaBase = CreateDynamicSphere(492.6442,-153.7014,611.1124,50.0);
door_fbi_area = CreateDynamicSphere(584.0284,1270.3948,1080.3250,4.0);
return true;
}
Сохранение домов:
stock SaveHouse(houseid)
{
new drugs[128], mysql_query[512];
for(new i = 0; i < 7; i++) format(drugs, sizeof(drugs), "%s%d ", drugs, HouseInfo[houseid][hdrugs]);
format(mysql_query_, sizeof(mysql_query_),"UPDATE `"TABLE_HOUSE"` SET `hOwner` = '%s', `hValue` = '%d', `hHel` = '%d', `hInt` = '%d', `hLock` = '%d', `hOwned` = '%d', `hTakings` = '%d', `hKlass` = '%d',\
`hVehSost` = '%d',`hNark` = '%d',`hMoney` = '%d',`hMatel` = '%d',`hduggl` = '%d',`hak47` = '%d', `hshotgun` = '%d', `hm4` = '%d',`hsdpist` = '%d',`hrifle` = '%d',`hsmg` = '%d', `hdrugs` = '%s' WHERE `hID` = '%d'",
HouseInfo[houseid][hOwner],HouseInfo[houseid][hValue],HouseInfo[houseid][hHel],HouseInfo[houseid][hInt],HouseInfo[houseid][hLock], HouseInfo[houseid][hOwned],HouseInfo[houseid][hTakings],HouseInfo[houseid][hKlass],
HouseInfo[houseid][hVehSost],HouseInfo[houseid][hNark],HouseInfo[houseid][hMoney],HouseInfo[houseid][hMatel],HouseInfo[houseid][hduggl],
HouseInfo[houseid][hak47],HouseInfo[houseid][hshotgun],HouseInfo[houseid][hm4],HouseInfo[houseid][hsdpist],HouseInfo[houseid][hrifle],
HouseInfo[houseid][hsmg],drugs,houseid);
mysql_tquery(connects, mysql_query_, "", "");
return true;
}
Вход в дом (код входа идентичен коду спавна в нём после авторизации)
case 10075:
{
if(response)
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0,HouseInfo[hEntrancex], HouseInfo[hEntrancey], HouseInfo[hEntrancez]))
{
if(strcmp(PlayerInfo[playerid][pNames], HouseInfo[hOwner], true) == 0 && PlayerInfo[playerid][pPhousekey] == 255) PlayerInfo[playerid][pPhousekey] = i;
if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[hLock] == 0 || PlayerInfo[playerid][pHomez] == i || IsACop(playerid) || IsAArm(playerid) || PlayerInfo[playerid][pAlcoInvenxua] >= 3)
{
SetPlayerInteriorEx(playerid,HouseInfo[hInt]);
SetPlayerVirtualWorldEx(playerid,i+50);
SetPPos(playerid,HouseInfo[hExitx],HouseInfo[hExity],HouseInfo[hExitz]);
TogglePlayerControllable(playerid, false);
SetTimerEx("UnFreez", 2900, 0, "d", playerid);
PlayerInfo[playerid][pLocal] = i;
return true;
}
else if(IsAGang(playerid))
{
PlayerInfo[playerid][pLocal] = i;
if(PlayerInfo[playerid][Texts][1] == 0) SPD(playerid, 432, DIALOG_STYLE_MSGBOX,"Ïðåäëîæåíèå","Ýé, õî÷åøü âñêðûòü ýòîò äîì?","Äåðçíóòü","Ñâàëèòü");
else return SendClientMessage(playerid, COLOR_GREY, "Âû óæå çàñâåòèëèñü â îãðàáëåíèè äîìà, ïîäîæäèòå åùå ÷óòü-÷óòü.");
return true;
}
else GameTextForPlayer(playerid, "~r~Locked", 5000, 1);
}
}
}
else return true;
}
house.txt
Share this post
Link to post