This is a simple plugin giving players infinite canteen charges provided they have bought one.
Charges are refilled every second for each alive player with at least one charge in stock.
It is also my first submission, so if I did something wrong - please correct me without running me into the ground ;-;
Console Variables:
sm_infinitecanteens_enabled (0/1, default 1) - Controls if the plugin's functionality is enabled or not.
sm_infinitecanteens_admin (0/1, default 0) - Controls if the plugin's functionality requires special access in order to be used.
sm_infinitecanteens_togglable (0/1, default 1) - Controls if the plugin's functionality can be toggled per-user using commands.
sm_infinitecanteens_default (0/1, default 1) - Controls if the plugin's functionality should be enabled by default for players connecting, given they meet the criteria to use the plugin
sm_infinitecanteens_advertise (0 - disable, >0 - seconds, default: 120 seconds) - Controls the plugin's advertising feature. The advertisement shortly explains what the plugin does, how to use it, and its current state for the user.
sm_infinitecanteens_version - Plugin version. Don't touch, please
Overrides:
sm_infinitecanteens (default access: Generic (B)) - If
sm_infinitecanteens_admin is 1, this override will control access to the plugin's functions.
Instructions:
Drop the plugin into your sourcemod plugins folder (usually tf/addons/sourcemod/plugins/) and reload the server/load the plugin.
Plugin usage:
Out of the box, the plugin is enabled, requires no admin access, by default grants all users infinite charges, can be toggled per-user and will self-advertise each 120 seconds. All of those settings can be changed using the convars listed above.
Note: The advertisement will not display the 2nd line (To enable/disable the plugin for yourself) if you have disabled toggling.
You also have to buy the type you want at the upgrade station. From there, the plugin will assign you five charges repeatedly. If you change the type at the upgrade station at a later date, the changes will immediatelly take effect - you will have 5 charges of the new type.
Compiling:
The plugin only requires MoreColors.
Changelog:
1.0 - initial release
Plans/To-Do:
None for now.
Media:
- ConVar changes:
- More ConVar changes + advertisement
- Command Output
-- When toggling is disabled
-- When the plugin is disabled
-- When the user doesn't have sufficient access
- The HUD when the plugin is enabled:
Note that you will
ALWAYS have 5 charges when the plugin is enabled.