Configuration:
/sourcemod/data/modelreserve.txt: Automatically generated on initial plugin load, use it to configure which models to reserve, then reload it with the console command 'sm_modelreservation_reload'. (Keyvalues format, only edit this if you know what you're doing!)
Commands & Console Variables:
sm_reservemodel - Reserves your current model for use by yourself (requires 'Cheats' admin flag).
sm_reservemodelid <Steam ID> <full model path> - Reserves the specified model for use by the specified Steam ID (requires both 'Cheats' and 'Rcon' admin flag).
sm_unreservemodel <model path as listed in keyvalues (server only)> - This is a dynamic command that operates differently depending on whether it is entered into the server console or a client's console. Server console: Unreserves the specified model from all clients, making it public again. Client console: Unreserves your current model from only yourself, others reserving the model remain unaffected. (requires 'Cheats' admin flag).
sm_unreservemodelid <Steam ID> <full model path> - Unreserves the specified model from the specified Steam ID (requires both 'Cheats' and 'Rcon' admin flag).
sm_modelreservation_reload
sm_modelreserve_reload
sm_reservemodel_reload
Aliased server-side console commands to force a reload of the Model Reservation config file.
sm_modelreservation_action - Action to perform on a client who attempts to use a reserved model unsuccessfully. (0 = kick, 1 = ban), defaults to 0.
sm_modelreservation_maxstrikes - Number of strikes a player can get before the action specified by 'sm_modelreservation_action' is performed (-1 to disable), defaults to 5.
sm_modelreservation_banduration - Sets the ban duration for offending players (only applicable if 'sm_modelreservation_action' is 2, use 0 for a permanent ban but, really, that's unnecessarily harsh!), defaults to 5.
Dependencies:
None.
Installation:
- Place modelreservation.smx into the /sourcemod/plugins directory.
- Place modelreservation.phrases.txt into the /sourcemod/translations directory. (Don't forget to install the translations for other languages as well!)
Changelog:
Code: Select all
Version 1.0.1.1
-----------------------
+ Added exploit fix for illegal model changing
Version 1.0.1
-----------------------
! Fixed players potentially getting set to default models of the incorrect gender upon denial
! Fixed incorrect command description for command sm_unreservemodelid
! Removed 'Rcon' admin flag requirement for command sm_unreservemodel
! Changed command sm_unreservemodel to work in two modes:
- Entered into the server console, it requires a model to be specified (and removes ALL Steam ID entries for that model, similar to how it worked back in 1.0.0)
- Entered into a client's console, it always uses the client's current model instead (no support for manual model specification)
- Removed 'warn' option from ConVar sm_modelreservation_action (set sm_modelreservation_maxstrikes to -1 instead for the same effect)
+ Added 'strikes' system, controlled by a new ConVar sm_modelreservation_maxstrikes
+ Added new command aliases sm_modelreserve_reload and sm_reservemodel_reload
+ Added Japanese translations (thanks, Snowman7!)
Version 1.0.0
-----------------------
Initial release
In case you haven't already noticed, this is a plugin for server operators, not clients.
Known Bugs/Limitations/Future Improvements:
- Only model paths that begin with models/player/ are supported.
- An alternate mode to permit non-admins to reserve their model (and only if they can actually use it; might not be implemented due to concerns regarding abuse).
- Per-model configuration of actions to be taken on clients who attempt to use the model unsuccessfully.
Download:
Get Plugin or Get Source
Browse all released versions here.
P.S.: I understand that this plugin may be rather controversial, therefore, please feel free to delete this thread if it is deemed inappropriate. Guess that's not necessary, after all.