Jump to content
  • 0

Disable loot spawn in plot pole range/safe zone


BetterDeadThanZed

Question

16 answers to this question

Recommended Posts

  • 0

maybe in spawn_loot.sqf?

 

something like:

if (!canbuild || _findNearestPole > 0) exitWith {diag_log "exiting loot spawn Near Safezone or Pole)!";};

Needs to be tested though

 

to check for poles:

// check for near plot
_findNearestPoles = nearestObjects [(vehicle player), ["Plastic_Pole_EP1_DZ"], _distance];
_findNearestPole = [];

{
	if (alive _x) then {
		_findNearestPole set [(count _findNearestPole),_x];
	};
} count _findNearestPoles;

_IsNearPlot = count (_findNearestPole);
Link to comment
Share on other sites

  • 0

GZA - That script isn't working for me. I put it in my "custom" folder in a folder called "disableloot" and called it from my custom compiles:

player_spawnCheck = compile preprocessFileLineNumbers "custom\disableloot\player_spawnCheck.sqf";

Loot is still spawning in range of plot poles and in trader safe zones.

Link to comment
Share on other sites

  • 0

try to edit this line here:

if(_canLoot && !isInTraderCity && (_IsNearPlot == 0)) then {

with

if(_canLoot && !isInTraderCity && (_IsNearPlot == 0) && !canbuild) then {

normaly canbuild is the variable which is set to false when entering a trader-city, just look at your mission.sqm and see for yourself

Link to comment
Share on other sites

  • 0

try to edit this line here:

if(_canLoot && !isInTraderCity && (_IsNearPlot == 0)) then {

with

if(_canLoot && (_IsNearPlot == 0) && !canbuild) then {

normaly canbuild is the variable which is set to false when entering a trader-city, just look at your mission.sqm and see for yourself

 

Yeah right if you use old mission.sqm you have to use canbuild but your example was wrong canbuild must be true.

if(_canLoot && (_IsNearPlot == 0) && canbuild) then {
Link to comment
Share on other sites

  • 0

Going to revive an old topic here because I am attempting this on my Takistan server that I'm reworking. I'm using this bit of code in player_spawnCheck.sqf:

if (isNull _nearbyPole && canbuild && !isInTraderCity ) then {

With this code: http://pastebin.com/ZNNpmPCR

I found loot only 35 meters from the center of the safe zone.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...