Donnovan Posted May 26, 2015 Report Share Posted May 26, 2015 THE IDEA: Have god mode only on small bases. WHAT WAS REACHED: Small bases still dies, but it is not removed from the data base, so it back on the next restart. THE CODE TO DO THAT: One server function need to be changed on the file init\server_functions.sqf. Function object_handleServerKilled changes from: object_handleServerKilled = { private["_unit","_objectID","_objectUID","_killer"]; _unit = _this select 0; _killer = _this select 1; _objectID = _unit getVariable ["ObjectID","0"]; _objectUID = _unit getVariable ["ObjectUID","0"]; [_objectID,_objectUID,_killer] call server_deleteObj; _unit removeAllMPEventHandlers "MPKilled"; _unit removeAllEventHandlers "Killed"; _unit removeAllEventHandlers "HandleDamage"; _unit removeAllEventHandlers "GetIn"; _unit removeAllEventHandlers "GetOut"; }; To: object_handleServerKilled = { private["_unit","_objectID","_objectUID","_killer"]; _unit = _this select 0; _killer = _this select 1; _objectID = _unit getVariable ["ObjectID","0"]; _objectUID = _unit getVariable ["ObjectUID","0"]; //=============================================================== //DONN Small Bases God Mode - Begin ============================= //=============================================================== _limitToGod = 30; //Max Limite for God Mode Base _radSearch = (DZE_PlotPole select 0) + 2; _plots = nearestObjects [_unit,"Plastic_Pole_EP1_DZ",_radSearch]; _delOnDb = false; if (count _plots > 0) then { _plot = _plots select 0; _plotRad = DZE_PlotPole select 0; _modules = nearestObjects [_plot,DZE_maintainClasses,_plotRad]; _numModules = count _modules; if (_numModules > _limitToGod) then { _delOnDb = true; }; } else { _delOnDb = true; }; if (_delOnDb) then {[_objectID,_objectUID,_killer] call server_deleteObj;}; //=============================================================== //DONN Small Bases God Mode - End =============================== //=============================================================== //[_objectID,_objectUID,_killer] call server_deleteObj; _unit removeAllMPEventHandlers "MPKilled"; _unit removeAllEventHandlers "Killed"; _unit removeAllEventHandlers "HandleDamage"; _unit removeAllEventHandlers "GetIn"; _unit removeAllEventHandlers "GetOut"; }; IT WORKS? It was not tested, but if you have interest in that, and want to help testing it, i apreciate and we can have something nice fastely. INFISTAR COMPATIBLE? This is something to test too. Corpulio_Hun 1 Link to comment Share on other sites More sharing options...
Corpulio_Hun Posted March 1, 2016 Report Share Posted March 1, 2016 Hi, i will test the script! I intrest for this. I come back when i tested. Corpulio_Hun Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now