View Single Post
Author Message
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 04-23-2020 , 05:14   [NMRiH] Equipment 1.0.1 [2021/09/04]
Reply With Quote #1

Name: Equipment

Description: A menu with which players can get weapons, tools, medicines and more.
Console variables allow you to configure access to various categories of things. You can also configure what information about the item will be visible in the menu.
Menu can be called either by a command !guns or by a combination of keys 1 + 2 ("+inventory" and "+ammoinv"). Additional information about carry-over items can be turned on by a combination of keys C + 2 ("+compass" and "+ammoinv");
Name:  20200423113314_1.jpg
Views: 3030
Size:  31.5 KB Name:  20200423113322_1.jpg
Views: 3056
Size:  37.8 KB Name:  20200423122103_1.jpg
Views: 3027
Size:  45.8 KB Name:  20200423113314_2.jpg
Views: 2950
Size:  21.5 KB
Name:  20200423122103_2.jpg
Views: 3006
Size:  16.6 KB
Full screenshots: fist, second and third

CVars:
  • sm_equipment_info - Add info about items: 1 - weight, 2 - ammo, 4 - kill cost (bullets or stamina)
  • sm_equipment_spawn - Show menu for a player who has just been spawned
  • sm_equipment_players - Allowed types for players
    *Types of items: 1 - pistols, 2 - rifles, 4 - semiauto, 8 - auto, 16 - shotguns, 32 - melee, 64 - tools, 128 - medicines, 256 - explosives, 512 - ammo
    *E.g. enable all exept explosives: 1 + 2 + 4 + 8 + 16 +32 + 64 + 128 + 512 = 767
  • sm_equipment_admins - Allowed types for admins
    *If any type of items is disabled for administrators, but enabled for players, then administrators can also get these type.

You can also change the order of the items in the category menu: just swap the values ​​in the ORDER array (at line 121).

Installation: Place compiled plugin (nmrih_equipment.smx) into the plugins folder (../addons/sourcemod/plugins/).
Extract the translation files from nmrih_equipment translations.zip to the translations folder (../addons/sourcemod/translations/).

Changes in v1.0.1 [2021/09/04]:
  • Fixed bug, when plugin gave items to dead players.
  • Fixed not displaying the menu for a player who has just been spawned regardless of the corresponding convar in NMRiH v1.11.5.
  • Fixed compilation error when using SM1.11+
Changes in v1.0.1 [2021/11/20]:
  • Fixed error "Invalid client index"
Plugin sources at GitHub.
Attached Files
File Type: zip nmrih_equipment translations.zip (3.6 KB, 671 views)
File Type: sp Get Plugin or Get Source (nmrih_equipment 1.0.0.sp - 987 views - 18.5 KB)
File Type: sp Get Plugin or Get Source (nmrih_equipment 1.0.1.sp - 339 views - 18.8 KB)
File Type: sp Get Plugin or Get Source (nmrih_equipment 1.0.1_20.11.2021.sp - 643 views - 18.6 KB)
__________________

Last edited by Grey83; 11-20-2021 at 04:25. Reason: Updated plugin: fixed error
Grey83 is offline