[bf1942] We REALLY need the BF2 Python API

"Einar S. Idsø" esi at itk.ntnu.no
Sat Jun 25 17:55:31 EDT 2005

Shamelessly following up on my own post here:

We've just finished a script to perform autokick of players based on
ping (measure every 30 seconds, if ping goes above limit three times,
you're out). This was a lot of hard work w/o any documentation on the
API. Thank goodness for the Wiki-page!

But to my question: We all know about the game.sayall command by now. It
will spam some text in green at the top left. We use this to inform
players when they exceed the ping-limit and when they are about to be
kicked. We think it would be much better to have text in a red
warning-color for this, and possibly placed in the middle of the screen
instead of the top corner. It would also be nice to send the message
directly to the player instead of spamming it to the entire server.

So does anyone know of any other rcon- og Py-functions for sending
messages to the server/individual players? We were able to find a
function called bf.gameLogic.sendServerMessage() in
python/bf2/stats/stats.py, but it seems like it's not working right (the
function in stats.py where it is used seems to be unfinished as well).


More information about the Bf1942 mailing list