|BZFS API Documentation This page contains part of the BZFS API documentation for use by Plug-ins on the BZFS server.|
|BZFS API Function. This page documents a BZFS_API Function, that is provided by the BZFS game server for plug-ins to call.|
BZF_API bool bz_setPlayerShotType( int playerId, bz_eShotType shotType );
|playerId||int||the player that is to get the defined shot type|
|shotType||bz_eShotType||the new shot type to assign to the player|
This API function set the current shot type for the player. Any shots fired after the shot type is sent will be of this new type. The function will return true if the player is valid.
BZFlag 2.1 has the ability to allow a plug-in to modify the shot type of player's tank. The shot type can be independent of the flag is carried. When the shot type is changed, the client will start shooting shots of the new type. Once changed, it is not required to change the shot type of every shot fired as was previously done in older versions.
Any time a player spawns or drops a flag, the shot type if the tank will be reset to the standard shot type for the carried flag.