You can make Chat commands with the
player_onchat function
Here's a basic example.
Code:
function player_onchat( player, chatstring )
local player = CastToPlayer( player )
-- string.gsub call removes all control characters (newlines, return carriages, etc)
-- string.sub call removes the playername: part of the string, leaving just the message
local message = string.sub( string.gsub( chatstring, "%c", "" ), string.len(player:GetName())+3 )
if Message == "/Hello" then
ChatToAll("HELLO!")
return false -- Doesnt actually send the message to chat but still uses the command.
end
return true -- Allows players to still chat normally
end
And here is the (almost nothing) Wiki:
http://www.fortress-forever.com/wiki...=Player_onchat