[bf1942] BF2 Admin API (WAS: RE: [bf1942] Re: RE: The 1.61 patch)

g8 at the.whole.net g8 at the.whole.net
Wed Dec 8 10:51:54 EST 2004


On Wed, 8 Dec 2004, Michael Ressen wrote:

> Andreas Fredriksson wrote:
> > All of these can be written with the Python API. I think it's a better
> > idea to have the community implement these things.
> >
> > For instance, to add a new rcon command to kill a player you would first
> > add the function to the default rcon handler (or to your own if you
> > decide to rewrite the entire protocol). Doing the logic is then very
> > easy:
> >
> > def adminKill(player_index):
> >    player = bf2.playerManager.getPlayerByIndex(player_index)
> >    if not player or not player.isAlive(): return
> >    vehicle = player.getVehicle()
> >    vehicle.setDamage(1.0)
> >
> > // Andreas
> >
> Does anyone else get the feeling we just caught a glimpse of the holy grail?
>
> /BA


Yes!  Python API!!  I'm ecstatic, thank you Andreas and/or whomever
implemented that.

-g8





More information about the Bf1942 mailing list