IConVar`1
Interfacepublic interface IConVar<T> : IConVarProperties
Whether the convar has a default value.
bool HasDefaultValue { get; }The max value of the convar. System.InvalidOperationException?text=Thrown+when+the+convar+is+not+a+min%2fmax+type+or+doesn%27t+have+a+max+value.
T MaxValue { get; set; }The min value of the convar. System.InvalidOperationException?text=Thrown+when+the+convar+is+not+a+min%2fmax+type+or+doesn%27t+have+a+min+value.
T MinValue { get; set; }The value of the convar. When setting, if the convar can be replicated, it will automatically replicate to all clients. Also, setting value with this method will internally put it into a set queue, Which means that for some special case ( e.g. setting sv_enablebunnyhopping inside a hook ) it won't work, in such cases you should use the SetInternal method instead.
T Value { get; set; }Methods
Query the value of the convar from specified client.
void QueryClient(int clientId, Action<string> callback)Replicate the value of the convar to specified client.
void ReplicateToClient(int clientId, T value)- clientIdintThe client id to replicate to.
- valueTThe value to replicate.
Internally set the value of the convar. Won't replicate the change to clients.
void SetInternal(T value)- valueTThe value to set.
Try to get the default value of the convar.
bool TryGetDefaultValue(out T defaultValue)- defaultValueTThe default value of the convar.
Try to get the max value of the convar.
bool TryGetMaxValue(out T maxValue)- maxValueTThe max value of the convar.
Try to get the min value of the convar.
bool TryGetMinValue(out T minValue)- minValueTThe min value of the convar.