Giving players points
- the panda next door
- Private First Class
- Posts: 42
- Joined: Sun Mar 16, 2008 3:55 am
- Location: Las Vegas
Giving players points
How do I give players points and get the size of a team?
you can not change players scores in 2.0.x. The client tracks the score and it can not be changed by the server.
in 3.0 you can use these functions
To get the current team size, you can call
in 2.0.x and 3.0
in 3.0 you can use these functions
Code: Select all
BZF_API bool bz_setPlayerWins (int playerId, int wins);
BZF_API bool bz_setPlayerLosses (int playerId, int losses);
BZF_API bool bz_setPlayerTKs (int playerId, int tks);
Code: Select all
BZF_API int bz_getTeamCount (bz_eTeamType team );
JeffM
- the panda next door
- Private First Class
- Posts: 42
- Joined: Sun Mar 16, 2008 3:55 am
- Location: Las Vegas
you can NOT set the score of an individual player in 2.0.x for any reason, capture, death, anything. It is NOT something that is supported by the game protocol.
You can set the team scores by using;
You can set the team scores by using;
Code: Select all
BZF_API void bz_setTeamWins (bz_eTeamType team, int wins );
BZF_API void bz_setTeamLosses (bz_eTeamType team, int losses );
JeffM
- the panda next door
- Private First Class
- Posts: 42
- Joined: Sun Mar 16, 2008 3:55 am
- Location: Las Vegas
3.0 is under development as 2.99.x It is the current TRUNK in SVN, and can only be gotten from there. you can see http://my.bzflag.org/w/SVN for info on how to use subversion.
It is totally incompatible on both the server and client from any 2.0.x version and is unstable development code.
It is totally incompatible on both the server and client from any 2.0.x version and is unstable development code.
Last edited by JeffM on Wed Jun 18, 2008 3:51 pm, edited 1 time in total.
JeffM
On an aside, there can/will be problems with giving points to the individual who captures a flag. It will result in TKing just before someone caps so that they (the TKer) can have a chance to cap and collect the points. Capturing the flag is a team event, because most caps cannot happen without help from your team.
There is nothing worse than aggressive stupidity. -- Johann Wolfgang von Goethe
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
- the panda next door
- Private First Class
- Posts: 42
- Joined: Sun Mar 16, 2008 3:55 am
- Location: Las Vegas
No, much has changed from 2.0.11 to 2.99broken tank over there wrote:Would it be good to give points to the whole team?
Also, insead of compiling 2.99, can I copy include from 2.99 to 2.0.11?
There is nothing worse than aggressive stupidity. -- Johann Wolfgang von Goethe
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
I made a mistake, I wrote COMPATIBLE when I meant to write, INCOMPATIBLE, sorry about that. You can NOT do what you want in 2.0.x, you must WAIT until the next release.
There is NO way to make 2.0.x change scores other then the existing hard coded logic on the client.
3.0 uses totally different networking messages then 2.0.x and it's those networking messages that are broken in 2.0.x and prevent the score from being changed.
There is NO way to make 2.0.x change scores other then the existing hard coded logic on the client.
3.0 uses totally different networking messages then 2.0.x and it's those networking messages that are broken in 2.0.x and prevent the score from being changed.
JeffM