Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- span class="re5"> Put this at the very bottom of your init.sqf :
- ServerIllegalRadius = 500;
- ServerIllegalRadius2 = 1000;
- ServerNoBuildList = ["Land_Mil_ControlTower","Land_SS_hangar","Land_Mil_Barracks_i","Land_Mil_Barracks","Land_budova4_in"];
- ServerNoBuildList2 = ["HeliHEmpty"];
- Then, go to your player_build_publish.sqf and add this the END of the "private" array at the top :
- ,"_posrad","_cntrad","_cntrad2"
- Then search for this line :
- if(!canbuild) then { _cancel = true; _reason = "Cannot build in a city."; };
- Put this directly under it :
- _posrad = [player] call FNC_GetPos;
- _cntrad = count (nearestObjects [_posrad, ServerNoBuildList, ServerIllegalRadius]);
- _cntrad2 = count (nearestObjects [_posrad, ServerNoBuildList2, ServerIllegalRadius2]);
- if (_cntrad > 0) then {
- _cancel = true;
- _reason = format["- Building is restricted %1m near military areas", ServerIllegalRadius];
- };
- if (_cntrad2 > 0) then {
- _cancel = true;
- _reason = format["- Building is restricted %1m near trader cities", ServerIllegalRadius2];
- };
- So that it looks like this :
- // No building in trader zones
- if(!canbuild) then { _cancel = true; _reason = "Cannot build in a city."; };
- _posrad = [player] call FNC_GetPos;
- _cntrad = count (nearestObjects [_posrad, ServerNoBuildList, ServerIllegalRadius]);
- _cntrad2 = count (nearestObjects [_posrad, ServerNoBuildList2, ServerIllegalRadius2]);
- if (_cntrad > 0) then {
- _cancel = true;
- _reason = format["- Building is restricted %1m near military areas!", ServerIllegalRadius];
- };
- if (_cntrad2 > 0) then {
- _cancel = true;
- _reason = format["- Building is restricted %1m near trader areas!", ServerIllegalRadius2];
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement