void SV_ParseClientCommand (string s)
Rather than how it reads now, else it would not compile. Im not understanding how its called unless its always being called, therefore the (s) string will be the text parsed after the client hits enter after typing text in the console? I tried a rough test using this code, and it seems not to work, unless I have to call this every frame , say in startframe? Finally if I read this right, we are merely aliasing one string for another string that I guess is predefined in the engine or using the alias command?
Code: Select all
//KRIMZON_SV_PARSECLIENTCOMMAND test
void (string s) SV_ParseClientCommand =
{
local float args;
local string c;
args = tokenize(s);
c = argv(0);
// edit this to do what you want with the received commands
if (c == "time") clientcommand(self, s);
else if (c == "say_team") clientcommand(self, s);
else if (c == "name") clientcommand(self, s);
else if (c == "color") clientcommand(self, s);
else if (c == "tell") clientcommand(self, s);
else if (c == "kill") clientcommand(self, s);
else if (c == "status") clientcommand(self, s);
else if (c == "pause") clientcommand(self, s);
else if (c == "kick") clientcommand(self, s);
else if (c == "ping") clientcommand(self, s);
else if (c == "ban") clientcommand(self, s);
else if (c == "pmodel") clientcommand(self, s);
else if (c == "god") clientcommand(self, s);
else if (c == "fly") clientcommand(self, s);
else if (c == "noclip") clientcommand(self, s);
else if (c == "notarget") clientcommand(self, s);
else if (c == "give") clientcommand(self, s);
// please keep this fallback incase new engine commands are added
else clientcommand(self, s);
};