Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inventory Control Feature #169

Open
TeQTabanca opened this issue Oct 1, 2022 · 2 comments
Open

Inventory Control Feature #169

TeQTabanca opened this issue Oct 1, 2022 · 2 comments
Labels
enhancement New feature or request good first issue Easy contribution if you are a DEV looking to join the team

Comments

@TeQTabanca
Copy link

Description

This feature is optional, but I requested it because it is required in some game modes. This feature automatically knocks one down or disables one if the player has more than 2 identical weapons or the same weapon type. Finally, if the same weapon or the same weapon type is on the ground, it will not be given to the player.

Configuration

Item:
  Weapon_Type: <Custom_Name> | Example: Knife/Pistol/Shotgun/SMG/Rifle/Heavy_Gun/Rocket_Launcher
@TeQTabanca TeQTabanca added the enhancement New feature or request label Oct 1, 2022
@CJCrafter CJCrafter changed the title Weapon Type Feature Inventory Control Feature Oct 1, 2022
@CJCrafter
Copy link
Member

Possible implementation:

config.yml:

Inventory_Control:
  Deny_Pickup: <true/false> # disables player pickup item event
  Deny_Shoot: <true/false> # denies shooting
  Deny_Click: <true/false> # denies moving items from inventory to inventory
  Categories: # format is: weapon allowed_amount
  - rifle 1
  - melee 1
  - pistol 2

Then have an Inventory_Control option per weapon to decide which category it belongs to.

@CJCrafter CJCrafter added the good first issue Easy contribution if you are a DEV looking to join the team label Oct 1, 2022
@TeQTabanca
Copy link
Author

TeQTabanca commented Oct 17, 2022

I'm making a gui for players to buy weapons but I need some requirements to buy each weapon 1 time or 2 times.

By bringing PlaceholderAPI support,

  • %wm_player_check_weapon_type_<Custom_Name>% (True if the player has a weapon type in their inventory - False if there is no weapon type) ( This placeholder is to see if the player has any weapon types in their inventory.)

Example:
%wm_player_check_weapon_type_Rifle% (True if the player has a Rifle type weapon in their inventory - False otherwise)

  • %wm_player_check_weapon_type_amount_<Custom_Name>% ( If the player has any type of weapon in their inventory, it will transmit it as a number, otherwise it will show as 0)

Example:
%wm_player_check_weapon_type_amount_Rifle% => 2 ( In other words, there are 2 Rifle type weapons in the player's inventory.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Easy contribution if you are a DEV looking to join the team
Projects
None yet
Development

No branches or pull requests

2 participants