Remove Notify Flag from sv_cheats

Please post any questions about developing your plugin here. Please use the search function before posting!
User avatar
Kami
Global Moderator
Posts: 263
Joined: Wed Aug 15, 2012 1:24 am
Location: Germany

Remove Notify Flag from sv_cheats

Postby Kami » Mon Sep 03, 2012 10:38 pm

Hey guys I want to remove the notify flag from sv_cheats but no matter what I try I just cannot get it to work.
Could anyone help me out?

Kami
your-name-here
Developer
Posts: 168
Joined: Sat Jul 07, 2012 1:58 am

Postby your-name-here » Mon Sep 03, 2012 11:34 pm

You should be able to use the ICvar interface and the ConVar class to do what you want:

Syntax: Select all

# Imports
from Source import Cvar

# In globals
CvarEngine = Cvar.GetCvar()

# ... later in your code
sv_cheats = CvarEngine.FindVar("sv_cheats")
sv_cheats.RemoveFlags(Cvar.FCVAR_NOTIFY)


That should work. Let me know if you have further issues.
User avatar
Kami
Global Moderator
Posts: 263
Joined: Wed Aug 15, 2012 1:24 am
Location: Germany

Postby Kami » Mon Sep 03, 2012 11:48 pm

Works perfect thank you very much.

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 19 guests