I am using the BZF_API bool bz_killPlayer ( int playerID, bool spawnOnBase ) function in a plugin I have been working on and I seem to be having some difficulty with its behavior.
When the function is called, it will remove the player's flag and make the player unresponsive (nr), but not destroy/explode the player and allow a respawn.
I am running bzfs with the plugin locally (not public) and my bzflag application is running on the same pc as the bzfs application; I'm not sure if that has anything to do with it or not. I have tried it with multiple pc's on the same local network and I have tried it with bots - always get "nr" for those killed with the function. I've also run bzfs with the "killall" plugin locally with the same results.
Does this function only work when it is associated with a public server?
Any information/insight on this would be greatly appreciated
bz_killPlayer
Yesterday, while trying out the /killall plugin, I had the same problem. I also solved it by passing more parameters.
There is one more parameter after killerID.
BZF_API bool bz_killPlayer ( int playeID, bool spawnOnBase, int killerID = -1, const char* flagID = NULL );
I think this might be the problem:
#define BZ_ALLUSERS -1
and
int killerID = -1 (the function parameter).
It doesn't make sense for everyone to kill a player at once.
There is one more parameter after killerID.
BZF_API bool bz_killPlayer ( int playeID, bool spawnOnBase, int killerID = -1, const char* flagID = NULL );
I think this might be the problem:
#define BZ_ALLUSERS -1
and
int killerID = -1 (the function parameter).
It doesn't make sense for everyone to kill a player at once.