Silenci0 / SMAC

Sourcemod Anti-Cheat
Other
155 stars 56 forks source link

Question cvars plugin #34

Closed lunatixxx closed 3 years ago

lunatixxx commented 4 years ago

If add a cvar to server.cfg is it protected automatically ? Or do i have to add it manually into smac.cfg with "smac_addcvar cvar comparison type action value" ?

Silenci0 commented 4 years ago

If you are asking whether or not the plugin automatically protects a cvar found in server.cfg, then no it does not. To list a cvar as protected by the plugin, you will need to add it to server.cfg (you can also put this in in smac.cfg or sourcemod.cfg if you'd rather put them there instead) formatted like so:

smac_addcvar <cvar> <comparison type> <action> <value> <value2 if bound>

Each cvar you want protected/monitored will need its own line, so you cannot add multiple cvars to "smac_addcvar". Value 2 is not necessary for most cvars unless using the "between" comparison type. You can find the comparison and action types on the wiki here: https://github.com/Silenci0/SMAC/wiki/ConVar-Checker

lunatixxx commented 4 years ago

If i want to protect a "sv_thing" cvar, i guess the correct comparison is "replicate" then. Thanks