example command for jogi. I've not tested that it even compiles.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4000 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
5f12e8c9dd
commit
db9388a297
2 changed files with 25 additions and 0 deletions
|
@ -1081,3 +1081,26 @@ float(float keycode, float unicode, vector *curmousepos_in, vector mousediff) ed
|
|||
|
||||
return FALSE;
|
||||
};
|
||||
|
||||
float(string str) CSQC_ConsoleCommand =
|
||||
{
|
||||
local float numargs;
|
||||
numargs = tokenize(str);
|
||||
switch(argv(0))
|
||||
{
|
||||
case "examplecommandforjogi":
|
||||
print("Hello jogi, did this work?\n");
|
||||
print(argv(1), "\n");
|
||||
return TRUE;
|
||||
case "crashandcatchfire":
|
||||
print("Yeah, you're probably going to regret that\n");
|
||||
localcmd("unbindall\ncfg_save\nalias quit say ahaha\n");
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
};
|
||||
void() Cam_Init =
|
||||
{
|
||||
registercommand("examplecommandforjogi");
|
||||
// registercommand("crashandcatchfire");
|
||||
};
|
||||
|
|
|
@ -236,6 +236,8 @@ float (float event, float parama, float paramb) CSQC_InputEvent =
|
|||
|
||||
void(float prevprogs) init =
|
||||
{
|
||||
Cam_Init();
|
||||
|
||||
if (prevprogs >= 0)
|
||||
{
|
||||
/*its easy to wrap a builtin*/
|
||||
|
|
Loading…
Reference in a new issue