This wiki is archived and useful information is being migrated to the main bzflag.org website

Difference between revisions of "Bz setPlayerShotType"

From BZFlagWiki
Jump to: navigation, search
(Notes)
 
(2 intermediate revisions by 2 users not shown)
Line 15: Line 15:
 
   |shotType  
 
   |shotType  
 
   |[[bz_eShotType]]
 
   |[[bz_eShotType]]
   |he new shot type to assign to the player
+
   |the new shot type to assign to the player
 
   |}
 
   |}
  
Line 23: Line 23:
 
==Notes==
 
==Notes==
  
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.
+
BZFlag 3.0 has the ability to allow a [[plug-ins | 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.
 
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.

Latest revision as of 17:31, 21 November 2007

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.

Prototype[edit]

BZF_API bool bz_setPlayerShotType( int playerId, bz_eShotType shotType );

Parameters[edit]

name type value desription
playerId int the player that is to get the defined shot type
shotType bz_eShotType the new shot type to assign to the player

Description[edit]

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.

Notes[edit]

BZFlag 3.0 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.