write switch.txt

来自「* first open client.cpp and search for t」· 文本 代码 · 共 28 行

TXT
28
字号
Well for instance .. if you wanted to create a CVAR in a hack in the public sources around here... heres an example



PHP:--------------------------------------------------------------------------------
You just add the desired cvar name next to 'cvar.'
//========
if (cvar.aswitch == 1) { 
  cmd.exec("alias sigswitch #slot2");
 else {
 cmd.exec("alias sigswitch");
 }
}
//=========

Once you write your code like that you need to register it in the 'CVARList'. This can be located in the cvar.cpp & cvar.h..
IN CVAR.CPP
                cvarname , default value
//=========
REGISTER_CVAR_INT( aswitch ,1)
//=========

IN CVAR.H
//=========
int aswitch;
//=========

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?