Ну так и есть, нужно "фиксить" плагин.Скар не ограничивает. Пишет, что оружие ограничено, но при этом все равно оно доступно.
Это хорошо, но нужно, чтобы у випов был доступ. Так и обычный рестрикт справляется.Ну так и есть, нужно "фиксить" плагин.
P.S. Хотел создать ещё утром тему по похожему поводу, но возможно тебе поможет моя: Делаем Eazy Weapon Restrict
/*
decl Handle:hBuffer, String:sBuffer[PLATFORM_MAX_PATH];
hBuffer = OpenFile("addons/sourcemod/data/vip/modules/vip_restrict_weapons.ini", "r");
if(hBuffer != INVALID_HANDLE)
{
while (IsEndOfFile(hBuffer) == false && ReadFileLine(hBuffer, sBuffer, sizeof(sBuffer)))
{
if(sBuffer[0])
{
Format(sBuffer, sizeof(sBuffer), "weapon_%s", sBuffer);
new WeaponID:id = GetWeaponID(sBuffer);
if(id != WEAPON_NONE)
{
PushArrayCell(g_hVIP_RestrictWeaponArray, id);
}
}
}
CloseHandle(hBuffer);
}
*/
PushArrayCell(g_hVIP_RestrictWeaponArray,23);
...
PushArrayCell(g_hVIP_RestrictWeaponArray,25);
enum WeaponID
{
WEAPON_NONE = 0, //0
WEAPON_P228, //1
WEAPON_GLOCK, //2
WEAPON_SCOUT, //3
WEAPON_HEGRENADE, //4
WEAPON_XM1014, //и так далее
WEAPON_C4, // ну вы поняли
WEAPON_MAC10,
WEAPON_AUG,
WEAPON_SMOKEGRENADE,
WEAPON_ELITE,
WEAPON_FIVESEVEN,
WEAPON_UMP45,
WEAPON_SG550,
WEAPON_GALIL,
WEAPON_FAMAS,
WEAPON_USP,
WEAPON_AWP,
WEAPON_MP5NAVY,
WEAPON_M249,
WEAPON_M3,
WEAPON_M4A1,
WEAPON_TMP,
WEAPON_G3SG1,
WEAPON_FLASHBANG,
WEAPON_DEAGLE,
WEAPON_SG552,
WEAPON_AK47,
WEAPON_KNIFE,
WEAPON_P90,
WEAPON_SHIELD,
WEAPON_KEVLAR,
WEAPON_ASSAULTSUIT,
WEAPON_NIGHTVISION,
WEAPON_GALILAR,
WEAPON_BIZON,
WEAPON_MAG7,
WEAPON_NEGEV,
WEAPON_SAWEDOFF,
WEAPON_TEC9,
WEAPON_TASER,
WEAPON_HKP2000,
WEAPON_MP7,
WEAPON_MP9,
WEAPON_NOVA,
WEAPON_P250,
WEAPON_SCAR17,
WEAPON_SCAR20,
WEAPON_SG556,
WEAPON_SSG08,
WEAPON_KNIFE_GG,
WEAPON_MOLOTOV,
WEAPON_DECOY,
WEAPON_INCGRENADE,
WEAPON_DEFUSER
};
@NorthPublic, Подскажи что я не так делаю
ClearArray(g_hVIP_RestrictWeaponArray);
/*
decl Handle:hBuffer, String:sBuffer[PLATFORM_MAX_PATH];
hBuffer = OpenFile("addons/sourcemod/data/vip/modules/vip_restrict_weapons.ini", "r");
if(hBuffer != INVALID_HANDLE)
{
while (IsEndOfFile(hBuffer) == false && ReadFileLine(hBuffer, sBuffer, sizeof(sBuffer)))
{
if(sBuffer[0])
{
Format(sBuffer, sizeof(sBuffer), "weapon_%s", sBuffer);
new WeaponID:id = GetWeaponID(sBuffer);
if(id != WEAPON_NONE)
{
PushArrayCell(g_hVIP_RestrictWeaponArray, id);
}
}
}
CloseHandle(hBuffer);
}
*/
PushArrayCell(g_hVIP_RestrictWeaponArray,9);
PushArrayCell(g_hVIP_RestrictWeaponArray,13);
PushArrayCell(g_hVIP_RestrictWeaponArray,23);
PushArrayCell(g_hVIP_RestrictWeaponArray,24);
Описание:
1) Позволяет Админам запрещать или ограничивать определенное оружие!
2) Также можно запретить для определенной команды, СТ или Т!
3) Имеется возможность поставить ножевой раунд или раунд на пистолетах!
4) Также в плагине имеется свой Разминочный раунд на гранатах и т.д
5) Админы могут сбрасывать бомбу С4 с Террориста!
6) Плагин добавляется сам в Основное админ-меню СурсМода
Этот плагин копия [CSS/CS:GO] Weapon...
я наверное просто поправлю его и добавлю нормальный форвард в официальную версию. чтобы под каждую обнову не делать модульФеля добавил(а) новый ресурс:
[VIP] Weapon Restrict - Ограничение оружия
Узнать больше об этом ресурсе...
Феля добавил(а) новый ресурс:
[VIP] Weapon Restrict - Ограничение оружия
Узнать больше об этом ресурсе...
L 12/13/2019 - 23:08:09: [SM] Exception reported: Array index out-of-bounds (index 63, limit 55)
L 12/13/2019 - 23:08:09: [SM] Blaming: weapon_restrict.smx
L 12/13/2019 - 23:08:09: [SM] Call stack trace:
L 12/13/2019 - 23:08:09: [SM] [1] Line 202, restrictinc/events.sp::CS_OnBuyCommand
L 12/13/2019 - 22:42:50: [SM] Exception reported: Weapon slot index 5 is invalid.
L 12/13/2019 - 22:42:50: [SM] Blaming: weapon_restrict.smx
L 12/13/2019 - 22:42:50: [SM] Call stack trace:
L 12/13/2019 - 22:42:50: [SM] [0] ThrowNativeError
L 12/13/2019 - 22:42:50: [SM] [1] Line 422, restrictinc/natives.sp::Native_GetWeaponIDFromSlot
L 12/13/2019 - 22:42:50: [SM] [3] Restrict_GetWeaponIDFromSlot
L 12/13/2019 - 22:42:50: [SM] [4] Line 293, restrictinc/natives.sp::Native_GetTeamWeaponCount
L 12/13/2019 - 22:42:50: [SM] [6] Restrict_GetTeamWeaponCount
L 12/13/2019 - 22:42:50: [SM] [7] Line 544, restrictinc/natives.sp::Native_CanPickupWeapon
L 12/13/2019 - 22:42:50: [SM] [9] Restrict_CanPickupWeapon
L 12/13/2019 - 22:42:50: [SM] [10] Line 67, restrictinc/events.sp::OnWeaponCanUse
L 12/13/2019 - 22:42:50: [SM] [12] GivePlayerItem
L 12/13/2019 - 22:42:50: [SM] [13] Line 62, C:\Users\September\Desktop\COMPILE\scripting\vip_shield.sp::ePS
Да, у меня ещё и P90запретить скорострелки для випов даже если у них есть имунитет?
Сделаешь?запретить скорострелки для випов даже если у них есть имунитет?
L 01/11/2020 - 13:26:07: [SM] Exception reported: Array index out-of-bounds (index 63, limit 56)
L 01/11/2020 - 13:26:07: [SM] Blaming: weapon_restrict.smx
L 01/11/2020 - 13:26:07: [SM] Call stack trace:
L 01/11/2020 - 13:26:07: [SM] [1] Line 202, restrictinc/events.sp::CS_OnBuyCommand
i try to fix thisHello, thank you a lot for this plugin, works very well, it has only one problem for me:
[SM] Blaming: weapon_restrict.smx
[SM] Call stack trace:
[SM] [1] Line 202, restrictinc / events.sp :: CS_OnBuyCommand
[SM] Exception reported: Array index out-of-bounds (index 63, limit 55)
EDIT: Other problem found, when someone is trying a lot to pick up a weapon and it's spamming the message, server freezes for 1 sec.
Добавлен новый Cvar:
sm_weapon_restrict_print_delay - Интервал между сообщениями
[QUOTE = "Felya, post: 452470, member: 94099"]
Felya updated the [VIP] Weapon Restrict [/ plain][/URL] resource with a new entry:
[URL='https://hlmod.ru/resources/vip-weapon-restrict.1417/update/3836/'][plain] 3.1.8 [/ plain]
Learn more about this update ...[/URL]
[/ QUOTE]
Can you fix this please?
[SM] Exception reported: Array index out-of-bounds (index 63, limit 56)
[SM] Blaming: weapon_restrict.smx
[SM] Call stack trace:
[SM] [1] Line 202, restrictinc / events.sp :: CS_OnBuyCommand