PDA

View Full Version : Python logging function


marciano1
24th October 2005, 20:12
Hi there I am hoping you can help me with this problem.

I am writing a custom autobalance script that balances by name tags and some other rules. At the moment I am sending messages to the players via the python call:
host.rcon_invoke('game.sayAll "hello players"')


This works OK, the only problem is that the message does not appear in either the log or chat window of the BF2CC client. It is essential that a record is kept of the script's activities as it will also be kicking players that break certain rules.

What is the correct code to send a message to the bf2cc log? If that is impossible is there a feasible alterative?

K
24th October 2005, 20:49
See the ModManager docs:
http://bf2.fun-o-matic.org/index.php/ModManager#mm_utils_methods

marciano1
24th October 2005, 20:55
thankyou for the quick response!!

I guess

mm_utils.msg_server( msg )

is what I am looking for.