There is a very simple way to do the same thing. Any console command you have registered can be called from the chat by typing "/my_command" or "!my_command". Just look here:
Code:
public OnPluginStart()
{
RegConsoleCmd("test", MyFunction, "Description for the command");
}
public Action:MyFunction(client, args)
{
PrintToConsole(client, "Testowa komenda.. hehe");
return Plugin_Handled
}
Now you can use "/test" or "!test" in chat to see "Testowa komenda.. hehe" or just open a console and enter "test".
__________________