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

Difference between revisions of "Bz resetFlags"

From BZFlagWiki
Jump to: navigation, search
(Remove the spam)
(add the new keepTeamFlags parameter)
 
Line 2: Line 2:
 
{{BZFS_API_Funcs}}
 
{{BZFS_API_Funcs}}
 
==Prototype==
 
==Prototype==
BZF_API void bz_resetFlags ( bool onlyUnused );
+
BZF_API void bz_resetFlags ( bool onlyUnused, bool keepTeamFlags = false );
 
==Parameters==
 
==Parameters==
 
{| border="1" cellpadding="20" cellspacing="0"
 
{| border="1" cellpadding="20" cellspacing="0"
Line 13: Line 13:
 
   |only reset non-player flags
 
   |only reset non-player flags
 
   |-
 
   |-
   |shotType
+
   |keepTeamFlags
   |[[bz_eShotType]]
+
   |bool
   |the new shot type to assign to the player
+
   |don't reset team flags (defaults to ''false'')
 
   |}
 
   |}
  
 
==Description==
 
==Description==
This API function will force all flags to be reset and respawned. If the onlyUnused parameter is true, then flags carried by players will not be reset, otherwise all flags will be reset.
+
This API function will force all flags to be reset and respawned. If the onlyUnused parameter is true, then flags carried by players will not be reset, otherwise all flags will be reset. If the keepTeamFlags parameter is true, then team flags will not be reset.

Latest revision as of 21:03, 23 March 2013

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 void bz_resetFlags ( bool onlyUnused, bool keepTeamFlags = false );

Parameters[edit]

name type value description
onlyUnused bool only reset non-player flags
keepTeamFlags bool don't reset team flags (defaults to false)

Description[edit]

This API function will force all flags to be reset and respawned. If the onlyUnused parameter is true, then flags carried by players will not be reset, otherwise all flags will be reset. If the keepTeamFlags parameter is true, then team flags will not be reset.