This wiki was in read-only mode for many years, but can now be edited again. A lot of information will need to be updated.

Bz setBZDBBool: Difference between revisions

From BZFlagWiki
Jump to navigation Jump to search
Sigonasr2 (talk | contribs)
Create API Function Page. Include Example.
 
(No difference)

Latest revision as of 06:34, 19 October 2011

bool bz_setBZDBBool (const char* variable, bool val, int perms = 0, bool persistent = false)


Sets a BZDB variable to a given bool value.

Parameters:
variable  -  Variable name (E.g. "_shockOutRadius")
val  -  The value to set the variable to.
perms = 0  -  What to set the permission value to. (Range: 1-3. Using 0 sets it to the default [2], and using a higher number sets it to 3.)
persistent = false  -  Whether or not the variable will be persistent.
Returns:
Whether or not the set was successful.

Example

Turns no climbing on sloped objects off to allow climbing and jumping off from them.

bz_setBZDBBool("_noClimb",false);