BIS fnc setServerVariable: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "| arma3 |1.00 " to "|game1= arma3 |version1= 1.00 ")
m (Text replacement - " |r1=[[" to " |r1= [[")
Line 16: Line 16:
|p3= value: [[Anything]] - variable value
|p3= value: [[Anything]] - variable value


|r1=[[Boolean]] - [[true]] when done
|r1= [[Boolean]] - [[true]] when done


|x1= <code><nowiki>[</nowiki>[[nil]], "playerHealth", [[damage]] [[player]]] [[call]] [[BIS_fnc_setServerVariable]];</code>
|x1= <code><nowiki>[</nowiki>[[nil]], "playerHealth", [[damage]] [[player]]] [[call]] [[BIS_fnc_setServerVariable]];</code>

Revision as of 23:28, 7 August 2021

Hover & click on the images for description

Description

Description:
Set variable stored only on server. Clients can the download it using BIS_fnc_getServerVariable. Used when you want to share variables only to specific clients to prevent large traffic.
Execution:
call
Groups:
Variables

Syntax

Syntax:
[namespace, varName, value] call BIS_fnc_setServerVariable
Parameters:
namespace: Namespace or Object or Group - (Optional, default missionNamespace)
varName: String - variable name
value: Anything - variable value
Return Value:
Boolean - true when done

Examples

Example 1:
[nil, "playerHealth", damage player] call BIS_fnc_setServerVariable;
Example 2:
[player, "playerHealth", damage player] call BIS_fnc_setServerVariable;

Additional Information

See also:
BIS_fnc_getServerVariablepublicVariableServerpublicVariableClient

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note