Azza FHI 50 Posted January 2, 2016 As the title suggests, does anyone know of a way of checking how long a player has been disconnected from a dedicated server? Thanks Share this post Link to post Share on other sites
killzone_kid 1329 Posted January 2, 2016 You need to give us a bit more info, perhaps example situation. Share this post Link to post Share on other sites
whiztler 137 Posted January 2, 2016 There's a solution for that: https://community.bistudio.com/wiki/onPlayerDisconnected Share this post Link to post Share on other sites
Kingsley1997 39 Posted January 2, 2016 You'd simply record the time they disconnected, and then when they re-connect work out the difference. Share this post Link to post Share on other sites
Azza FHI 50 Posted January 2, 2016 ok thanks for the replies. Situation: Will be running a mission that goes for ~4 days. when player JIP's they have the option to spawn to captured spawn points, but in order to prevent misuse of this system it needs to only fire if the player has been absent from the server for 30 minutes. This is what ive got so far (in the process of testing if it will work. initplayerlocal.sqf while {true} do { waituntil {!isnull player}; sleep 30; ["savePlayer", player] call pdw; ["saveInventory", [name player, player]] call pdw; profileNamespace setVariable ["player_time", servertime]; }; in our teleport system addonclientinit.sqf private ['_time_check','_disconnected_time']; _time_check = profileNamespace getVariable "player_time"; _disconnected_time = servertime - _time_check; if (_disconnected_time > 300) then { }; edit - 300 is for testing purposes Share this post Link to post Share on other sites