View Single Post
Author Message
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 10-01-2013 , 12:15   [ANY] ConVar Faker
Reply With Quote #1

[ANY] ConVar Faker

v1.0.0

Description:
Allows you to customize the value of client-side replicated cvars for clients. Some possible use-cases are to mask the value of sv_downloadurl in the console (the actual URL is still fairly easily obtainable), to enable the wait command only for admins, or to allow some users to use client-side cheats.

Cvars:
  • cvar_faker_version - plugin version
  • cvar_faker_auto_update - enables automatic updating (has no effect if Updater is not installed)

Configuration:
This plugin requires a configuration file under configs/cvar_faker.cfg in your SourceMod directory.

Here is an example file:

Code:
"ConVar_Faker"
{
	"sv_cheats" // Enable sv_cheats on the client-side for root admins (allows client-side cheat commands)
	{
		"flags"			"z"
		"value"			"1"
	}
	
	"sv_downloadurl" // Mask sv_downloadurl for all players (this doesn't provide any real security)
	{
		"value"			"*** PROTECTED ***"
	}
	
	"tf_weapon_criticals" // Disable client-side crit effects for people without the "a" flag
	{
		"flags"			"a"
		"flagtype"		"not"
		"value"			"0"
	}
	
	"sv_allow_wait_command" // Allow the wait command for people with the "a" flag
	{
		"flags"			"a"
		"value"			"1"
	}
}
Each section's name should be the cvar's name. Each section requires a "value" field for the value to send to clients. "flags" is optional and will determine if a value is sent to a client based on their admin flags. "flagtype" is also optional and will default to "any". Possible values for "flagtype" are:
  • any - Client must have any of the flags listed
  • all - Client must have all of the flags listed
  • not - Client must not have any of the flags listed

Installation:
Put convarfaker.smx into /addons/sourcemod/plugins, and reboot your server or type "sm plugins load convarfaker" into your console or rcon.

Auto Update:
Install Updater. The plugin will be auto-updated according to your Updater settings. It'll work without Updater.

Changelog:
  • v1.0.0 (10/1/13)
    • Initial release

Download Plugin (convarfaker.smx)
View Source (convarfaker.sp)


Requires updater.inc and mckayupdater.sp to compile.
__________________

Last edited by Dr. McKay; 07-14-2020 at 05:01.
Dr. McKay is offline