BIS fnc setServerVariable: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
||
Line 1: | Line 1: | ||
{{Function|Comments= | {{Function|Comments= | ||
| arma3 |Game name= | | arma3 |Game name= | ||
Line 7: | Line 6: | ||
|gr1= Variables |GROUP1= | |gr1= Variables |GROUP1= | ||
| 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. |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. |DESCRIPTION= | ||
| [namespace, varName, value] call [[BIS_fnc_setServerVariable]] |SYNTAX= | | [namespace, varName, value] call [[BIS_fnc_setServerVariable]] |SYNTAX= | ||
Line 21: | Line 18: | ||
| [[Boolean]] - [[true]] when done |RETURNVALUE= | | [[Boolean]] - [[true]] when done |RETURNVALUE= | ||
|x1= <code><nowiki>[</nowiki>[[nil]], "playerHealth", [[damage]] [[player]]] [[call]] [[BIS_fnc_setServerVariable]];</code> |EXAMPLE1= | |x1= <code><nowiki>[</nowiki>[[nil]], "playerHealth", [[damage]] [[player]]] [[call]] [[BIS_fnc_setServerVariable]];</code> |EXAMPLE1= | ||
|x2= <code><nowiki>[</nowiki>[[player]], "playerHealth", [[damage]] [[player]]] [[call]] [[BIS_fnc_setServerVariable]];</code> |EXAMPLE2= | |x2= <code><nowiki>[</nowiki>[[player]], "playerHealth", [[damage]] [[player]]] [[call]] [[BIS_fnc_setServerVariable]];</code> |EXAMPLE2= | ||
| [[BIS_fnc_getServerVariable]], [[publicVariableServer]], [[publicVariableClient]] |SEEALSO= | | [[BIS_fnc_getServerVariable]], [[publicVariableServer]], [[publicVariableClient]] |SEEALSO= |
Revision as of 23:51, 16 January 2021
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
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