About Give Item
Purpose of this plugin is to give players ability to give items to themselves and others using chat command. By default nothing is allowed to anyone, so you can load plugin safely and configure it afterwards. In default config there are multiple permissions. Think of them as different lists of items. You can add new or remove existing permissions as you prefer. If you grant giveto permission to player, he will be able to give items to other players. If player has this permission he will be able to click on the nickname at the top left of the UI and all players list will show up.
Note: For a player to appear in the list, he must be alive
## Permissions
- giveitem.giveto -- Allows the player to give items to other players.
-
giveitem.ignorelimit -- Allows the player to ignore limits.
More permissions with limits are created in config file (see Configuration section below)
## Commands
- /giveitem - Shows a user interface with a list of items by category.
## Configuration
- Default avatar used if Image Library is not loaded or no avatar image found
- Default amount used when the user interface is first loaded. The amount can be changed by pressing the buttons at the bottom of the screen.
- Show admins on player select page show / hide admins from player selection list
- Chat steamID icon used to set desired account icon in chat messages
- Log Level (Debug, Info, Warning, Off) used to set desired logging level
- Discord message enabled enable / disable sending messages to Discord (requires Discord Logger)
- Discord WebhookURL use this Webhook to send message in desired channel. Leave blank to send to default chanel.
- Exclude hidden items used to exclude items that have flag hidden (set by Facepunch). Should be used with caution since hidden items might be buggy/broken
- Items blacklist used to exclude items by shortname
- Commands list set desired chat command(s)
- Clear data on map change and Clear data on new save (wipe) are used for cleaning datafile with limits (cooldown)
-
Note: If you'll set Limit reset interval (seconds) to 0 it will disable limits for this permission. You can remove unnecessary default permissions and also add as many permissions as you want. For cases where the player has more than one, the permission with the higher priority will be applied.
Quote{ "Default avatar": "https://i.imgur.com/9GRIb3F.png", "Default amount": 1, "Show admins on player select page": false, "Chat steamID icon": 0, "Discord message enabled": false, "Discord WebhookURL": "", "Clear data on map change": true, "Clear data on new save (wipe)": true, "Popup close delay (seconds)": 5.0, "Commands list": [ "giveitem", "igive" ], "Permissions": [ { "Permission": "default", "Priority": 10, "Exclude hidden items": true, "Categories": [ "Medical" ], "Items blacklist": [ "blood" ], "Limit Total": 10, "Limit reset interval (seconds)": 86400.0, "Limits per category": { "Medical": 10 }, "Limits per item": { "antiradpills": 2, "bandage": 4, "largemedkit": 1, "syringe.medical": 1 } }, { "Permission": "vip", "Priority": 20, "Exclude hidden items": true, "Categories": [ "Items", "Attire", "Tool", "Medical", "Food", "Misc", "Fun" ], "Items blacklist": [ "bottle.vodka" ], "Limit Total": 10000, "Limit reset interval (seconds)": 86400.0, "Limits per category": { "Items": 100, "Medical": 10, "Food": 1000 }, "Limits per item": { "maxhealthtea.pure": 10, "healingtea.pure": 10 } }, { "Permission": "elite", "Priority": 30, "Exclude hidden items": true, "Categories": [ "Weapon", "Construction", "Items", "Resources", "Attire", "Tool", "Medical", "Food", "Ammunition", "Traps", "Misc", "Component", "Electrical", "Fun" ], "Items blacklist": [ "electric.generator.small", "mining.quarry", "mining.pumpjack", "explosives" ], "Limit Total": 100000, "Limit reset interval (seconds)": 7200.0, "Limits per category": { "Resources": 100000, "Ammunition": 10000 }, "Limits per item": { "sulfur": 10000, "sulfur.ore": 1000 } }, { "Permission": "admin", "Priority": 100, "Exclude hidden items": false, "Categories": [ "Weapon", "Construction", "Items", "Resources", "Attire", "Tool", "Medical", "Food", "Ammunition", "Traps", "Misc", "Component", "Electrical", "Fun" ], "Items blacklist": [], "Limit Total": 0, "Limit reset interval (seconds)": 0.0, "Limits per category": {}, "Limits per item": {} } ], "Log Level (Debug, Info, Warning, Error, Off)": "Off" }
## Localization
- Plugins phrases are available on 3 languages out of the box: English, Russian and Ukrainian
- Plugin supports Rust Translation API which allows you to have item names in any language supported by Rust
Quote{ "Error.Dead": "Giving items not allowed when dead!", "Error.Failed": "Failed to give item!", "Error.LimitCategory": "You have reached the limit of {0} items in this category! Cooldown: {1}", "Error.LimitItem": "You have reached the limit of {0} items of this type! Cooldown: {1}", "Error.LimitTotal": "You have reached the limit of {0} total items! Cooldown: {1}", "Error.NoPermission": "You do not have permission to use this command!", "Error.PlayerNotFound": "Player <color=#FFA500>{0}</color> not found!", "Format.Day": "day", "Format.Days": "days", "Format.DiscordEmoji": ":palm_down_hand:", "Format.DiscordMessage": "{0} <t:{1}:t> `{2}` **`{3}`** gave to `{4}` **`{5}`** `{6}` x{7}", "Format.Hour": "hour", "Format.Hours": "hours", "Format.LogMessage": "{0} {1} gave to {2} {3} {4} x{5}", "Format.Minute": "minute", "Format.Minutes": "minutes", "Format.Prefix": "<color=#00FF00>[Give Item]</color>: ", "Format.Second": "second", "Format.Seconds": "seconds", "Format.Title": "Give Item", "Format.ItemCategory.Medical": "Medical", "Format.ItemCategory.Items": "Items", "Format.ItemCategory.Attire": "Attire", "Format.ItemCategory.Tool": "Tool", "Format.ItemCategory.Food": "Food", "Format.ItemCategory.Misc": "Misc", "Format.ItemCategory.Fun": "Fun", "Format.ItemCategory.Weapon": "Weapon", "Format.ItemCategory.Construction": "Construction", "Format.ItemCategory.Resources": "Resources", "Format.ItemCategory.Ammunition": "Ammunition", "Format.ItemCategory.Traps": "Traps", "Format.ItemCategory.Component": "Component", "Format.ItemCategory.Electrical": "Electrical" }
## Developer Hooks
### OnPlayerGiveItem
object OnPlayerGiveItem(BasePlayer player, BasePlayer playerTarget, Item item)
Called when a player tries to give item to another player. If player is trying to give himself an item playerTarget will be the same as player. Returning a non-null value (default true) prevents item from being gaved.