HolyLib Wiki

HolyLib:OnSourceTVCommand

 boolean HolyLib:OnSourceTVCommand( CHLTVClient client, string command, table args, string argString )

Description

Called when a CHLTVClient sends a command.

Arguments

1CHLTVClient client

client that sent the command

2string command

the executed command

3table args

table containing all arguments

4string argString

arguments as a single string

Returns

1boolean handled

Return true if the command as handled in lua

Example

hook.Add("HolyLib:OnSourceTVCommand", "Example", function(client, name, args, argString) if name == "Example" then client:ClientPrint("Hello World from HLTVServer\n") return true end end)