Hi,
i'm beginner in arma script (try to be better and my english is not beautiful), I try to use addPublicVariableEventHandler on server side for refresh and send value from client.
in my pbo server side :
onPlayerConnected
{
_data = [_uid] call BAB_fnc_levelgetstat; //this function get value in redis
missionNamespace setVariable ["LEVEL_UserInfo", _data];
_owner publicVariableclient "LEVEL_UserInfo";
}; // This part is ok
"LVLshowDB" addPublicVariableEventHandler {
// [str serverTime,["Z_fnc_showDB","work"]] call BAB_fnc_leveladdstat; -> i use for debug for see if LVLshowDB work ...
_arr = _this select 1;
_player = _arr select 0;
_uid = getPlayerUID _player;
_owner = owner _player;
// fonction de mise à jour de la dbb
_data = [_uid] call BAB_fnc_levelgetstat;
missionNamespace setVariable ["LEVEL_UserInfo", _data];
_owner publicVariable "LEVEL_UserInfo";
};
on client i do
LVLShowDB = true; publicVariableServer "LVLShowDB"; or missionNamespace setVariable ["LVLShowDB", true];publicVariable "LVLShowDB";
-> no add in redis database, if i modify the redis database manually, use this handler for refresh LEVEL_UserInfo's value, that's not work ... What I have to do for this work ?
Thx