Search the Community
Showing results for tags 'developer api'.
-
Version 1.0.5
117 downloads
Introduction CustomRewards is a turnkey solution to reward player engagement. This plugin allows you to give a player any type of reward based on conditions you'll be able to configure. Whether you're a server admin aiming to boost player engagement or a developer creating complex reward systems, CustomRewards is your go-to solution. Main Features: Diversity of Rewards: Set up a huge variety of rewards for your players, ranging from items to special permissions, including server command execution. Reward Templates: Create different reward models for various events or scenarios, providing maximum flexibility to meet your server's needs. Award Conditions: Ensure only eligible players receive certain rewards by setting conditions based on groups, permissions, and more. Integration with Other Plugins: CustomRewards isn't just a standalone, it can also be seamlessly integrated with other externals plugins such as VoteSystem or PlaytimeTracker : Vote System : By using Custom Reward with VoteSystem, your players will be able to obtain rewards by voting. PlayTime Reward (free) : By using CustomRewards with PlaytimeTracker, your players will be able to obtain rewards based on their playtime. Interface Customization Provide your players with an appealing visual experience with a fully customizable user interface, custom reward images, and colorful themes. Expandability for Developers For those looking to delve deeper, CustomRewards offers a robust API, allowing you to integrate your own point system or even other plugins ! Plugin's Future: We always listen to the community! If you have a specific plugin you'd like to see integrated with CustomRewards, please let us know. Our goal is to make CustomRewards as versatile and useful as possible for all users. Support : I am very often available and will respond as quickly as possible to all your questions, here or on my Discord: https://discord.gg/JJnxFgP27G. Full Documentation : Feel free to check out the complete documentation here. Commands (chat) : - /CustomRewards_Give <type> <player name or id> <quantity> : available only for administrators or with permission CustomRewards.Admin - The commands to show the UI need to be implemented in the configuration. Permissions : - CustomRewards.Admin : enable admin commands if not administrator - CustomRewards.<Type>.Use : Permission linked to the type (rewards template), users without the permission will not be able to use the command to display the UI. Therefore, it's important to add the permission to your groups once the template is created! How To use API : private void Give_API(string rewardType, ulong playerId, int quantity) // Add quantity points for player (for referenced rewardType) private int Get_API(string rewardType, ulong playerId) // Get quantity points for player (for referenced rewardType) CustomRewards Configuration Tutorial Step 1: Initial Setup : - Ensure the CustomRewards_rewards folder is present in Oxide/Data. If not, the plugin will attempt to create it automatically, but it's good to check. - Ensure - For each reward type you want to configure, create a .json file in the CustomRewards_rewards folder. For instance, for a reward type called "VIP", you might have a VIP.json file. Step 2: Basic Configuration In your .json file: - "Enabled": Set this value to true to activate this reward type. - "Commands for show UI": List of commands that will display the user interface for this reward type. For example: ["rewards_vip", "vip_rewards"]. Step 3: User Interface Configuration Under "UI Settings": - Configure the appearance and layout of the user interface with properties like "Max Reward By Page", "Window Rect", etc. - Set the theme colors under "Theme" using properties like "Colors". Each color is defined by an RGBA value. - Configure rarity colors under "Rarity Colors". - To modify the window title or description (above the rewards), go through the lang files (Oxide/Lang/<lang>/CustomRewards_<type>). Example Lang file : { "Messages": { "Title": "Rewards", "Description": "Every time you earn points, you can claim your rewards here." } } Step 4: Reward Configuration Under "Rewards Settings": - "Rewards List": Here, you'll define each individual reward for this type. - "Rarity (Common - Rare - Epic - Legendary)": Set the reward's rarity. - "Quantity": If the reward is an item, set the quantity here. - "Item Shortname (optional)": If the reward is an item, set its short name here. - "Custom image URL (optional)": For a custom image for the reward. - "Server command (optional)": Commands to execute when this reward is claimed. - "Grant Permissions ": Permissions to grant when this reward is claimed. - "Grant Groups": Groups to grant when this reward is claimed. - "Nedded Permissions": Permissions needed to claim this reward. - "Nedded Group ": Groups needed to claim this reward. Step 5: Plugin Extensions Under PluginExtensions, you can configure integration with other plugins: - For PlaytimeTracker, use properties under "PlayTimeTracker" like "Count Afk Time?", "Added points", and "Add point every (in seconds)". Step 6: Save and Reload After completing your configuration, save the .json file and reload the plugin on your server. Here's a sample configuration file to help you get started:$5.99 -
Version 1.0.0
56 downloads
The PlayerEventStates plugin provides a system to manage and track event states for individual players and globally across the server. This system can be particularly useful for developers who wish to create conditional gameplay mechanics based on specific events or states. Features Player-Specific Event States: Allows tracking of individual player event states. Global Event States: Provides a mechanism to track global events that apply server-wide. API Access: Exposes several API methods for developers to interact with the system, making it versatile for integration with other plugins or custom scripts. Data Persistence: Ensures that both player-specific and global event states are saved and can be loaded across server restarts. API Methods (For Developers) GetEventStatePlayer_API(ulong playerId, string eventName); // Fetches the event state for a specific player. GetEventStateGlobal_API(string eventName); // Retrieves the global event state. SetEventStatePlayer_API(ulong playerId, string eventName, bool value); // Sets the event state for a specific player. SetEventStateGlobal_API(string eventName, bool value); // Modifies the global event state. PlayerHasRecquiredStates_API(ulong playerId, Dictionary<string,bool> states); //Checks if a player meets specific event state conditions. Usage Examples Quest Systems: If you're developing a quest system, you can use event states to track a player's progress. For instance, if a player completes a task, you can set an event state to true. This can then influence future interactions or dialogues with NPCs. Dynamic World Events: Global event states can be used to track server-wide events. For example, if a server-wide event like a festival is active, you can set a global event state. This could change interactions or available quests for all players. Conditional Dialogues: As mentioned, integration with the Dialogs plugin can lead to dynamic dialogues. An NPC might have different dialogues for players who have or haven't completed specific tasks. Setup & Configuration Ensure the PlayerEventStates plugin is installed on your server. The plugin will automatically create necessary data files in the oxide/data/PlayerEventStates directory. Developers can directly interact with the plugin using the provided API methods. Note for Developers: When developing with this plugin, pay special attention to the variables ending with _API. These are the methods you'll primarily interact with to get or set event states. Conclusion The PlayerEventStates plugin is a powerful tool for developers looking to add depth and dynamism to their Rust servers. By tracking both player-specific and global event states, it opens up a plethora of gameplay possibilities, especially when combined with plugins like Dialogs. Whether you're crafting a complex quest system or just want NPCs to recognize player achievements, PlayerEventStates is a valuable addition to your plugin arsenal. Support : You can also contact me via discord : https://discord.gg/JJnxFgP27GFree- 1 comment
-
- 2
-
- #development
- #developer api
-
(and 5 more)
Tagged with:
-
Version 1.0.5
696 downloads
A lightweight API that allows other plugins to place markers on the map. On its own it serves no purpose. Developer API: position: world position of the marker entity: the entity the marker is attached to uname: unique name of the marker, used when removing it ownerid: marker is only visible to player with that id duration: time before the marker will be removed automatically refreshRate: time between marker refesh, useful for markers attached to entities radius: radius of the circle on the map displayName: name of the marker on the map colorMarker: color of the marker, in hex format colorOutline: color of the marker outline, in hex format with transparency Create a map marker visible for everyone at a given position. Returns false when a marker with the given name already exists. (bool) API_CreateMarkerPublic (Vector3 position, string uname, int duration = 0, float refreshRate = 3f, float radius = 0.4f, string displayName = "Marker", string colorMarker = "00FFFF", string colorOutline = "00FFFFFF") Create a map marker visible for everyone attached to an entity. Returns false when a marker with the given name already exists. (bool) API_CreateMarkerPublic (BaseEntity entity, string uname, int duration = 0, float refreshRate = 3f, float radius = 0.4f, string displayName = "Marker", string colorMarker = "00FFFF", string colorOutline = "00FFFFFF") Create a map marker only visible for a certain player at a given position. Returns false when a marker with the given name already exists. (bool) API_CreateMarkerPrivate (Vector3 position, string uname, ulong ownerid, int duration = 0, float refreshRate = 3f, float radius = 0.4f, string displayName = "Marker", string colorMarker = "00FFFF", string colorOutline = "00FFFFFF") Create a map marker only visible for a certain player attached to an entity. Returns false when a marker with the given name already exists. (bool) API_CreateMarkerPrivate (BaseEntity entity, string uname, ulong ownerid, int duration = 0, float refreshRate = 3f, float radius = 0.4f, string displayName = "Marker", string colorMarker = "00FFFF", string colorOutline = "00FFFFFF") Remove map marker (fast) (bool) API_RemoveCachedMarker (string uname) Remove map marker (slow, use only if marker is not cached) (void) API_RemoveMarker (string uname) Credit: Credit to https://umod.org/user/DezLife for the original plugin. This plugin is a fork of https://umod.org/plugins/marker-managerFree- 5 comments