Jump to content

Noel Collins

  • Content Count

  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About Noel Collins

  • Rank
  1. Original Attempt was with code in init.sqf exactly as above on hosted server, with nothing else done. This attempt the same code was as below, only change marked in red.: i dont see a namespace in the handle disconnect EH? thanks TAG_fnc_loadClientData = { _this params ["_loadout", "_positionASL", "_dir"]; player setUnitLoadout _loadout; player setDir _dir; player setPosASL _positionASL; }; if(isServer) then { addMissionEventHandler [ "HandleDisconnect", { params ["_body", "_id", "_uid", "_name"]; if(!isNull _body) then { //Init storage var if(isNil "TAG_disconnectedLoadouts") then { TAG_disconnectedLoadouts = []; }; //Get data private _loadout = getUnitLoadout _body; private _position = getPos _body; private _direction = getDir _body; //Find in storage private _uidIndex = TAG_disconnectedLoadouts find _uid; if(_uidIndex > -1) then { //Found -> update private _loadoutIndex = _uidIndex + 1; TAG_disconnectedLoadouts set [_loadoutIndex, [_loadout, _position, _direction]]; } else { //Not found -> Add new TAG_disconnectedLoadouts pushBack _uid; TAG_disconnectedLoadouts pushBack [_loadout, _position, _direction]; }; }; false } ]; addMissionEventHandler [ "PlayerConnected", { params ["_id", "_uid", "_name", "_jip", "_owner"]; if(_jip) then { private _clientData = profileNamespace getVariable ["TAG_disconnectedLoadouts", []]; private _uidIndex = _clientData find _uid; if(_uidIndex > -1) then { private _loadoutIndex = _uidIndex + 1; (_clientData select _loadoutIndex) remoteExec ["TAG_fnc_loadClientData", _owner]; }; }; } ]; };
  2. So i tried again, changing missionNamespace to profileNamespace. no joy. as per above, hosted server. There is stuff mentioned above about whitelists, etc, which i do not understand. Is there anyone who uses this script that can help? thanks
  3. I tried to use the script above over the weekend: - blank mission with one playable character, an arsenal and a vehicle. - The code above copied into in it.sqf. - on joining I walked about 15 metres and to the right, turned 180 from starting orientation, and dripped numerous weapons and items from inventory. - I then disconnected and logged back on. I spawned back in original position, with original gear. Can anyone confirm this script still works, and if there are any other server side settings I need to make it work? Thanks!