Добро пожаловать!

Зарегистрировавшись у нас, вы сможете обсуждать, делиться и отправлять личные сообщения другим участникам нашего сообщества.

Зарегистрироваться!
  • Если Вы желаете помогать развитию проекта, готовы заполнять раздел(-ы) и подсказывать другим пользователям на портале, есть возможность попасть в команду редакторов. Для этого следует обратиться в техническую поддержку
Статус
В этой теме нельзя размещать новые ответы.
Пользователь
Регистрация
28 Авг 2024
Сообщения
104
Поставил CEF Инвентарь + cmd
ошибок без cmd нету, cmd поставил ошибка define vNumber

ошибка:


gamemodes\arizona.pwn(84980) : error 017: undefined symbol "vNumber"
gamemodes\arizona.pwn(84981) : error 017: undefined symbol "vNumber"

public: sendInventoryCefItems(playerid, number_1, number_2)
{
global_str = "", mysql_string = "";

if(number_2 > PI[playerid][pInvCell])
number_2 = PI[playerid][pInvCell];

for(new i = number_1; i < number_2; i++)
GetInventoryItemText(playerid, 0, 0, i, mysql_string),
f(global_str, sizeof(global_str), "%s{\"slot\":%i%s%s", global_str, i, !Inventory[playerid][0] ? "}" : (str_f(",\"item\":%i,\"amount\":%i,\"text\":\"%s\",\"background\":%i,\"available\":1,\"time\":%i}", Inventory[playerid][0], Inventory[playerid][1], mysql_string, ItemsInfo[Inventory[playerid][0]][itemColor], Inventory[playerid][6])), i == number_2-1 ? ("") : (","));

executeEvent(playerid, 0, (str_f("window.executeEvent('event.inventory.playerInventory', `[{\"action\":0,\"data\":{\"type\":1,\"items\":[%s]}}]`);", global_str)));

if(number_2 < PI[playerid][pInvCell])
return sendInventoryCefItems(playerid, number_2, number_2 + 14);

return true;
}

stock sendInventoryCEF(playerid)
{
executeEvent(playerid, 0, "window.executeEvent('event.setActiveView', '[\"Inventory\"]');"),
executeEvent(playerid, 0, "window.executeEvent('event.inventory.setPlayerInventoryVisible', '[\"true\"]');");

executeEvent(playerid, 0, (str_f("window.executeEvent('event.inventory.playerInventory',`[{\"action\":1,\"data\":{\"skin\":{\"model\":%i,\"background\":%i}%s,\"buttons\":%i}}]`);", IsPlayerInAnyVehicle(playerid) && IsAOwnableCar(GetPlayerVehicleID(playerid)) ? 400 + SearchVehicleMassiveID(GetVehicleModelEx(GetPlayerVehicleID(playerid))) : ItemsInfo[GetSkinInfo(GetSkinInfo(GetPlayerSkin(playerid), 2), 1)][itemModel], IsPlayerInAnyVehicle(playerid) && IsAOwnableCar(GetPlayerVehicleID(playerid)) ? -1 : ItemsInfo[GetSkinInfo(GetSkinInfo(GetPlayerSkin(playerid), 2), 1)][itemColor], IsPlayerInAnyVehicle(playerid) && IsAOwnableCar(GetPlayerVehicleID(playerid)) ? ",\"oil\":100,\"health\":100,\"max_health\":100" : (str_f(",\"security\":%i", IsPlayerHaveBodyguard(playerid) ? 1 : 0)), getInventoryPlayerButton(playerid))));

if(IsPlayerInAnyVehicle(playerid) && IsAOwnableCar(GetPlayerVehicleID(playerid)))
{
new numberData[4][10];

if(!GetString(VehicleInfo[GetPlayerVehicleID(playerid)][vNumber], "Arizona ST"))
sscanf(VehicleInfo[GetPlayerVehicleID(playerid)][vNumber], "P<,>a<s[10]>[4]", numberData);

executeEvent(playerid, 0, (str_f("window.executeEvent('event.inventory.playerInventory', `[{\"action\":0,\"data\":{\"type\":18,\"items\":[{\"slot\":0%s}]}}]`);", CarInfo[GetVehicleID(GetPlayerVehicleID(playerid))][cInvCell][21] ? (str_f(",\"item\":%i,\"amount\":1,\"text\":\"\",\"background\":%i,\"available\":1,\"time\":0", CarInfo[GetVehicleID(GetPlayerVehicleID(playerid))][cInvCell][21], ItemsInfo[CarInfo[GetVehicleID(GetPlayerVehicleID(playerid))][cInvCell][21]][itemColor])) : "")));
executeEvent(playerid, 0, (str_f("window.executeEvent('event.inventory.playerInventory', `[{\"action\":0,\"data\":{\"type\":19,\"items\":[{\"slot\":0%s}]}}]`);", CarInfo[GetVehicleID(GetPlayerVehicleID(playerid))][cInvCell][20] ? (str_f(",\"item\":%i,\"amount\":1,\"text\":\"\",\"background\":%i,\"available\":1,\"time\":0", CarInfo[GetVehicleID(GetPlayerVehicleID(playerid))][cInvCell][20], ItemsInfo[CarInfo[GetVehicleID(GetPlayerVehicleID(playerid))][cInvCell][20]][itemColor])) : "")));
executeEvent(playerid, 0, (str_f("window.executeEvent('event.inventory.playerInventory', `[{\"action\":0,\"data\":{\"type\":36,\"items\":[{\"slot\":0%s}]}}]`);", CarInfo[GetVehicleID(GetPlayerVehicleID(playerid))][cInvCell][22] ? (str_f(",\"item\":%i,\"amount\":1,\"text\":\"(%s) %s\",\"background\":%i,\"available\":1,\"time\":0", CarInfo[GetVehicleID(GetPlayerVehicleID(playerid))][cInvCell][22], numberData[1], numberData[0], ItemsInfo[CarInfo[GetVehicleID(GetPlayerVehicleID(playerid))][cInvCell][22]][itemColor])) : "")));

global_str = "";

for(new i; i < 10; i++)
f(global_str, sizeof(global_str), "%s{\"slot\":%i%s%s", global_str, i, CarInfo[GetVehicleID(GetPlayerVehicleID(playerid))][cInvCell] == 0 ? "}" : (str_f(",\"item\":%i,\"amount\":1,\"text\":\"\",\"background\":%i,\"available\":1,\"time\":0}", CarInfo[GetVehicleID(GetPlayerVehicleID(playerid))][cInvCell], ItemsInfo[CarInfo[GetVehicleID(GetPlayerVehicleID(playerid))][cInvCell]][itemColor])), i == 9 ? ("") : (","));

executeEvent(playerid, 0, (str_f("window.executeEvent('event.inventory.playerInventory', `[{\"action\":0,\"data\":{\"type\":12,\"items\":[%s]}}]`);", global_str)));

global_str = "";

for(new i; i < 10; i++)
f(global_str, sizeof(global_str), "%s{\"slot\":%i%s%s", global_str, i, CarInfo[GetVehicleID(GetPlayerVehicleID(playerid))][cInvCell][i + 10] == 0 ? "}" : (str_f(",\"item\":%i,\"amount\":1,\"text\":\"\",\"background\":%i,\"available\":1,\"time\":0}", CarInfo[GetVehicleID(GetPlayerVehicleID(playerid))][cInvCell][i + 10], ItemsInfo[CarInfo[GetVehicleID(GetPlayerVehicleID(playerid))][cInvCell][i + 10]][itemColor])), i == 9 ? ("") : (","));

executeEvent(playerid, 0, (str_f("window.executeEvent('event.inventory.playerInventory', `[{\"action\":0,\"data\":{\"type\":23,\"items\":[%s]}}]`);", global_str)));
executeEvent(playerid, 0, "window.executeEvent('event.inventory.updateCharacterTab',`[\"vehicle\"]`);");
}
else
{
executeEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', `[{\"action\":0,\"data\":{\"type\":10,\"items\":[{\"slot\":0},{\"slot\":1},{\"slot\":2},{\"slot\":3},{\"slot\":4},{\"slot\":5}]}}]`);");

global_str[0] = EOS;

for(new i; i < 6; i++)
f(global_str, 1024, "%s{\"slot\":%i%s%s", global_str, i, !AksSlot[playerid][0] ? "}" : (str_f(",\"item\":%i,\"amount\":1,\"text\":\"%s\",\"background\":%i,\"available\":1,\"time\":0}", AksSlot[playerid][0], !AksSlot[playerid][1] ? "" : (str_f("+%i", AksSlot[playerid][1])), ItemsInfo[AksSlot[playerid][0]][itemColor])), i == 5 ? "" : ",");

executeEvent(playerid, 0, (str_f("window.executeEvent('event.inventory.playerInventory', `[{\"action\":0,\"data\":{\"type\":2,\"items\":[%s]}}]`);", global_str)));

global_str[0] = EOS;

for(new i; i < 2; i++)
f(global_str, 1024, "%s{\"slot\":%i%s%s", global_str, i, !AksSlot[playerid][0] ? "}" : (str_f(",\"item\":%i,\"amount\":1,\"text\":\"%s\",\"background\":%i,\"available\":1,\"time\":0}", AksSlot[playerid][0][!i ? 7 : 6], !AksSlot[playerid][1][!i ? 7 : 6] ? "" : (str_f("+%i", AksSlot[playerid][1][!i ? 7 : 6])), ItemsInfo[AksSlot[playerid][0][!i ? 7 : 6]][itemColor])), i == 1 ? "" : ",");

executeEvent(playerid, 0, (str_f("window.executeEvent('event.inventory.playerInventory', `[{\"action\":0,\"data\":{\"type\":17,\"items\":[%s]}}]`);", global_str)));
executeEvent(playerid, 0, (str_f("window.executeEvent('event.inventory.playerInventory', `[{\"action\":0,\"data\":{\"type\":22,\"items\":[{\"slot\":0%s}]}}]`);", GetPlayerSkin(playerid) == 18 ? "" : (str_f(",\"item\":%i,\"amount\":1,\"text\":\"ID:%i\",\"available\":1,\"time\":0", GetSkinInfo(GetSkinInfo(GetPlayerSkin(playerid), 2), 1), GetSkinInfo(GetPlayerSkin(playerid), 2))))));
executeEvent(playerid, 0, "window.executeEvent('event.inventory.updateCharacterTab',`[\"character\"]`);");
}

return cursorPlayer(playerid, 0, true);
}
stock sendInventoryCEFButtonBits(buttons[])
{
new inventoryCefButtonsData[][][] =
{ {1, "Use"}, {32768, "Put"}, {2, "Put_on"}, {65536, "Take"}, {256, "Take_on"}, {64, "Item_open"}, {128, "Item_close"}, {4, "Drop"}, {8, "Split"}, {512, "Clear"}, {1024, "Install"}, {2048, "Edit"}, {4096, "Open"}, {8192, "Rent"}, {16384, "Color"}, {16, "Info"}, {32, "Close"}, {131072, "Sell"}, {262144, "PutInGift"} }, string_data[6][16], bits;

sscanf(buttons, "P<|>a<s[16]>[6]", string_data);

for(new id; id < 6; id++)
{
if(isnull(string_data[id]))
continue;

for(new i; i < sizeof(inventoryCefButtonsData); i++)
if(GetString(string_data[id], inventoryCefButtonsData[1]))
bits += inventoryCefButtonsData[0][0];
}

return bits;
}

cmd:test_int(playerid)
return sendInventoryCEF(playerid);

stock getInventoryPlayerButton(playerid)
{
new button = 0;

if(!IsPlayerInAnyVehicle(playerid) && !IsAOwnableCar(GetPlayerVehicleID(playerid)))
{
button = 1;
if(IsPlayerHaveBodyguard(playerid)) button += 4;
if(HouseEntered[playerid]+50 == GetPlayerVirtualWorld(playerid)) button += 64;
if(musorka[playerid] != -1) button += 1024;
}
if(IsPlayerInAnyVehicle(playerid) && IsAOwnableCar(GetPlayerVehicleID(playerid)))
{
button = 2;
button += 16;
}

return button;
}

stock dropItem(playerid, slot, slot_id = -1)
{
if(musorka[playerid] == -1)
return OtherInvClose(playerid);

else if(!ItemsInfo[Inventory[playerid][0][slot]][itemTradeable])
return SCM(playerid, COLOR_RED, "[Ошибка]{FFFFFF} Данный предмет нельзя передать!");

else if(Inventory[playerid][1][slot] == 1)
AddItemMusor(playerid, musorka[playerid], Inventory[playerid][0][slot], 1, Inventory[playerid][2][slot], Inventory[playerid][3][slot], Inventory[playerid][4][slot], Inventory[playerid][5][slot], 3540), ClearItem(playerid, slot, 1);

else if(Inventory[playerid][1][slot] > 1)
return PickInvent[playerid] = slot, PickInventSlot[playerid] = (slot_id == -1 ? GetInvID(playerid, slot, 1) : slot_id), SPD(playerid, 8248, DIALOG_STYLE_INPUT, "", "{FFFFFF}Введите количество, которое хотите положить", "Выбрать", "Отмена");

return true;
}
 
Статус
В этой теме нельзя размещать новые ответы.
Сверху