View Single Post
Author Message
GiZZoR
Junior Member
Join Date: Sep 2013
Old 03-30-2016 , 04:18   [INS] Supply Point Manager
Reply With Quote #1

[INS] Supply Manager

This is my first plugin.

Description/Features
I wrote this plugin to address what I feel is a missing feature from the game: Restore your gained supply points.
Many players on the server I operate often struggle with connection drops, and under "stock" conditions, when they reconnect their supply points (in-game "money") is reset.
This plugin will set the supply points for players when joining a teamchanging role/class.
It will determine and give highest possible supply points to the player, based on settings completed (CVars below).

The plugin's default functionality is to restore the player's supply points as stored on round start, but you can also choose alternate functionality (Team Average, Team Lowest).

Note: Supply points of bots will not be stored or set, but is used by Team Average / Team Lowest.

Commands
sm_supply <client> (points)
If (points) not provided, will display player's supply points, else will set player's supply to number provided.

CVARS
sm_supply_enabled <0/1>
"Boolean": Enable/disable plugin. Default: 1 (Enabled)
sm_supply_base #
"Int": Number of supply points to give players. Default: 12
sm_supply_restore <0/1>
"Boolean": Enable/disable restoring player's gained supply points. Default: 1 (Enabled)
sm_supply_join <0,1,2,3>
"Int": Enable/disable setting supply points for new players. Default: 0 (Disabled)
0 - Disabled (Default)
1 - Give new player base supply as set in sm_supply_base. Note: You may want to set this per game mode in server_<mode>.cfg (TIP: easier to use: sm_cvar mp_supply_token_base)
2 - Team Lowest: Give new player the same supply as lowest member in team (Useful for multiple rounds of coop play)
3 - Team Average: Give new player the team average of supply points (sum all players supply points divided by players)

Changelog
0.3 - Added common translations
0.2 - "ALPHA" Added Join and Rejoin cvars
0.1 - Initial build. CVar and Token testing

Future Development
- Store supply points on change during round (support game modes survival/outpost)
and / or
- Store supply points on player disconnect
- Add "recover" from file / db to recover from server crash (rare)
- Add "ignore bots" cvar for team supply calculations (low,avg)
Attached Files
File Type: sp Get Plugin or Get Source (ins_supply.sp - 1131 views - 7.8 KB)

Last edited by GiZZoR; 06-22-2016 at 08:08. Reason: Updated description (role), new version
GiZZoR is offline