}
default:
+ print("Incorrect parameters for \"adminmsg\"\n");
case GC_REQUEST_USAGE:
print("\nUsage: sv_cmd adminmsg clientnumber \"message\" [infobartime]\n");
print(" If infobartime is provided, the message will be sent to infobar.\n");
return;
default:
+ print("Incorrect parameters for \"anticheat\"\n");
case GC_REQUEST_USAGE:
print("\nUsage: sv_cmd anticheat clientnumber\n");
print(" where clientnumber is player entity number.\n");
}
default:
+ print("Incorrect parameters for \"bot_cmd\"\n");
case GC_REQUEST_USAGE:
print("\nUsage: sv_cmd bot_cmd client command [argument]\n");
print(" 'client' can be either the name or entity id of the bot\n");
}
default:
+ print("Incorrect parameters for \"database\"\n");
case GC_REQUEST_USAGE:
print("\nUsage: sv_cmd database action filename\n");
print(" Where action is the command to complete,\n");
}
default:
+ print("Incorrect parameters for \"defer_clear\"\n");
case GC_REQUEST_USAGE:
print("\nUsage: sv_cmd defer_clear clientnumber\n");
print(" where clientnumber is player entity number.\n");
}
default:
+ print("Incorrect parameters for \"delrec\"\n");
case GC_REQUEST_USAGE:
print("\nUsage: sv_cmd delrec ranking [map]\n");
print(" ranking is which ranking level to clear up to, \n");
return;
default:
+ print("Incorrect parameters for \"find\"\n");
case GC_REQUEST_USAGE:
print("\nUsage: sv_cmd find classname\n");
print(" Where classname is the classname to search for.\n");
return;
default:
+ print("Incorrect parameters for \"gametype\"\n");
case GC_REQUEST_USAGE:
print("\nUsage: sv_cmd gametype mode\n");
print(" Where mode is the gametype mode to switch to.\n");
}
}
+void GameCommand_gettaginfo(float request, string command) // UNTESTED // todo: finish usage description for it (but, must first learn this shit)
+{
+ entity tmp_entity;
+ float argc = tokenize_console(command), i;
+ vector v;
+ switch(request)
+ {
+ case GC_REQUEST_HELP:
+ print(" gettaginfo - Get specific information about a weapon model\n");
+ return;
+
+ case GC_REQUEST_COMMAND:
+ if(argc >= 4)
+ {
+ tmp_entity = spawn();
+ if(argv(1) == "w")
+ setmodel(tmp_entity, (nextent(world)).weaponentity.model);
+ else
+ {
+ precache_model(argv(1));
+ setmodel(tmp_entity, argv(1));
+ }
+ tmp_entity.frame = stof(argv(2));
+ if(substring(argv(3), 0, 1) == "#")
+ i = stof(substring(argv(3), 1, -1));
+ else
+ i = gettagindex(tmp_entity, argv(3));
+ if(i)
+ {
+ v = gettaginfo(tmp_entity, i);
+ print("model ", tmp_entity.model, " frame ", ftos(tmp_entity.frame), " tag ", gettaginfo_name);
+ print(" index ", ftos(i), " parent ", ftos(gettaginfo_parent), "\n");
+ print(" vector = ", ftos(v_x), " ", ftos(v_y), " ", ftos(v_z), "\n");
+ print(" offset = ", ftos(gettaginfo_offset_x), " ", ftos(gettaginfo_offset_y), " ", ftos(gettaginfo_offset_z), "\n");
+ print(" forward = ", ftos(gettaginfo_forward_x), " ", ftos(gettaginfo_forward_y), " ", ftos(gettaginfo_forward_z), "\n");
+ print(" right = ", ftos(gettaginfo_right_x), " ", ftos(gettaginfo_right_y), " ", ftos(gettaginfo_right_z), "\n");
+ print(" up = ", ftos(gettaginfo_up_x), " ", ftos(gettaginfo_up_y), " ", ftos(gettaginfo_up_z), "\n");
+ if(argc >= 6)
+ {
+ v_y = -v_y;
+ localcmd(strcat(argv(4), vtos(v), argv(5), "\n"));
+ }
+ }
+ else
+ print("bone not found\n");
+
+ remove(tmp_entity);
+ return;
+ }
+
+ default:
+ print("Incorrect parameters for \"gettaginfo\"\n");
+ case GC_REQUEST_USAGE:
+ print("\nUsage: sv_cmd gettaginfo\n");
+ print(" No arguments required.\n");
+ return;
+ }
+}
+
void GameCommand_gotomap(float request, string command)
{
float argc = tokenize_console(command);
void GameCommand(string command)
{
// ===== TODO list =====
+
// Finish adding the rest of the commands
// Add ifdef to stuffto so that is can only be used when the game code is compiled for it
{
if(argc == 1)
{
- // should these not recieve "command" argument? They have no use for it.
- // but, what to provide instead? null string?
-
print("\nUsage: sv_cmd COMMAND..., where possible commands are:\n");
GameCommand_adminmsg(GC_REQUEST_HELP, "");
GameCommand_allready(GC_REQUEST_HELP);
GameCommand_extendmatchtime(GC_REQUEST_HELP);
GameCommand_find(GC_REQUEST_HELP, "");
GameCommand_gametype(GC_REQUEST_HELP, "");
+ GameCommand_gettaginfo(GC_REQUEST_HELP, "");
GameCommand_gotomap(GC_REQUEST_HELP, "");
print(" teamstatus\n");
print(" printstats\n");
case "extendmatchtime": GameCommand_extendmatchtime(search_request_type); break;
case "find": GameCommand_find(search_request_type, command); break;
case "gametype": GameCommand_gametype(search_request_type, command); break;
+ case "gettaginfo": GameCommand_gettaginfo(search_request_type, command); break;
case "gotomap": GameCommand_gotomap(search_request_type, command); break;
default: