_server.setUserVariables()
Availability:
SmartFoxServer PRO 1.4.0
Usage:
_server.setUserVariables(who, varList, sendUpdate)
Description:
Set one or more User Variables from the server side
Properties:
| who | the User object where the variables will be set | |
| varList | an object containing the variable(s) to set (undefined to delete an existing variable) |
|
| sendUpdate | an optional boolean flag. By deafult is set to true. Set it to false to avoid sending an update to all clients in the rooms where the user is present. |
Returns:
nothing
Example:
var uVars = {}
uVars.strength = 1000
uVars.agility = 800
uVars.speed = 20
// Set the variables for this client
_server.setUserVariables(userObj, uVars)
See also: