MGTDB 956 Report post Posted January 14, 2018 (edited) Not technically preventing logging out as players could just alt+f4, but moving them if they log out in an enemy territory. The X and Y amount the player is moved is based on territory radius plus a small amount In ExileServer_system_network_event_onHandleDisconnect just below if !(_unit getVariable ["ExileIsDead", false]) then { Add the following _territory = _unit call ExileClient_util_world_getTerritoryAtPosition; if!(isNull _territory)then { if!((_uid) in (_territory getVariable ["ExileTerritoryBuildRights",[]]))then { _radius = _territory getVariable ["ExileTerritorySize", 10];//if your level 1 radius is less than 15m adjust here _radius = _radius + 10; _pos0 = (_pos select 0) + _radius; _pos1 = (_pos select 1) + _radius; _pos2 = _pos select 2; if(_pos2 > 0.5) then //prevent player spawning back in the air if they logged out above ground in base { _pos2 = 0.1; }; _positionnew = [_pos0,_pos1,_pos2]; _unit setPos _positionnew; //_logoutenemy = format ["%1 %2 logged out in enemy territory @ %3 %4 now moved %5m to %6 %7",_name,_uid,mapGridPosition _pos,_pos,_radius + 10,mapGridPosition _positionnew,_positionnew];// uncomment this line if you want infiSTAR logging //["LOGOUTENEMYBASE",_logoutenemy] call FNC_A3_CUSTOMLOG;// uncomment this line if you want infiSTAR logging //["toastRequest", ["InfoTitleAndText", ["A prisoner logged out in enemy territory @",mapGridPosition _unit]]] call ExileServer_system_network_send_broadcast;// uncomment this line if you want to broadcast logout to whole server }; }; Then pack up your server pbo and you're good to go Edit: Updated to include better coordinates in logging, also option to alert whole server with a toast Edited January 15, 2018 by MGTDB 9 Share this post Link to post Share on other sites
GolovaRaoul 221 Report post Posted January 19, 2018 Stuff like this should be default in 1.0.4 I think 2 Share this post Link to post Share on other sites
Monkeynutz 230 Report post Posted January 19, 2018 2 hours ago, GolovaRaoul said: Stuff like this should be default in 1.0.4 I think Still time to get it in 1.0.5 "Kumquat" Share this post Link to post Share on other sites
cybermiliko 3 Report post Posted January 31, 2018 On 1/14/2018 at 8:08 PM, MGTDB said: Not technically preventing logging out as players could just alt+f4, but moving them if they log out in an enemy territory. The X and Y amount the player is moved is based on territory radius plus a small amount In ExileServer_system_network_event_onHandleDisconnect just below if !(_unit getVariable ["ExileIsDead", false]) then { Add the following _territory = _unit call ExileClient_util_world_getTerritoryAtPosition; if!(isNull _territory)then { if!((_uid) in (_territory getVariable ["ExileTerritoryBuildRights",[]]))then { _radius = _territory getVariable ["ExileTerritorySize", 10];//if your level 1 radius is less than 15m adjust here _radius = _radius + 10; _pos0 = (_pos select 0) + _radius; _pos1 = (_pos select 1) + _radius; _pos2 = _pos select 2; if(_pos2 > 0.5) then //prevent player spawning back in the air if they logged out above ground in base { _pos2 = 0.1; }; _positionnew = [_pos0,_pos1,_pos2]; _unit setPos _positionnew; //_logoutenemy = format ["%1 %2 logged out in enemy territory @ %3 %4 now moved %5m to %6 %7",_name,_uid,mapGridPosition _pos,_pos,_radius + 10,mapGridPosition _positionnew,_positionnew];// uncomment this line if you want infiSTAR logging //["LOGOUTENEMYBASE",_logoutenemy] call FNC_A3_CUSTOMLOG;// uncomment this line if you want infiSTAR logging //["toastRequest", ["InfoTitleAndText", ["A prisoner logged out in enemy territory @",mapGridPosition _unit]]] call ExileServer_system_network_send_broadcast;// uncomment this line if you want to broadcast logout to whole server }; }; Then pack up your server pbo and you're good to go Edit: Updated to include better coordinates in logging, also option to alert whole server with a toast After i Add it the bodys when they disconnect because lose connection, the body's of the players stay on the map and not dissapear. Did i did something wrong ? i just add the scritp not override nothing. Likes are dupping the bodies. Share this post Link to post Share on other sites
Bob_the_K 105 Report post Posted July 19, 2018 How would I modify this to be a set area instead of enemy territory? I'm trying to build a Sector B-like island (Remember Taviana?) and want to set it so people cannot log out there and not build there - just like the original. I've got the no-build zone but how to modify this code for a specific area and radius (my Sector B island)? Share this post Link to post Share on other sites